Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Customers are being integrated by pairing events identifiers (ID's). STATSCORE is responsible for the automatic pairing process that should cover the major of the mappings. The whole integration process is described in this document.
The only requirement for the customer is to provide us with the list of teams and events.


The teams data are being used by STATSCORE to make the “initial mapping” with the teams STATSCORE use.
Initial mapping is done only once (it’s not repetitive process).
The new teams or players will be mapped (automatically or manually) during the Events-Mapping process.

Teams list can be provided in the file (json, csv, xls).

Expected data is:

  • sport_id

  • sport_name

  • team_id

  • team_name

  • gender (optional)

  • country_name (optioinal)

At this step it is good to check and answer on below questions:

  • are the teams duplicated in your database? Is there a single representation of for example Fc Barcelona team? Or is it maybe duplicated in various leagues? Then maybe it’s better for us to map by “team_name” not by “team_id”

  • is there a gender indicator for the teams? Maybe you are using it in the team name like: “Fc Barcelona (W)” for Womans team.

  • in case you are a Sportsbook provider - is there “generic” team_id available or we need to map all your customers separately?

JSON example

[{
"sport_id": 1,
"sport_name": "basketball",
"team_id": 222,
"team_name": "FC Barcelona",
"gender": "male", 
"country_name": "Spain"
},

{...}

CSV example

"sport_id","sport_name","team_id","team_name","gender","country_name"
”1”,”basketball”,”222”,”Fc Barcelona”,”male”,”Spain”
...


The events data are being used by STATSCORE to make the pre-match or live offer mapped with the events STATSCORE offers.
In standard integration our mapping engine will request your end-point:
- in every 10 minutes for the games from the next 3 days
- in average every 24 hours for the games from the next 2 weeks

Please note:

  • The list of JSON events should be ordered by start_date that is ascending. It should start from the current date and include also "live" events that have already started.

  • The list of JSON events should be limited to prevent server overload when customers have got thousands of events in the feed. This can be achieved by using filters like:

    • Filter by dates in the query ("date_from=2015-09-10&date_to=2015-09-11).

    • Filter by sport_id separated by comma f.e. sport_id=1,3,5,7, would be good additional feature.

  • The maximum size of the JSON events should not be greater than 2 MB and if there is more data it should be paginated.

  • The maximum execution time of the JSON events should not be longer than 30 seconds.

  • In case when prematch ID is different than the inplay we need to have separate event list for both (concerns PrematchPro customers only).


How to find mapped events

Mapped event identifiers are provided by STATSCORE in the API method named booked-events.
Example: https://api.statscore.com/v2/booked-events?product=livescorepro&client_id=2&mapped_status=mapped
In this method customer can find his own event ID (client_event_id attribute) and corresponded STATSCORE event ID (id attribute).

Returned data is:

  • id (numeric) - STATSCORE event id that can be used in the script that displays widgets (trackers) on your front-end application.

  • client_event_id (string) - this is your internal event id mapped with above STATSCORE event id

Please note:

All the requests to the booked-events API end-point should be made from your backend server (not from the front-end).
In case when there is more that 1000 (1K) requests made within 5 minutes your IP can be automatically blocked on our Load Balancer.

Booked-evnets,json

[{
"id": 123456,
"client_event_id": "123456789",
...
},
{
"id": 567890,
"client_event_id": "qweoy28qry8r7yq83",
...
}]


  • No labels