Referees
Last updated
Was this helpful?
Last updated
Was this helpful?
Retrieve detailed referee information via one of our referees' endpoints. You can retrieve more detailed information by using the correct includes. This section will briefly discuss all the options available to request referees.
An overview of all the options available:
GET All Referees: returns all the referees available within your subscription.
GET Referees by ID: returns referee information from your requested referee ID.
GET Referees by Country ID: returns referee information from your requested country ID.
GET Referees Search by Name: returns all the referees that match your search query.
For all the referees; endpoints the base URL is the same: URL: https://api.sportmonks.com/v3/football/referees
Per endpoint the rest of the URL requires additional information. We will explain this per endpoint.
Gather an overview of all referees available in your subscription via the to get an overview of all referees within their subscription.
The URL to get all your referees is the same as the base URL for referees. All you have to do is authorize the request with your API token. Check our for more info.
You can see the referees' name, the unique referee id and some other data.
This endpoint is useful if you only want information about one particular referee. You need to add the referee_id
to your request:
https://api.sportmonks.com/v3/football/referees
/{referee_id}
Letโs say we want the information about Crawford Allan. (referee id: 70306).
Letโs say, we want all Scottish referees. You need to add the country_id
to your request:
https://api.sportmonks.com/v3/football/referees
/countries/{country_id}
https://api.sportmonks.com/v3/football/referees
/search/{search_query}
For example, if we want statistics of Crawford Allan(referee id: 70306).
You can add the &select=
parameter followed by the fields you want. In our case: name,image_path
. This results in the below request and response:
Now that you've requested all the referees, you also know their unique referee id. You can use this id in the second option:
You want the information about your favourite referee. However, you donโt know the referee id or country id. Well, we have an endpoint to use his name and get the information you need. The , in order to do this you need to add the /search/{search_query}
to your request:
As youโve learnt in the , you can enrich your request with includes. This section will discuss some of the most common requests on the referees' endpoints.
First of all, you can find a list of all available includes on the . For the referees, the most commonly used includes is statistics
.
In our youโve learnt how to select specific fields or filter only on the data youโre interested in. By default, our API returns a set of data related to the referee. We can imagine youโre not interested in all the referee data the API returns. Letโs say youโre only interested in the referee name and image.
Weโre going to use the for this example.
Check our for more information and tips.