Most of the methods use a RESTful API design. This means that you make use of the standard HTTP methods (GET, POST, DELETE, PUT).
x-api-key string |
API Key. Your API key identifies you to the system, and specifies your access and quota. This parameter is required on all API calls. See Authentication for more information. |
fields string |
Used to only return a portion of the response. See Partial Response for more information. |
ak string |
|
limit integer |
Limit the number of records returned by the method. Default is 10, the maximum is 500. See Paging for more information. |
offset integer |
Ignore the first number of records in the result. See Paging for more information. |
responseOk enum |
The request should always return a HTTP status code of 200, regardless of any errors.
|
format enum |
The format to return the data in.
|
Each API call must include the header parameter x-api-key
It is this API key that identifies each call and applies any permissions or quotas. You will be provided this key on signup and you should keep it secret.
It is still possible to specify your API key via the ak
query string parameter, however this is not a safe way to exchange the key and is DEPRECATED
. If you set both the header and query string parameter, the header parameter will be taken in preference.
All data provided to these API functions is required to be in UTF-8 format.
All responses will be provided as UTF-8 strings.
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:
|
||
status |
The status of the response. Options are:
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:
|
||
description |
A more detailed description of the error, if available. |
For ease of consumption or for better performance, you can ask the server to return only a subset of the fields that would normally be returned.
To request a partial response, the fields
parameter is used.
The value of the fields
parameter is a comma-separated list of fields.
Normal Request
/v1/basketball/leagues/1
Request for Partial Response
/v1/basketball/leagues/1?fields=leagueId,name
Caching strategy should be used, however there may be circumstances where data is removed or changed. Because of this you should be refreshing data at appropriate intervals
Each API call returns 10 records to a maximum of 500 records, based on the use of the limit
parameter. However if there are more than 500 records available these records can be accessed by using the offset
parameter.
The offset parameter will return 'limit' rows of data starting at the 'offset + 1' row.
As part of the response meta data there are two fields, limit
and count
. If limit == count then you should make another call with offset = limit+1.
Returns records 1 - 10
/v1/basketball/leagues/1?limit=10
Returns records 11 - 20
/v1/basketball/leagues/1?limit=10&offset=10
Numerous entities have a field called externalId
. This externalId field is the primary key or unique identifier of this object in the third party system which created this entity.
The externalId of a record MUST be unique for that league.
A number of API calls (not all) support the parameter useExternalForLeague
. If this parameter is set to the leagueId of the league for which this externalId applies, then the following fields will be converted to their externalId counterparts.
The above fields are converted in both query strings and body data.
Note: All fields listed above are converted. You cannot mix normal ids with externalIds in the same call.
If teamId 45 of league 34 has an externalId of TEAM1234 then the following two calls are equivalent.
/v1/basketball/teams/45
/v1/basketball/teams/TEAM1234?useExternalForLeague=34
entityType | uploadType | entityId |
---|---|---|
league |
logo |
leagueId |
club |
logo |
clubId |
club |
jersey |
clubId |
competition |
logo |
competitionId |
team |
logo |
teamId |
team |
photo |
teamId |
person |
photo |
personId |
uniform |
photo |
uniformId |
The system will only accept image uploads of the following types:
image/png
image/jpeg
It is strongly recommended to upload PNG files with an alpha channel. This ensures the most flexible usage of the images.
The file being uploaded must be under 512Kb in size.
The image file being uploaded should be square in size and not larger than 1024x1024. If the image is not square then it will be automatically padded with tranparent (or white depending on image format) pixels to achieve a square image.
The system will automatically generate images at defined sizes:
T1
- 75x75S1
- 200x200M1
- 400x400L1
- 600x600If the initial image is smaller than one of the defined sizes, then that size will not be generated. eg. An initial image of 400x400 will not generate an image of 600x600.
Qualifications for a particular statistic (statisticCode
) are performed by comparing another statistic (checkStatisticCode
) against a fixed value (value
). This comparison operation is set by the comparison
value. The statisticCode and checkStatisticCode can be the same if you are checking the statistic against itself.
For a particular action an event can have 1 type, 1 subtype and any number of qualifiers
If qualifiers are able to be used for a particular action/subType, then any number of qualifiers may be applied to the action.
If the subType indicates (blank) this means that the action can be used without a subType.
type | subType | qualifiers | |
---|---|---|---|
game |
start |
||
end |
Applies to end subType:
|
||
period |
start |
Applies to start subType:
|
players: send qualifiers as string |team1Libero1:pno1, team1Libero2:pno2, team2Libero1:pno3, team2Libero2:pno4|. ex.:
"team1Libero1:7",
|
end |
Applies to end subType:
|
||
playersRotation |
(empty) |
Applies to all subTypes:
|
|
comment |
(empty) |
Comment text should be passed in the value field | |
assist |
(empty) |
||
attack |
(empty) |
Applies to all subTypes:
|
|
firstBall |
|||
firstTransition |
|||
transition |
|||
ballHandlingError |
(empty) |
||
block |
Applies to all subTypes:
|
|
|
error |
Applies to error subType:
|
||
in |
Applies to in subType:
|
||
over |
Applies to over subType:
|
||
challengeOutcome |
(empty) |
Applies to all subTypes:
|
|
challengeRequest |
Applies to all subTypes:
|
|
|
afterRally |
|||
duringRally |
|||
cointoss |
(empty) |
Applies to all subTypes:
|
|
startofgame |
|||
tiebreak |
|||
dig |
Applies to all subType:
|
||
error |
|||
in |
Applies to in subType:
|
||
over |
|||
freeBall |
|||
error |
|||
in |
Applies to in subType:
|
||
over |
|||
gameSetWin |
(empty) |
Overwrites sPeriodsWon statistic. Should be used after period :end action. |
|
injury |
|||
officialInjury |
|||
playerInjury |
|||
staffInjury |
|||
liberoReplace |
(empty) |
||
liberoUnableToPlay |
(empty) |
||
point |
Applies to all subTypes:
|
|
|
ace |
|||
attack |
Applies to attack subType:
|
||
block |
|||
error |
|||
protest |
(empty) |
||
reception |
Applies to all subType:
|
||
error |
Applies to error subType:
|
||
in |
Applies to in subType:
|
||
over |
Applies to over subType:
|
||
replay |
(empty) |
||
sanction |
Applies to all subTypes:
|
|
|
player |
|||
staff |
Applies to staff subType:
|
||
team |
|||
serve |
Applies to all subTypes:
|
|
|
firstSetServe |
|||
set |
|||
error |
|||
in |
Applies to in subType:
|
||
over |
|||
substitution |
Applies to all subTypes:
|
||
(empty) |
Applies to (empty) subType:
|
|
|
in |
|||
out |
|||
bulksubstitution |
Applies to all subTypes:
|
|
|
in |
|||
out |
|||
court |
enters |
Applies to enters subType:
|
|
exits |
|
||
switch |
|
||
team |
lose |
Applies to lose subType:
|
|
timeout |
Applies to all subTypes (except team ):
|
|
|
facultative |
|||
media |
|||
technical |
|||
team |
|||
participated |
Applies to all subTypes:
|
|
type | subType | qualifiers | |
---|---|---|---|
status |
Indicates a change in the status of the match | ||
delayed |
|
The start time of the match has been changed. The delay in minutes should be passed in the value field. Negative delays are allowed (to indicate early start). | |
loaded |
The match has been loaded in the software | ||
ready |
The match is ready to proceed in the software and the teams have been loaded | ||
inprogress |
The match is currently in progress | ||
periodbreak |
The match is currently in progress, but in a break between periods | ||
interrupted |
|
The match has been stopped temporarily and will resume after a delay. The delay in minutes should be passed in the value field. The qualifiers can be used to give a reason for the delay. | |
cancelled |
The match will not be started | ||
abandoned |
The match has been stopped and will not restart | ||
rescheduled |
The match has been stopped (or has not started) and will not start/restart. It will be played again at another time. | ||
finished |
The match has come to the end | ||
protested |
The match has come to the end, but the result has been protested | ||
complete |
The match is complete, all scores have been confirmed and result is official | ||
periodstatus |
Indicates a change in the period status | ||
pending |
Indicates the period is about to start | ||
started |
Indicates the period has started | ||
ended |
Indicates the period has ended | ||
confirmed |
Indicates that scores have been confirmed for the period | ||
capturestatus |
Applies to all subTypes:
|
||
unreliable |
Indicates that the state of the game being sent by the software differs significantly from the actual situation. | ||
reliable |
Indicates that the state of the game being sent by the software now matches the actual situation. | ||
risk |
(empty) |
|