Calendar & Scheduling

Blocked Times

A BlockedTime carves a window out of a practitioner's, room's, or bookable area's calendar so it cannot be booked. Use blocked times for breaks, cleaning slots, internal meetings, or any other reason an otherwise-available resource should be hidden from the booking flow. Blocked times can recur on chosen weekdays via the recurrence payload.

get/shop/blocked-times

List blocked times

listBlockedTimes

Returns every BlockedTime at the given site whose window intersects the date_from..date_to range. Use this to render the operator calendar's "blocked" overlays alongside bookings and appointments.

Both date_from and date_to are required and inclusive.

Requires the RESERVATIONS_VIEW permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

  • date_fromdaterequired

    First date to include in the listing, inclusive. ISO-8601 YYYY-MM-DD in the site's timezone.

  • date_todaterequired

    Last date to include in the listing, inclusive. ISO-8601 YYYY-MM-DD in the site's timezone.

Responses

  • 200

    A list of BlockedTimes falling within the requested date range.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

post/shop/blocked-times

Create a blocked time

createBlockedTime

Carves a window out of one or more resource calendars (practitioners, rooms, or bookable areas). At least one of practitioner_ids, room_ids, or area_ids must be non-empty.

If recurrence.weekdays is set, the server fans the block out across matching weekdays within recurrence.date_from..recurrence.date_to (max 366 days). The first ~30 occurrences are created synchronously; the remainder are queued via an async job.

Requires the RESERVATIONS_MANAGE permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

Request body

  • start_timedate-timerequired

    Start of the blocked window. ISO-8601, in the site's timezone.

  • end_timedate-timerequired

    End of the blocked window. Must be strictly after start_time.

  • typestringrequired

    The kind of block. Drives the calendar icon.

    Possible values:cleaningbreakmeetingother
  • labelstringoptionalnullable

    Optional short label shown on the calendar tile.

  • notesstringoptionalnullable

    Optional longer note (plain text).

  • colorstringoptionalnullable

    Optional hex colour override. Format #rrggbb (lower-case).

  • practitioner_idsstring[]optional

    Practitioners whose calendars should be blocked. Required unless room_ids or area_ids is provided.

  • room_idsstring[]optional

    Rooms to block. Required unless practitioner_ids or area_ids is provided.

  • area_idsstring[]optional

    Bookable areas to block. Required unless practitioner_ids or room_ids is provided.

  • recurrenceobjectoptional

    Optional recurrence configuration sent with a BlockedTime create request. When weekdays is non-empty, the server fans out copies of the blocked time across the matching weekdays in date_from..date_to.

    The configured range cannot exceed 366 days.

Responses

  • 201

    A single BlockedTime.

  • 400

    The request failed.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

get/shop/blocked-times/{blockedTimeId}

Get a blocked time

getBlockedTime

Returns a single BlockedTime by ID. Useful when reopening the calendar tile to edit it, or to verify a record was created with the expected resource targets.

Requires the RESERVATIONS_VIEW permission on the blocked time's site.

Path parameters

Responses

  • 200

    A single BlockedTime.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/blocked-times/{blockedTimeId}

Update a blocked time

updateBlockedTime

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.

Path parameters

Request body

  • start_timedate-timeoptional

    New start of the blocked window. ISO-8601, in the site's timezone.

  • end_timedate-timeoptional

    New end time. Must be strictly after start_time.

  • typestringoptional

    New block type. Drives the calendar icon and the reporting category.

    Possible values:cleaningbreakmeetingother
  • labelstringoptionalnullable

    Replacement short label shown on the calendar tile. Pass null to clear.

  • notesstringoptionalnullable

    Replacement free-form note (plain text). Pass null to clear.

  • colorstringoptionalnullable

    Updated hex colour (#rrggbb).

  • practitioner_idsstring[]optional

    Replace the practitioner targets.

  • old_practitioner_idobject-idoptional

    Existing practitioner ID to swap. Used with new_practitioner_id to update a single calendar without rebuilding the list.

  • new_practitioner_idobject-idoptional

    Replacement practitioner ID for the swap.

  • old_room_idobject-idoptional

    Existing room ID to swap.

  • new_room_idobject-idoptional

    Replacement room ID for the swap.

  • old_area_idobject-idoptional

    Existing bookable-area ID to swap.

  • new_area_idobject-idoptional

    Replacement bookable-area ID for the swap.

Responses

  • 200

    A single BlockedTime.

  • 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

delete/shop/blocked-times/{blockedTimeId}

Delete a blocked time

deleteBlockedTime

Removes a single BlockedTime. Recurring instances must be deleted individually — there is no bulk-delete-the-series operation.

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

Path parameters

Responses

  • 204

    The blocked time was deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found