---
title: "Update a blocked time"
method: PUT
path: "/shop/blocked-times/{blockedTimeId}"
tags: ["BlockedTimes"]
---

# Update a blocked time

`PUT /shop/blocked-times/{blockedTimeId}`

Updates an existing `BlockedTime`. Fields are individually
optional. Use the `old_*` / `new_*` pairs to swap a single
resource (practitioner, room, or area) without resubmitting the
full ID list.

The response is `201 Created` when the update split a recurring
blocked time into a new instance (so a new ID is returned) and
`200 OK` otherwise.

Requires the `RESERVATIONS_MANAGE` permission on the blocked
time's site.

## Request body

- object
  - `start_time` string, date-time — New start of the blocked window. ISO-8601, in the site's timezone.
  - `end_time` string, date-time — New end time. Must be strictly after `start_time`.
  - `type` 'cleaning' | 'break' | 'meeting' | 'other' — New block type. Drives the calendar icon and the reporting category.
  - `label` string, nullable — Replacement short label shown on the calendar tile. Pass `null` to clear.
  - `notes` string, nullable — Replacement free-form note (plain text). Pass `null` to clear.
  - `color` string, nullable — Updated hex colour (`#rrggbb`).
  - `practitioner_ids` string[] — Replace the practitioner targets.
  - `old_practitioner_id` string, object-id — Existing practitioner ID to swap. Used with `new_practitioner_id` to update a single calendar without rebuilding the list.
  - `new_practitioner_id` string, object-id — Replacement practitioner ID for the swap.
  - `old_room_id` string, object-id — Existing room ID to swap.
  - `new_room_id` string, object-id — Replacement room ID for the swap.
  - `old_area_id` string, object-id — Existing bookable-area ID to swap.
  - `new_area_id` string, object-id — Replacement bookable-area ID for the swap.

## Response `200`

A single `BlockedTime`.

- object
  - `data` BlockedTime, required — A `BlockedTime` carves a window out of one or more resource calendars (practitioners, rooms, or bookable areas) so they cannot be booked during that window. Use blocked times for breaks, cleaning, internal meetings, or any other reason an otherwise-available resource should be hidden from availability. At least one of `practitioner_ids`, `room_ids`, or `area_ids` must be non-empty — a blocked time always targets at least one resource.
    - `id` string, object-id, required — Unique identifier for the blocked time.
    - `start_time` string, date-time, required — Start of the blocked window. Stored as a date-time in the site's timezone.
    - `end_time` string, date-time, required — End of the blocked window. Must be strictly after `start_time`.
    - `type` 'cleaning' | 'break' | 'meeting' | 'other', required — The kind of block. Drives the icon shown on the operator calendar and acts as an audit aid.
    - `label` string, nullable — Optional short label shown on the calendar tile. Plain text only.
    - `notes` string, nullable — Optional longer note (free-form, plain text). Visible to operators on the calendar tile.
    - `color` string, nullable — Optional hex colour (`#RRGGBB`, lower-case) to override the default colour for this `type` on the calendar.
    - `practitioner_ids` string[], required — Practitioner calendars covered by this blocked time. May be empty if the block targets rooms or areas only.
    - `room_ids` string[], required — Room calendars covered by this blocked time. May be empty.
    - `area_ids` string[], required — Bookable-area calendars covered by this blocked time. May be empty.
    - `site_id` string, uuid, required — ID of the site this blocked time belongs to.
    - `organisation_id` string, uuid, required — ID of the organisation that owns this blocked time.

## Other responses

- `201` — A single `BlockedTime`.
- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
