Versions Compared
Version | Old Version 7 | New Version Current |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table of Contents |
---|
Betgenius Genius Sports provides a Booking API to allow you to book fixtures programmatically. Fixtures can be booked through either the API or the InPlay UI and bookings in either service will be reflected in the other.
Anchor | ||||
---|---|---|---|---|
|
You can access a test version of the Booking API in the Betgenius Genius Sports test environment using the following URL (Please contact Genius Sports Integrations team for credentials):
Panel |
---|
URL: https://dataservices.uat.betgenius.com/BookingSystem/swagger Production URL: https:/ index.html |
Note |
---|
Note: Changes made against this instance of the service will not be reflected in the InPlay user interface and may be overwritten by other users. |
Anchor | ||||
---|---|---|---|---|
|
To access the Booking API you will need to use a username and password supplied by BetgeniusGenius Sports. Please contact your integration manager for further details.
Anchor | ||||
---|---|---|---|---|
|
To access the Booking API, our Support team will provide you with the exclusive Username and Password, which then form the key in the following format:
{UserName}:{Password}
Example: BookingAPI:x67sjxBookingAPI:X659Zy1OOP
We will use this example account on the subsequent calls below. Please note that the example is meant for demonstration purposes only and does not retrieve the content. Please contact either the Client Integrations team or our Support to receive your personalised credentials.
Book Fixture
Use this method to submit a booking request for an individual fixture.
Argument | Type | Description |
Betgenius FixtureID | Integer | The unique identifier assigned to the fixture by Betgeniusby Genius Sports |
To book a fixture you submit the Betgenius Genius Sports fixture ID. For example, to book 3217106 (Club Friendlies, Balikesirspor v Elazigspor) you would use the following request
cURL request using Basic Authentication (recommended):
Code Block |
---|
curl -X POST --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com/BookingSystem/api/v2/booking/Book?fixtureId=3217106' --user bookingapiBookingAPI:bookingapiX659Zy1OOP |
The following response would be expected:
Code Block | ||
---|---|---|
| ||
{ "Message": "Booked." } |
Method BehavioursBehaviors:
Panel |
---|
|
Anchor | ||||
---|---|---|---|---|
|
Use this method to cancel a booking for an individual fixture.
Argument | Type | Description |
Betgenius Fixture ID | Integer | The unique identifier assigned to the fixture by Betgeniusby Genius Sports |
To cancel a booking you submit the Betgenius the Genius Sports fixture ID:
URL: https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/UnBook?fixtureId=3217106&api_key=bookingapi%3AbookingapiBookingAPI%3AX659Zy1OOP
cURL request:
Code Block |
---|
curl -X POST --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/UnBook?fixtureId=3217106&api_key=bookingapi%3AbookingapiBookingAPI%3AX659Zy1OOP' |
cURL request using Basic Authentication (recommended):
Code Block |
---|
curl -X POST --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/UnBook?fixtureId=3217106' --user bookingapiBookingAPI:bookingapiX659Zy1OOP |
The following response would be expected:
Code Block | ||
---|---|---|
| ||
{ "Message": "Not booked." } |
Method Behaviours:
Panel |
---|
|
Anchor | ||||
---|---|---|---|---|
|
Use this method to obtain a list of upcoming fixtures with their current book and feed service statuses. The fixture list will include all fixtures from the specified sport and date range. However, you can only retrieve a maximum of 7 days worth of fixtures with one call. The Fixtures method can be used to discover which fixtures are available and which have been booked. The list of available feeds can change so it is recommended that the Fixtures method be called at regular intervals.
Note |
---|
GetFixtures has a 10 minute timeout per sport. If the timeout period has not passed when GetFixtures is queried, the response will inform of the remaining time left before a successful query will be processed |
Argument | Type | Description |
From | Date-time (optional) | Restrict the list of returned fixtures to those starting after this date |
Until | Date-time (optional) | Restrict the list of returned fixtures to those starting before this date |
SportId | Integer | The unique identifier assigned to a sport by BetgeniusGenius Sports. |
To retrieve a list of upcoming football fixtures:
URL: https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10&api_key=bookingapi%3AbookingapiBookingAPI%3AX659Zy1OOP
cURL request:
Code Block |
---|
curl -X POSTGET --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10&api_key=bookingapi%3AbookingapiBookingAPI%3AX659Zy1OOP' |
cURL request using Basic Authentication (recommended):
Code Block |
---|
curl -X POSTGET --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10' --user bookingapiBookingAPI:bookingapiX659Zy1OOP |
The expected response is a JSON array of fixture information matching the specified date range and sport ID:
Code Block | ||
---|---|---|
| ||
{ "FixtureId": 5242621, "CompetitionId": 198, "CompetitionName": "Uruguay Primera División", "SportId": 10, "Name": "CA Cerro v CA Peñarol", "Date": "2018-03-21T19:00:00Z", "CustomerFixtureId": "14124225", "IsBooked": true, "AvailableFeeds": [ { "Name": null, "Type": "MatchState", "IsLicensed": true, "Metadata": { "Origin": "Venue", "Lineups": "False", "Multisport": "False" } }, { "Name": null, "Type": "TradingState", "IsLicensed": true, "Metadata": null } ], "ExternalIds": [ { "Source": "1000", "Id": "14124225" }, { "Source": "1001", "Id": "2747471" } ] } |
Please be noted that some browsers like Mozilla Firefox and Chrome may convert the JSON array to XML.
Method Behaviours:
If the From and Until arguments are omitted the Fixtures method will return fixtures starting in the next twenty four hours
by BetgeniusElement
Type
Description
FixtureId
Integer
The unique identifier assigned to the fixture
by Betgeniusby Genius Sports
CompetitionId
Integer
The unique identifier assigned to a competition
by Betgeniusby Genius Sports
CompetitionName String The name of the competition SportId
Integer
The unique identifier assigned to a sport
Datetimeby Genius Sports
Name
String
The name of the fixture
Date
falseString
The scheduled start date and time for the fixture in UTC
CustomerFixtureId
String
Your fixture ID, if available
IsBooked
Boolean
True if the fixture has been booked,
False otherwise
AvailableFeeds
Array
An array of Feed
null(see below)
Feed inline_model {} Name/Type/IsLicensed/Metadata Name
N/A
This field is not used and will always be
NULL.
Type
String
Describes the type of feed available. Possible values are:
MatchState – score, phase change, danger state etc.
TradingState – the trading controlsIsLicensed
Boolean
True if you are licensed to use the feed, false otherwise
Metadata
Metadata
Booleaninline_model {}
Origin/Lineups/Multisport
Origin
String
Describes the feed origin
Lineups
BooleanString
"True" if fixture has Line-up information
Multisport
fixture isString
"True" if fixture is
multiplemanaged by Multisport service, "False" otherwise
ExternalIds Array An array of ExternalId (see below)
ExternalId inline_model {} Source/Id Source String Your fixture name (if available) Id String Your
,fixture ID's (if available)
CustomerFixtureId and ExternalIds are populated only if:
Panel |
---|
|
More information about how External Fixture feeds can be integrated can be found on the following Confluence page.
Sport ID's
Sport | ID | Sport | ID |
American Football | 17 | Bowls | 8554 |
Baseball | 3 | Boxing | 5 |
Basketball | 4 | Cricket | 6 |
Beach Volleyball | 7950337 | Darts | 8 |
eSports | 10915624 | Futsal | 491393 |
Football | 10 | Gaelic Football | 6463040 |
Handball | 99614 | Hockey | 208627 |
Ice Hockey | 15 | Hurling | 6463041 |
Snooker | 22 | Martial Arts | 300115 |
Tennis | 24 | Rugby League | 73743 |
Volleyball | 91189 | Rugby Union | 73744 |
Australian Rules | 2 | Table Tennis | 269467 |
3x3 Basketball | 11205863 |
Anchor | ||||
---|---|---|---|---|
|