Skip to content

Football incident attributes

Some incidents carry more detail than their name. A Goal is not just "Goal" - it can be an own goal, a penalty, scored with the left foot from outside the box, under high pressure, with no goalkeeper in front of it. That detail arrives as attributes[] on the incident's definition in GET /v2/sports/{id}, and it is what the per-sport data reference already renders under each incident that has any.

On the sport definition, not on a match:

{
"id": 413,
"name": "Goal",
"attributes": [
{ "id": 397, "name": "Own goal", "short_name": "own-goal", "sort_order": 1 },
{ "id": 398, "name": "Penalty goal", "short_name": "penalty-goal", "sort_order": 2 }
]
}

sort_order is a flat display order, not a semantic grouping - own goal and penalty goal get orders 1 and 2, but so does an unrelated attribute three groups later. There is no field on the attribute that says which of "Goal type", "Placement", or "Technique of shot" it belongs to.

LayerSourceFreshness
Attribute id and nameSnapshot from GET /v2/sports/{id} in data/reference/sports/, same as other data reference tablesRefreshed when that snapshot is updated (npm run spec:sports or the API-data workflow); rendered on each portal build
Semantic group label ("Goal type", "Placement"...)Curated annotation file in the portal build (incident-attribute-groups.json)curated, football only, partial

Football's incidents render their attributes grouped under these labels on the Soccer data reference page. An attribute with no curated group still renders - under a plain Other heading - instead of silently disappearing. Every other sport's incidents render their attributes the same ungrouped way, since no one has curated groups for them yet.

Match incidents (GET /v2/events/{id}/important-incidents by default, or events_incidents on GET /v2/events/{id} when you already load the match - see Time, clocks and timezones and Show a match timeline) carry the attribute ids that actually happened on a given incident, as a plain array. Resolve each id against the sport definition's incidents[].attributes[] - the same table rendered on the data reference - to get its name and group.