Rooms

Create a room

Creates a new Room at the given site. The minimum body is name, capacity, and site_id. The room initially follows the site's opening hours; pass use_custom_opening_hours = true together with availability_rules to override.

Requires the SETTINGS_MANAGE permission on the room's site.

post/shop/rooms

Request body

namestring required

Display name for the room. Shown to staff in the calendar and admin UI. Plain text only.

capacityinteger required

How many concurrent bookings the room can host. 1 means exclusive single-occupancy. Multi-guest sharing requires an appointment type with allocate_multi_capacity_rooms = true.

site_idstring uuid required

ID of the site this room belongs to. The caller's API key must have access to this site, otherwise the request 422s.

organisation_idstring uuid

Optional organisation ID. Defaults to the caller's primary organisation when omitted.

use_custom_opening_hoursboolean

When true, the room uses its own availability_rules instead of the site's opening hours. When false (or omitted), the site's hours are used and availability_rules is ignored.

suitable_for_tagsstring[]

Tag IDs the room is suitable for. Used by the availability engine to match rooms against an appointment type's required tags.

tag_idsstring[]

Free-form tag IDs for reporting and filtering. Distinct from suitable_for_tags. Tags must belong to the caller's organisation and apply to rooms.

zone_idsstring[]

Zone IDs the room belongs to. Zones must exist at the same site_id; mismatched zones are rejected with 422.

Example request

{
  "name": "Treatment Room 1",
  "capacity": 1,
  "site_id": "0193b6e0-3b56-7000-9f50-9d3d5e2c2222",
  "availability_rules": [
    {
      "time_from": "09:00",
      "time_to": "17:00"
    }
  ]
}

Response

A single Room.

Example response

{
  "data": {
    "id": "5dcb47800000000000000000",
    "organisation_id": "0193b6e0-3b56-7000-9f50-9d3d5e2c1111",
    "site_id": "0193b6e0-3b56-7000-9f50-9d3d5e2c2222",
    "name": "Treatment Room 1",
    "capacity": 1,
    "availability_rules": [
      {
        "date_from": "2021-02-15",
        "date_to": "2021-02-15",
        "time_from": "11:00",
        "time_to": "17:00"
      }
    ],
    "zones": [
      {
        "id": "5f1234567890abcdef123456",
        "name": "Pool Deck",
        "organisation_id": "22222222-2222-2222-2222-222222222222",
        "site_id": "11111111-1111-1111-1111-111111111111"
      }
    ]
  }
}

Changes

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