Another way to book matches is to use the API directly. With the help of several endpoints, the user is able to find a match, book or unbook it and check the currently booked matches for a selected period of time.
Selection of the event: events.index
To check the Scoutsfeed match offer, please use endpoint events.index with your unique token:
https://api.statscore.com/v2/events?token=YOURTOKEN
Basic use of this method will return all matches offered in the STATSCORE API, so you should extend the query with a few key parameters:
scoutsfeed - Required value = yes. Parameter will return only events available on the Scoutsfeed product.
date_from - Selection datetime, format 'yyyy-mm-dd hh:mm:ss'. Date from which events should be returned. If you use a single date_from parameter you will receive all events that start in the 24 hours from requested date
date_to - Selection datetime, format 'yyyy-mm-dd hh:mm:ss'. End date of returned events. The maximum period beetwen date_from and date_to parameter is 30 days. This rule is not valid when you use the following query parameter in your request: season_id, stage_id, group_id, participant_id
coverage_type - Determines coverage type. Possible values:
from_venue - means the scout is relaying the event directly from the stadium (max. latency 1 second)
from_tv - means the scout is relaying the event from low latency TV transmission (max. latency 6 seconds)
The query can be extended with some additional parameters:
events_details - Determines if subnodes of events will be visible. Possible values:
yes - events subnodes will be shown
no - events subnodes will not be shown
sport_id - Determines the sport identifier in which the events are played. Possibility to input multiple identifiers, separated by comma. The complete list of possible sports can be retrieved using the API resource: sports.index
competition_id - Determines the competition identifier in which the events are played. Possibility to input multiple identifiers, separated by comma. The complete list of possible competitions can be retrieved using the API resource: competitions.index
season_id - Determines the season identifier in which the events are played. Possibility to input multiple identifiers, separated by comma. The complete list of possible seasons can be retrieved using the API resource: seasons.index
timestamp - Selection date, format UNIX_TIMESTAMP. Only changes in events that occurred or were updated after this timestamp will be returned.
Below is an example query that allows you to check offered matches for a specific time period with coverage type = from venue:
https://api.statscore.com/v2/events?token=YOURTOKEN&date_from=2020-12-15 00:00:00&date_to=2020-12-31 00:00:00&coverage_type=from_venue&scoutsfeed=yes
More details in the events.index endpoint documentation.
Booking of the event: booked-events.create
To book a match, use the POST method for the booked-events.create endpoint with your unique token:
https://api.statscore.com/v2/events?token=YOURTOKEN
In order for the match to be booked correctly, the basic request should be extended with several required parameters:
product - Required value =scoutsfeed
event_id - The requested event identifier. Could be found in the events.index method described above
client_id - Assigned to you by the API administrator
Below is an example query that allows you to book selected match:
https://api.statscore.com/v2/booked-events?token=YOURTOKEN&product=scoutsfeed&event_id=2750161&client_id=XXX
More details in the booked-events.create endpoint documentation.
Unbooking of the event: booked-events.delete
To unbook a match, use the DELETE method for the booked-events.delete endpoint (with your unique token) which contains the event_id of the event to be unbooked:
https://api.statscore.com/v2/booked-events/{event_id}?token=YOURTOKEN
In order for the match to be unbooked correctly, the basic request should be extended with several required parameters:
product - Required value =scoutsfeed
client_id - Assigned to you by the API administrator
Below is an example query that allows you to book selected match:
https://api.statscore.com/v2/booked-events/2750161?token=YOURTOKEN&product=scoutsfeed&client_id=XXX
More details in the booked-events.delete endpoint documentation.
Returning of the events booked by the client: booked-events.show
To return the list of booked events, use the GET method for the booked-events.show endpoint with your unique token:
https://api.statscore.com/v2/booked-events?&token=YOURTOKEN
In order to return the list of booked events, the basic request should be extended with several required parameters:
product - Required value =scoutsfeed
client_id - Assigned to you by the API administrator
Below is an example query that allows you to book selected match:
https://api.statscore.com/v2/booked-events?client_id=XXX&token=YOURTOKEN&product=scoutsfeed
More details in the booked-events.show endpoint documentation.