> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-events/delete-update-approach.md).

# DELETE/UPDATE approach

### Overview

Live event changes are expressed through the `action` field.

The possible values are `ADD`, `UPDATE`, and `DELETE`.

This page explains how `UPDATE` and `DELETE` messages are shaped.

### Update behavior

Updates use the `UPDATE` action.

Updates follow a full payload pattern.

That means the message includes the changed fields and the unchanged fields in the same payload.

Consumers should replace the previously stored version of the event with the new one.

### UPDATE message example

{% code title="UPDATE message" overflow="wrap" expandable="true" %}

```json
{
  "specversion": "1.0",
  "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
  "source": "/tournaments/1971",
  "type": "Event.Sport.Golf",
  "time": "2026-05-04T14:23:01.123Z",
  "tournamentid": 1971,
  "datacontenttype": "application/json",
  "data": {
    "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
    "action": "UPDATE",
    "type": "Event.Sport.Golf.BallHoled",
    "created_at": "2026-04-24T11:09:15.267Z",
    "sport_event": {
      "id": "sr:match:67607764"
    },
    "payload": {
      "event_time": "2026-04-24T11:09:15.267Z"
      ......... // event specific data
    }
  }
}
```

{% endcode %}

### Delete behavior

Deletes use the `DELETE` action.

The message identifies an event that was previously sent and should now be removed.

For `DELETE`, only `id`, `action`, `created_at`, and `sport_event` are included inside `data`.

The `payload` field is omitted.

`data.id` refers to the previously sent event that is being deleted.

### DELETE message example

{% code title="DELETE message" overflow="wrap" expandable="true" %}

```json
{
  "specversion": "1.0",
  "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
  "source": "/tournaments/1971",
  "type": "Event.Sport.Golf",
  "time": "2026-05-04T14:23:01.123Z",
  "tournamentid": 1971,
  "datacontenttype": "application/json",
  "data": {
    "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
    "action": "DELETE",
    "created_at": "2026-04-24T11:09:15.267Z",
    "sport_event": {
      "id": "sr:match:67607764"
    }
  }
}
```

{% endcode %}

### What to do in your consumer

* Treat `UPDATE` as a replacement of the previous event version.
* Treat `DELETE` as removal of the referenced event.
* Use `data.id` as the stable event identifier across versions.

{% hint style="info" %}
The outer WebSocket envelope stays the same. Only the `data.action` and `data` content differ.
{% endhint %}

### Related pages

* [Live Events](/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-events/live-events.md)
* [Round Events](/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-event-types/round-events-sportevent.md)
* [Hole Events](/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-event-types/hole-events.md)


---

# 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.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-events/delete-update-approach.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.
