> For the complete documentation index, see [llms.txt](https://docs.kick.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kick.co/api/webhooks/entity-lock-date-changed.md).

# entity.lock\_date.changed

The lock date of one of your business entities was set, moved, or cleared, from Kick or through the Platform API.

An entity's lock date decides which of its books can still change. When an accountant closes a period in Kick, writes your integration makes into it start failing with `409`; when they reopen it, corrections become possible again.

This event tells your integration the moment the cut-off moves, so it can stop writing into a closed period instead of discovering it from failed requests.

### When it fires

The event is sent once each time an entity's lock date changes: when it is set for the first time, moved to another day, or cleared. It fires the same way whether the change was made in Kick under **Settings** → **Locks** or through [Locks](https://docs.kick.co/api/api-reference/locks.md), so a change your own integration makes reaches your endpoint too. Saving the date the entity already has is not a change, and sends no event.

### Payload

```json
{
  "event": "entity.lock_date.changed",
  "version": 1,
  "occurredAt": 1760614200,
  "payload": {
    "entityId": "b6c4d2e1-7a3f-4c8b-9e0d-1f2a3b4c5d6e",
    "workspaceId": "8d3a1b52-9f1d-4a7e-b0a1-2c5d6e7f8a90",
    "date": "2026-09-30",
    "previousDate": "2026-08-31"
  }
}
```

`payload` carries:

| Field          | Type           | Notes                                                                                                                            |
| -------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `entityId`     | uuid           | Entity whose lock date changed, the same `entityId` [Locks](https://docs.kick.co/api/api-reference/locks.md) returns and accepts |
| `workspaceId`  | uuid           | Workspace the entity belongs to                                                                                                  |
| `date`         | string or null | Lock date after the change, as `YYYY-MM-DD`. Null when the change unlocked the entity                                            |
| `previousDate` | string or null | Lock date before the change, as `YYYY-MM-DD`. Null when the entity had no lock date                                              |

Comparing the two dates tells you which way the period moved:

| `previousDate` | `date`          | What happened                                                           |
| -------------- | --------------- | ----------------------------------------------------------------------- |
| null           | a date          | The entity was locked for the first time, or again after being unlocked |
| a date         | a later date    | More of the books were closed                                           |
| a date         | an earlier date | Part of a closed period was reopened                                    |
| a date         | null            | The entity was unlocked                                                 |

The fields around it are the same on every event. See [The event envelope](https://docs.kick.co/api/webhooks.md#the-event-envelope).

### Handling it

Treat `date` as the entity's current cut-off. Hold back journal entry writes and transaction updates, other than `memo`, dated on or before it, since Kick rejects them with `409`. When the date moves earlier or is cleared, writes you held back for the reopened days can go through.

A delivery that fails is retried later, so a newer change can reach you before an older one. Compare `occurredAt` with the last event you applied for the entity, or read the current lock from [Locks](https://docs.kick.co/api/api-reference/locks.md), rather than applying events in arrival order.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kick.co/api/webhooks/entity-lock-date-changed.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
