Booking API

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.

Test API and Online Documentation

You can access a test version of the Booking API in the Genius Sports test environment using the following URL (Please contact Genius Sports Integrations team for credentials):


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.

Access to the Booking API

To access the Booking API you will need to use a username and password supplied by Genius Sports. Please contact your integration manager for further details. 

API Key

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: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 Genius Sports


To book a fixture you submit the Genius Sports fixture ID. For example, to book 3217106 (Club Friendlies, Balikesirspor v Elazigspor) you would use the following request

URL: https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Book?fixtureId=3217106&api_key=BookingAPI%3AX659Zy1OOP


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:X659Zy1OOP


The following response would be expected:

{
"Message": "Booked."
} 


Method Behaviors:

  • 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 Genius Sports


To cancel a booking you submit the Genius Sports fixture ID:

URL: https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/UnBook?fixtureId=3217106&api_key=BookingAPI%3AX659Zy1OOP

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%3AX659Zy1OOP'

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:X659Zy1OOP


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. 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. 

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 Genius 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%3AX659Zy1OOP

cURL request:

curl -X GET --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10&api_key=BookingAPI%3AX659Zy1OOP'

cURL request using Basic Authentication (recommended):

curl -X GET --header 'Accept: application/json' 'https://dataservices.uat.betgenius.com:443/BookingSystem/api/v2/booking/Fixtures?sportId=10' --user BookingAPI:X659Zy1OOP


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 Genius Sports

    CompetitionId

    Integer

    The unique identifier assigned to a competition by Genius Sports

    CompetitionNameStringThe name of the competition

    SportId

    Integer

    The unique identifier assigned to a sport by Genius Sports

    Name

    String

    The name of the fixture

    Date

    String

    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 (see below)

    Feedinline_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 controls

    IsLicensed

    Boolean

    True if you are licensed to use the feed, false otherwise

    Metadata

    inline_model {}

    Origin/Lineups/Multisport

    Origin

    String

    Describes the feed origin

    Lineups

    String

    "True" if fixture has Line-up information

    Multisport

    String

    "True" if fixture is managed by Multisport service, "False" otherwise

    ExternalIdsArray

    An array of ExternalId (see below)

    ExternalIdinline_model {}Source/Id
    SourceStringYour fixture name (if available)
    IdStringYour fixture ID's (if available)


    CustomerFixtureId and ExternalIds are populated only if:

  1. Genius Sports has been asked to provide a fixture matching service to link your existing fixture to the Genius Sports fixture,
  2. The fixture exists in the Customer fixture feed, and
  3. The customer fixture has been successfully matched to a Genius Sports fixture.
  4. 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
  5. 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