Rooms

Duplicate a room

Creates a copy of an existing Room. The copy is created at the same site (or at site_id if you override it). Useful for seeding a second identically-configured room — e.g. "Treatment Room 2" off "Treatment Room 1".

Requires the SETTINGS_MANAGE permission on the destination site.

post/shop/rooms/{roomId}/copy

Request body

namestring

New display name. Defaults to the source's name when omitted — be careful, you'll end up with two rooms with the same name.

capacityinteger

Override capacity on the new copy. Defaults to the source room's capacity when omitted.

site_idstring uuid

Override the destination site. Defaults to the source's site. The caller's API key must have access to the chosen site.

organisation_idstring uuid

Override the destination organisation.

use_custom_opening_hoursboolean

When true, the room follows its own opening hours (defined via availability_rules) rather than inheriting the parent site's. Inherited from the source when omitted.

suitable_for_tagsstring[]
tag_idsstring[]
zone_idsstring[]

Example request

{
  "name": "Treatment Room 2",
  "capacity": 2,
  "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.