Introduction

The prematch API call allows the court/field side capture application to download a set of information about the match for use in setting up its environment. This information includes the teams and players involved as well as other information about how the match should be operated.

No API key is required to make this call, instead, a unique streamKey is used. The key is unique to the match and should not be shared with people that are not responsible for operating the capture software. This key is automatically generated when a match is created in the statistics engine where the field liveStream is set to 1.

Before match has started prematch response will return all team players from the competition player table. After the match ended it will return only players which participated in the match.

Character Set

All data provided to these API functions is required to be in UTF-8 format.

All responses will be provided as UTF-8 strings.

Response Format

All responses to API calls will return in the following format

response      
  meta    
    version The version of the API in use
    code The HTTP status code of the response. Options are:
  • 200 Ok
  • 400 Bad Request. The information you passed into the call was missing or incorrect.
  • 401 Unauthorised. The API key used does not have permission to perform the action you have requested.
  • 404 Not Found. The function cannot be found.
  • 500 Internal Server Error. There was an error on the server.
    status The status of the response. Options are:
  • success
  • failure

If the bulk parameter is used in the call then the status of the call will be a success even if all the individual data elements generate errors.

    request The request path/query string for which this is the response
    time Unix timestamp for the response
    count For a successful request, how many records are being returned
    limit For this request, what was the record limit being applied
  data    
    Successful Requests
      For successful requests this node will contain the information that is specified to be returned in the documentation for the individual call.
    Unsuccessful Requests
    error The type of error. Options:
  • KEY_INVALID The API key is not valid
  • NOTFOUND You have requested an invalid action
  • NOTAUTHORISED You do not have permission to perform that action on the data you have requested
  • DATA_INVALID Some or all of the data you provided with the API call is missing/invalid
  • ERROR An error that doesn't fit into the above categories, you should check the description for more information.
    description A more detailed description of the error, if available.