---
title: "Override the rota for a single date"
method: POST
path: "/shop/practitioners/{practitionerId}/rota-for-date"
tags: ["Practitioners"]
---

# Override the rota for a single date

`POST /shop/practitioners/{practitionerId}/rota-for-date`

Sets the working schedule for a single date for the given
practitioner via custom availability rules. The endpoint is
idempotent for the requested date: existing custom rules covering
the date are cleared (or trimmed if they extend beyond the date)
before the new rules are applied.

Submitting an empty `availability_rules` array — or omitting the
key — blocks the practitioner for the entire day. Submitting
rules that match the regular rota leaves the rota in charge with
no custom rules created.

Returns the same shape as the GET endpoint so callers can re-render
without a follow-up fetch.

Requires the `ROTAS_MANAGE` permission on the practitioner's first
site.

## Request body

- object
  - `date` string, date, required — The ISO 8601 date (`YYYY-MM-DD`) to override, interpreted in the practitioner's timezone.
  - `availability_rules` object[] — The working windows to apply for the date. Each rule defines a start and end time. Submitting an empty array (or omitting the key) blocks the practitioner for the entire date.
    - `time_from` string, required — Start time of the window in `HH:MM` 24-hour format. Must be strictly less than `time_to`.
    - `time_to` string, required — End time of the window in `HH:MM` 24-hour format. Must be strictly greater than `time_from`.
    - `is_available` true — Only `true` (the default) is currently accepted — blocked windows are expressed by omitting the rule, not by sending `is_available: false`. Sent explicitly only by older callers; new integrations should leave it out.
    - `room_id` string, object-id, nullable — The room the practitioner is assigned to during this window. `null` (or omitted) means the practitioner is not linked to a specific room for this window. Only used when the submitted rules differ from the rota's rules for the date; ignored if the rules match the rota.
    - `offerings` OfferingIdentifier[] — The offerings the practitioner is assigned to during this window. An empty array (or omitted) means the practitioner is not linked to specific offerings for this window. Only used when the submitted rules differ from the rota's rules for the date; ignored if the rules match the rota.
      - `offering_id` string, mongo-id, required — The ID of the offering.
      - `offering_name` string, required — The name of the offering.
      - `offering_type` 'appointment' | 'appointment_enquiry' | 'area_booking' | 'course' | 'hotel_room_reservation' | 'membership' | 'package' | 'product' | 'session' | 'table_reservation' | 'voucher', required — Discriminator describing what kind of sellable item an `Offering` represents. The value determines which downstream schema (`Appointment`, `Session`, `Package`, etc.) the offering's `offering_id` resolves against, and which checkout/booking flow applies.

## Response `200`

The schedule was updated. The response is the same shape as `GET /shop/practitioners/{practitionerId}/rota-for-date`.

- PractitionerRotaForDate — A `PractitionerRotaForDate` is the resolved working schedule for a single date for a single practitioner. It blends the regular rota (a recurring weekly pattern) with any ad-hoc custom availability rules that override that pattern for the requested day. The shape is intended for a date-picker / day-view UI: callers show the rules under `for_date.rules_for_date`, falling back to `for_date.rota_availability_rules` when no custom overrides exist.
  - `data` PractitionerRota, required — A `PractitionerRota` defines a practitioner's recurring availability schedule over a date range.
    - `id` string, object-id, required — The ID of the rota.
    - `practitioner_id` string, object-id, required — The ID of the practitioner this rota belongs to.
    - `start_date` string, date-time, nullable, required — The date from which this rota is active.
    - `end_date` string, date-time, nullable, required — The date on which this rota ends. Null indicates an open-ended rota.
    - `scheduling_week_interval` integer, required — The number of weeks in the rolling schedule cycle (e.g. 2 for a fortnightly rota).
    - `availability_rules` PractitionerRotaAvailabilityRule[], required — The availability rules that define when the practitioner is available within the rota cycle.
      - `week_num` integer, required — The week number within the rota cycle that this rule applies to (1-indexed).
      - `weekday` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday', required — The day of the week this rule applies to.
      - `time_from` string, required — The start time of the availability window in HH:MM format.
      - `time_to` string, required — The end time of the availability window in HH:MM format.
      - `offerings` OfferingIdentifier[] — The offerings the practitioner is assigned to during this window. An empty array means the practitioner is not linked to specific offerings for this window.
        - `offering_id` string, mongo-id, required — The ID of the offering.
        - `offering_name` string, required — The name of the offering.
        - `offering_type` 'appointment' | 'appointment_enquiry' | 'area_booking' | 'course' | 'hotel_room_reservation' | 'membership' | 'package' | 'product' | 'session' | 'table_reservation' | 'voucher', required — Discriminator describing what kind of sellable item an `Offering` represents. The value determines which downstream schema (`Appointment`, `Session`, `Package`, etc.) the offering's `offering_id` resolves against, and which checkout/booking flow applies.
  - `for_date` object, required
    - `date` string, date, required — The ISO 8601 date the rules describe, in the practitioner's timezone.
    - `week_number` integer, nullable, required — 1-indexed week number within the rota cycle that this date falls into. `null` when there is no covering rota. Combined with the rota's `scheduling_week_interval` this lets callers highlight which week of a multi-week pattern is active.
    - `rules_for_date` 'custom_rules' | 'rota_availability_rules', required — Which set of rules is authoritative for this date — `custom_rules` when at least one custom availability rule covers the date (so it overrides the rota), `rota_availability_rules` when the regular rota applies unmodified.
    - `rota_availability_rules` object[], required — The rota's recurring rules that match this specific date. Empty when no rota covers the date.
      - `time_from` string, required — The start time of the availability window in `HH:MM` 24-hour format.
      - `time_to` string, required — The end time of the availability window in `HH:MM` 24-hour format.
      - `room_id` string, object-id, nullable — The room the practitioner is assigned to during this window, if any.
    - `custom_rules` PractitionerCustomAvailability[], required — Custom availability rules that override the rota for this date. May contain both `is_available: true` rules (extra working windows) and `is_available: false` rules (blocked windows).
      - `id` string, object-id, required — The unique identifier of the custom availability rule.
      - `has_availability_id` string, object-id, required — The ID of the resource this rule belongs to. For rules created through this endpoint, this is the practitioner ID.
      - `date_time_from` string, date-time, required — The start of the window the rule covers, in ISO 8601 with the practitioner's timezone offset.
      - `date_time_to` string, date-time, required — The end of the window the rule covers, in ISO 8601 with the practitioner's timezone offset.
      - `is_available` boolean, required — `true` means the practitioner is bookable during the window; `false` blocks bookings. A `false` rule overrides any regular rota availability for the same period.
      - `room_id` string, object-id, nullable, required — The ID of the room the practitioner is assigned to during this window, if any.
      - `category_ids` string[], required — The IDs of the service categories the practitioner is available for during this window. An empty array means all categories are available.
      - `offerings` OfferingIdentifier[], required — The offerings the practitioner is assigned to during this window. An empty array means the practitioner is not linked to specific offerings for this window.
        - `offering_id` string, mongo-id, required — The ID of the offering.
        - `offering_name` string, required — The name of the offering.
        - `offering_type` 'appointment' | 'appointment_enquiry' | 'area_booking' | 'course' | 'hotel_room_reservation' | 'membership' | 'package' | 'product' | 'session' | 'table_reservation' | 'voucher', required — Discriminator describing what kind of sellable item an `Offering` represents. The value determines which downstream schema (`Appointment`, `Session`, `Package`, etc.) the offering's `offering_id` resolves against, and which checkout/booking flow applies.

## Other responses

- `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)
