Coaches
Retrieve detailed coach information via one of our coaches' endpoints. You can retrieve more detailed information by using the correct includes. This section will briefly discuss all the options available to request coaches.
An overview of all the options available:
GET All Coaches: returns all the coaches available within your subscription.
GET Coaches by ID: returns coach information from your requested coach ID.
GET Coaches by Country ID: returns coach information from your requested country ID.
GET Coaches Search by Name: returns all the coaches that match your search query.
GET Last Updated Coaches: returns all the coaches that have received updates in the past two hours.
For all the coaches' endpoints the base URL is the same: URL:
https://api.sportmonks.com/v3/football/coachesPer endpoint the rest of the URL requires additional information. We will explain this per endpoint.
Requesting coaches
GET All Coaches
Every team has a coach. Most of our customers use the GET All Coaches endpoint to get an overview of all coaches within their subscription.
The URL to get all your coaches is the same as the base URL for coaches. All you have to do is authorize the request with your API token. Check our authentication section for more info.
https://api.sportmonks.com/v3/football/coaches?api_token=YOUR_TOKENAs you can see, the coach and player id are included in the response. Also, the nationality, name, image, height and weight, date of birth and gender are included in this basic response. Obviously, there is way more information about this coach, which we can get by adding includes. A couple of examples will be explained a little further. At the endpoint overview all includes can be found.
Now that you've requested all the coaches, you also know their unique coach id. You can use this id in the second option: GET Coach by ID.
GET Coaches by ID
This endpoint is useful if you only want information about one particular coach. You need to add the coach_id to your request:
For example, if you’re interested in information about Giovanni van Bronckhorst (coach id: 23237).
GET Coaches by Country ID
Comes in handy if you want to find out how many coaches from a certain country are included in your subscription. You need to add the country_id to your request:
In the previous request, we saw the country id of the Netherlands (Giovanni van Bronckhorst) is 38.
Getting the current coach of a team
To get all coaches associated with a team, use the coaches include on the teams endpoint:
This returns the full coaching history for the team. Each record includes an active field. Filter on active: true to identify the current coach:
coach_id
The coach's ID. Use this with GET Coach by ID for full coach details
integer
position_id
The coaching role. Resolve via the types endpoint
integer
active
Whether this is the current appointment. Filter on true to get the current coach
boolean
start
Appointment start date in YYYY-MM-DD format
string
end
Appointment end date in YYYY-MM-DD format
string
temporary
Whether the appointment is temporary or caretaker
boolean
To resolve the coach's name and details in the same request, chain the nested include:
GET Coaches Search by Name
You want the information about Giovanni van Bronckhorst. However, you don’t know the coach id or country id. Well, we have an endpoint to use his name and get the information you need. The GET Coaches Search by Name endpoint, in order to do this you need to add the /search/{search_query}to your request:
For example
GET Last Updated Coaches
This endpoint returns all the coaches that have received updates in the past two hours. This comes in handy to keep your database in sync. You’ll need to add /latest to the coaches base URL:
For example
Adding useful information
As you’ve learnt in the includes tutorial, you can enrich your request with includes. This section will discuss some of the most common requests on the coaches' endpoints.
First of all, you can find a list of all available includes on the endpoint pages. For the coaches, the most commonly used includes are teams ,statistics ,nationality.
For example, if we want all the above information about Giovanni van Bronckhorst (coach id: 23237).
Selecting and filtering
In our filtering tutorial 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 coach. We can imagine you’re not interested in all the coach data the API returns. Let’s say you’re only interested in the coach name and image.
We’re going to use the GET Coach by ID endpoint for this example.
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:
Last updated
Was this helpful?