- Created by Martin Mand , last modified by Alexandru Iftimiciuc on Jul 03, 2020
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 8 Next »
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.
Test API and Online Documentation
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):
Access to the Booking API
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.
API Key
To access the Booking API, our Support team will provide you with the 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):
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:
{ "Message": "Booked." }
Method Behaviours:
- Any fixture that has not yet been completed can be booked
- Bookings are allowed for fixtures that are not licensed to your bookmaker
- Bookings for unlicensed fixtures will not be honoured by the delivery systems and will not initiate billable behaviours
- Confirmation of booking is not to be taken as confirmation that the booked service will be delivered; this depends on the availability of other feeds and may change.
Unbook Fixture
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:
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):
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:
{ "Message": "Not booked." }
Method Behaviours:
- Any fixture that has not yet begun can be cancelled
- Cancelling a fixture that has already begun will not prevent the fixture from being billed for the booked service
- It is not necessary to unbook completed fixtures
Fixtures
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. 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.
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:
curl -X POST --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):
curl -X POST --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:
{ "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:
- Betgenius has been asked to provide a fixture matching service to link your existing fixture to the Betgenius fixture,
- The fixture exists in the Customer fixture feed, and
- The customer fixture has been successfully matched to a Betgenius fixture.
- All the statements above are true and the customer is set up to use multiple external Id sources, ExternalIds will also be populated with as many valid external Id's as are in the system, and
- If ExternalIds element is populated, then the Id from CustomerFixtureId is duplicated within this element.
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 |
- No labels