...
The API service is based on the REST architecture and supports a number of resources accessed with HTTP protocol. The client should send a HTTP GET request and in return will receive a return list document in JSON or XML format. The default response format is JSON. You can change the default response format to XML by adding ".xml" extension after the <resource_name> in the requested URL (please see below). The encoding used in our XML is UTF-8. API support multiple simultaneous requests from authenticated customers.
We have standardized the output for ALL sports, so we offer the same format and data structure. However, for each sports there are different event details, incidents and statistics that are explained in more detail in the Sports data structure section.
...
api_version | Defines which version of API you want to use. The segment is required. Current API version: v2 |
---|---|
resource_name | Defines requested resource_name. The segment is required. |
your_token | Valid token generated during the authentication process |
In the event you would like additional filtering of the data, you can request a combination of the resource query parameters. For example, the following URL returns all events for basketball (sport_id=1): https://api.statscore.com/<api_version>/events?token=<YOUR_TOKEN>&sport_id=1 . The possible parameters for all resources are described in the detailed specifications.
...
The <data> element contains all requested information.
For each request, the HTTP Status code is also returned with a response. A list of all possible HTTP status codes:
...
Internal code | HTTP status | Message |
---|---|---|
Internal code | HTTP status | Message |
1 | 403 | Your membership package has expired or is inactive. For more information, please contact our sales department at sales@statscore.com |
2 | 403 | Invalid credentials. Either the username or the password you provided is incorrect |
3 | 400 | The timestamp parameter you passed is smaller than the allowed minimum limit for this parameter. When getting this error, the <message> element will contains contain more information about the minimal timestamp allowed. In the event you want all the information since our minimal timestamp, do not pass the timestamp parameter |
4 | 400 | Invalid parameter. The format of the parameter is invalid. For more details about the invalid parameter, see the <message> element |
5 | 429 | You have exceeded the data amount you are allowed. For more information, please contact our sales department at sales@statscore.com |
6 | 500 | Internal error. When getting this error code, please try resending your request, also inform our support team at tech-support@statscore.com so we can fix this problem as soon as possible. |
7 | 403 | Your membership package does not include requested sport |
8 | 403 | Your membership package does not include requested season |
9 | 403 | Your host IP for API connection is invalid. |
10 | 403 | Your subscription has expired or is inactive. For more information, please contact our sales department at sales@statscore.com |
11 | 402 | Your membership package does not include requested method or access to this method has expired |
12 | 404 | The requested resource was not found |
13 | 400 | Invalid parameter. The date_from or date_to parameter is invalid. |
14 | 400 | Required parameter is missing. |
15 | 503 | We are performing scheduled maintenance. We should be back shortly |
...
Code Block | ||
---|---|---|
| ||
https://api.softnetsportstatscore.com/<api_version>/<resource_name>/[identifier]?token=<your_token>×tamp=1425992728 |
...
Please note that all dates and times are always displayed in the UTC format. This also applies for the timestamps available at the top of the feed structure. All dates used in our services use the ISO 8601 date and time format. For some resources you can use the query parameter "tz" which determines timezone for the output data. The list of available timezones are is listed below.
Time, date & timezones
...