Statistics types
Last updated
Was this helpful?
Last updated
Was this helpful?
We introduced and to ensure data quality and consistency for specific fields. Something has a type when there are multiple variants of a particular variant. Sounds difficult? Let's explain with an example:
As you’ve learned in our , you can quickly enrich your request by using includes. You can obtain the statistics for your favourite fixture by adding the &include=statistics
to your request. So, for example, the Celtic vs. Rangers fixture:
This request returns all the match statistics of both teams for the requested fixture. As you might have noticed, you receive a lot of values belonging to different type ids. What does this mean exactly?
Just add the nested &include=statistics.type
to receive a textual representation:
Now you can distinguish between the various match statistics for both teams.
Including .type
is not recommended as an include on any endpoint. Types are used throughout the entire API. We recommend retrieving all types from the types endpoint and storing them in your database or other data structure. Only include the type if no other option is available or when testing the API.
With this in mind, dive into one of our statistics tutorials:
Interested in an overview of all statistics types? Check our overview page.