Versions Compared
Version | Old Version 10 | New Version 11 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table of Contents |
---|
Betgenius 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 test environment using the following URL (Please contact Genius Sports Integrations team for credentials):
Panel |
---|
URL: https://dataservices.uat.betgenius.com/BookingSystem/swagger/index.html Production URL: https://dataservices.betgenius.com/BookingSystem/swagger/ui/index |
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 Betgenius. 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:x67sjx
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 Betgenius |
To book a fixture you submit the Betgenius 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 bookingapi:bookingapi |
The following response would be expected:
Code Block | ||
---|---|---|
| ||
{ "Message": "Booked." } |
Method Behaviours:
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 Betgenius |
To cancel a booking you submit the Betgenius fixture ID:
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%3Abookingapi' |
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 bookingapi:bookingapi |
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 Betgenius. |
To retrieve a list of upcoming football fixtures:
cURL request:
Code Block |
---|
curl -X GET --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10&api_key=bookingapi%3Abookingapi' |
cURL request using Basic Authentication (recommended):
Code Block |
---|
curl -X GET --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10' --user bookingapi:bookingapi |
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
Element
Type
Description
FixtureId
Integer
The unique identifier assigned to the fixture by Betgenius
CompetitionId
Integer
The unique identifier assigned to a competition by Betgenius
SportId
Integer
The unique identifier assigned to a sport by Betgenius
Name
String
The name of the fixture
Date
Datetime
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
Feed
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
Origin
String
Describes the feed origin
Lineups
Boolean
True if fixture has Line-up information
Multisport
Boolean
True if fixture is fixture is managed by Multisport service
ExternalIds String Your multiple 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 | ||||
---|---|---|---|---|
|