Practitioners

Assign a room to a practitioner's custom availability on a date

Applies a room assignment (or clears one when room_id is null) to the practitioner's custom availability rules for the given date and time range. The server carves the matching availability segments and returns the resulting PractitionerCustomAvailability rules for that day.

The request only succeeds when the target period falls within an existing availability window for the practitioner on that date.

post/shop/practitioners/{practitionerId}/room-assignments

Request body

datestring date required

The date to target, in YYYY-MM-DD format.

time_fromstring required

Start time of the target range in HH:MM format.

time_tostring required

End time of the target range in HH:MM format. Must be after time_from.

room_idstring object-id nullable

The room to assign to the target range. Pass null to remove a room assignment.

category_idsstring[]

Optional category IDs used when carving matching availability segments.

Example request

{
  "date": "2026-06-16",
  "time_from": "09:00",
  "time_to": "13:00",
  "room_id": "5dcb47800000000000000077",
  "offerings": [
    {
      "offering_name": "Twilight massage",
      "offering_type": "appointment"
    }
  ]
}

Response

A paginated list of PractitionerCustomAvailability rules for the practitioner.

Example response

{
  "data": [
    {
      "date_time_from": "2026-06-01T09:00:00+01:00",
      "date_time_to": "2026-06-01T17:00:00+01:00",
      "offerings": [
        {
          "offering_name": "Twilight massage",
          "offering_type": "appointment"
        }
      ]
    }
  ],
  "meta": {
    "from": 1,
    "to": 2,
    "total": 2,
    "current_page": 1,
    "last_page": 2,
    "per_page": 15,
    "path": "http://example.com/api"
  },
  "links": {
    "first": "http://example.com?page=1",
    "next": "https://example.com?page=3",
    "prev": "https://example.com?page=1",
    "last": "https://example.com?page=4"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.