> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/help-center/football/cancelled-goal-handling.md).

# 'Cancelled goal' handling

### Using the `score` field in Real-time data API endpoint

When a goal is scored, the `score` field in the [**Real-time data**](/thesports-docs/basic-data/real-time-data.md) API endpoint may first report a score of `1-0`. If the referee later cancels the goal after a review, the API endpoint reports the corrected score of `0-0`.

Compare consecutive updates to the `score` field. If the latest score is lower than the previous score, the frontend can display a 'Goal Cancelled' notification.

We recommend using the `score` field as the basis for detecting cancelled goals and displaying frontend notifications.

### **Using the `incidents` field** in Real-time data API endpoint

The `incidents` field does not include a dedicated incident type for a cancelled goal.

When a `type: 28` (VAR) incident is generated, the response may also include the related `var_reason` and `var_result` values.

For example:

1. A goal is scored, and the API endpoint first returns a `goal` incident.
2. A VAR review takes place, and the API endpoint returns a separate `VAR` incident.
3. If the original goal decision is overturned, the VAR incident returns `var_reason: 1` and `var_result: 2`.
4. The previously returned `goal` incident is omitted from the next response.

#### Suggestion

We recommend using `incidents` field for display purposes only. Do not use this field to determine whether the score should be rolled back.&#x20;

Use the `score` field as the source of truth for score corrections and 'Goal Cancelled' notifications.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thesports.com/help-center/football/cancelled-goal-handling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
