Links

events.subType

The events.subType include is a powerful feature that provides additional information about a specific entity belonging to a particular type in the Sportmonks' Football API. It allows you to access more detailed data related to an event, such as goals, that falls under a certain type. For example, in the case of events, the type_id can be "GOAL" (id: 14), and the sub_type can provide specific details about the goal, like whether it was scored with the right-foot or the-left foot or the head of the player.

How to use the events.subType include

To leverage the events.subType include, you need to add the "include" parameter in your API request, along with the include: events.subType.
For example, when fetching events, you can use the following parameters: &include=events.subType This will return the events.subType information related to each event, allowing you to access additional details about the events based on their types.

Example

Let's consider an example to illustrate how to utilise the events.subType include in the API request:
https://api.sportmonks.com/v3/football/fixtures/18804445?api_token=YOURTOKEN&include=events.subType
In this example, we retrieve a list of events, and by including the events.subType, we gain access to the additional information associated with each event's type.
The response will contain the relevant events.subType details for each event, providing more context and specificity about the events within the result set.
{
"id": 84076840,
"fixture_id": 18804445,
"period_id": 4800529,
"participant_id": 3468,
"type_id": 14,
"section": "event",
"player_id": 600687,
"related_player_id": 23688922,
"player_name": "Vinicius Junior",
"related_player_name": "Eduardo Camavinga",
"result": "1-0",
"info": null,
"addition": "1st Goal",
"minute": 36,
"extra_minute": null,
"injured": null,
"on_bench": false,
"coach_id": null,
"sub_type_id": 1522,
"subtype": {
"id": 1522,
"name": "Right foot shot",
"code": "right-foot-shot",
"developer_name": "RIGHT_FOOT_SHOT",
"model_type": "sub_event",
"stat_group": null
}
{
"id": 84077392,
"fixture_id": 18804445,
"period_id": 4800546,
"participant_id": 9,
"type_id": 14,
"section": "event",
"player_id": 1371,
"related_player_id": 4842,
"player_name": "Kevin De Bruyne",
"related_player_name": "Ilkay Gündogan",
"result": "1-1",
"info": null,
"addition": "2nd Goal",
"minute": 67,
"extra_minute": null,
"injured": null,
"on_bench": false,
"coach_id": null,
"sub_type_id": 1522,
"subtype": {
"id": 1522,
"name": "Right foot shot",
"code": "right-foot-shot",
"developer_name": "RIGHT_FOOT_SHOT",
"model_type": "sub_event",
"stat_group": null
}