# Calendar event updates

Snapshots of each time a calendar event is updated

Endpoint: `https://api.bookingmood.com/v1/calendar_event_updates`, supporting `GET`. Authenticate with the header `Authorization: Bearer YOUR_API_KEY` (see [authentication](https://www.bookingmood.com/hr-HR/api-reference/authentication.md)).

## The calendar event update object

| Attribute | Type | Description |
| --- | --- | --- |
| `id` | `uuid` | Unique identifier. |
| `calendar_event_id` | `uuid` | Identifier of the related calendar event. References [`calendar_events.id`](https://www.bookingmood.com/hr-HR/api-reference/calendar_events.md). |
| `next_product_id` | `uuid` | Identifier of the unit of the event after the update. References [`products.id`](https://www.bookingmood.com/hr-HR/api-reference/products.md). |
| `prev_product_id` | `uuid` | Identifier of the unit of the event before the update. References [`products.id`](https://www.bookingmood.com/hr-HR/api-reference/products.md). |
| `user_id` | `uuid \| null` | Identifier of the user or system that made the update. |
| `created_at` | `timestamp with time zone` | Creation timestamp. Read-only: set by the database. |
| `next_interval` | `daterange` | Interval of the event after the update. |
| `next_status` | `CalendarEventStatus` | Status of the event after the update. |
| `prev_interval` | `daterange` | Interval of the event before the update. |
| `prev_status` | `CalendarEventStatus` | Status of the event before the update. |

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "calendar_event_id": "00000000-0000-0000-0000-000000000000",
  "next_product_id": "00000000-0000-0000-0000-000000000000",
  "prev_product_id": "00000000-0000-0000-0000-000000000000",
  "user_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-10-30T23:37:06.667Z",
  "next_interval": null,
  "next_status": "CANCELLED",
  "prev_interval": null,
  "prev_status": "CANCELLED"
}
```

### Types

```typescript
type CalendarEventStatus = "CONFIRMED" | "TENTATIVE" | "CANCELLED";
```

### Related resources

Embed related resources with the [`select` parameter](https://www.bookingmood.com/hr-HR/api-reference/selecting.md), e.g. `select=*,calendar_events(*)`. Resources related through more than one column need the column as a hint, like `table!column(*)`.

| Embed | Type | Description |
| --- | --- | --- |
| `calendar_events(*)` | `object \| null` | The [calendar event](https://www.bookingmood.com/hr-HR/api-reference/calendar_events.md) referenced by `calendar_event_id`. |
| `products!next_product_id(*)` | `object \| null` | The [product](https://www.bookingmood.com/hr-HR/api-reference/products.md) referenced by `next_product_id`. |
| `products!prev_product_id(*)` | `object \| null` | The [product](https://www.bookingmood.com/hr-HR/api-reference/products.md) referenced by `prev_product_id`. |

## List calendar event updates

`GET /v1/calendar_event_updates`

Filter on any attribute with `column=operator.value` (see [filtering](https://www.bookingmood.com/hr-HR/api-reference/filtering.md)). Choose columns and embed related resources with `select` (see [selecting](https://www.bookingmood.com/hr-HR/api-reference/selecting.md)), and sort and paginate with `order`, `limit` and `offset` (see [sorting and pagination](https://www.bookingmood.com/hr-HR/api-reference/sorting-pagination.md)).

```bash
curl -X GET "https://api.bookingmood.com/v1/calendar_event_updates?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Responses:

- `200`: A list of calendar event updates with the selected columns. `206` when the list is a partial range.
- `400`: The request is malformed, for example an unknown column or an invalid filter.
- `401`: The API key is missing or invalid.

Errors have a JSON body with a `code`, `message`, `details` and `hint`. See the [introduction](https://www.bookingmood.com/hr-HR/api-reference.md) for more on errors. The full API is described by the OpenAPI spec at https://api.bookingmood.com/v1/openapi.json.
