Sites & Organisation

Bookable Areas

A BookableArea is a physical area at a site (e.g. cabana, hot tub, treatment pod) that customers reserve via an AreaBookingType. Each area has a capacity and an availability schedule made up of AvailabilityRules.

The BookableArea object

Attributes

  • idobject-idrequired

    Unique identifier of the bookable area.

  • organisation_iduuidrequired

    ID of the organisation the bookable area belongs to.

  • site_iduuidrequired

    ID of the site the bookable area belongs to. A bookable area is scoped to exactly one site.

  • namestringrequired

    Display name for the bookable area. Shown to staff and customers.

  • descriptionstringrequirednullable

    Long-form description of the bookable area.

  • capacityintegerrequired

    Maximum number of simultaneous bookings. 1 means exclusive-use; values > 1 allow shared occupancy.

  • availability_rulesobject[]required

    The AvailabilityRules currently configured on this area. These determine when the area is bookable. Manage them via the /shop/bookable-areas/{bookableAreaId}/availability-rules endpoints.

  • zonesobject[]optional

    Hydrated Zone records this bookable area belongs to. Zones group areas in the floor plan for spatial constraints.

{
  "id": "5dcb47800000000000000000",
  "organisation_id": "0193b6e0-3b56-7000-9f50-9d3d5e2c1111",
  "site_id": "0193b6e0-3b56-7000-9f50-9d3d5e2c2222",
  "name": "Hot Tub 1",
  "description": "Private rooftop hot tub for up to four guests. 38°C, sunset\nviews over the gardens.\n",
  "capacity": 4,
  "availability_rules": [
    {
      "id": "64a9f3b2c3d8e1f4a5b6c7d8",
      "date_from": "2021-02-15T12:00:00+00:00",
      "date_to": "2021-02-15T12:00:00+00:00",
      "is_available": true,
      "max_duration": 1,
      "min_duration": 1,
      "time_from": "11:00",
      "time_to": "17:00",
      "weekdays": [
        "string"
      ]
    }
  ],
  "zones": [
    {
      "id": "5f1234567890abcdef123456",
      "name": "Pool Deck",
      "organisation_id": "22222222-2222-2222-2222-222222222222",
      "site_id": "11111111-1111-1111-1111-111111111111"
    }
  ]
}
get/shop/bookable-areas

List bookable areas

listBookableAreas

Returns a paginated list of BookableAreas at the given site, ordered by their order field then by name. Use this to populate a settings dashboard or a calendar resource picker.

Requires the RESERVATIONS_VIEW permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    A paginated list of BookableAreas.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

post/shop/bookable-areas

Create a bookable area

createBookableArea

Creates a new BookableArea at the site identified by the site_id query parameter. The minimum body is name and capacity.

Requires the SETTINGS_MANAGE permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Request body

  • namestringoptional

    New display name for the bookable area.

  • descriptionstringoptionalnullable

    Replacement long-form description shown to customers on the shopfront. Markdown is rendered. Pass null to clear.

  • capacityintegeroptional

    New capacity. Lowering capacity doesn't cancel existing bookings — they keep their slot.

  • zone_idsstring[]optional

    Zones the area belongs to. Filtered to the area's site.

Responses

  • 201

    A single BookableArea.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

get/shop/bookable-areas/order

List ordered bookable areas

listOrderedBookableAreas

Returns the site's BookableAreas in their current display order. Pair with PUT /shop/bookable-areas/order to power a drag-and-drop ordering UI.

Requires the RESERVATIONS_VIEW permission on the site.

Query parameters

  • site_idstringrequired

    Filter results by the site they belong to

Responses

  • 200

    The site's bookable areas in display order. Pair with PUT /shop/bookable-areas/order to power a drag-and-drop UI.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

put/shop/bookable-areas/order

Update bookable area order

updateBookableAreaOrder

Replaces the display order of the site's BookableAreas. The order of area_ids in the body is the new order — element 0 becomes order=0, element 1 becomes order=1, and so on.

Requires the SETTINGS_MANAGE permission on the site.

Request body

  • area_idsstring[]required

    Ordered list of bookable area IDs. Element 0 becomes the first-displayed area.

  • site_iduuidrequired

    ID of the site whose area order is being updated. The caller's API key must have access to this site.

Responses

  • 200

    The site's bookable areas in display order. Pair with PUT /shop/bookable-areas/order to power a drag-and-drop UI.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

get/shop/bookable-areas/{bookableAreaId}

Retrieve a bookable area

getBookableArea

Returns the full BookableArea for the given ID.

Requires the RESERVATIONS_VIEW permission on the area's site.

Path parameters

Responses

  • 200

    A single BookableArea.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/bookable-areas/{bookableAreaId}

Update a bookable area

updateBookableArea

Updates a BookableArea. The validator enforces the same shape as on create — name and capacity are required. Sending fewer fields than that returns 422.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Request body

  • namestringrequired

    New display name for the bookable area.

  • descriptionstringoptionalnullable

    Replacement long-form description shown to customers on the shopfront. Markdown is rendered. Pass null to clear.

  • capacityintegerrequired

    New capacity. Lowering capacity doesn't cancel existing bookings — they keep their slot.

  • zone_idsstring[]optional

    Zones the area belongs to. Filtered to the area's site.

Responses

  • 200

    A single BookableArea.

  • 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/bookable-areas/{bookableAreaId}

Delete a bookable area

deleteBookableArea

Soft-deletes the bookable area. Existing area bookings are unaffected, but the area is removed from new-booking allocations and disassociated from any AreaBookingType it was attached to.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Responses

  • 204

    Bookable area deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/bookable-areas/{bookableAreaId}/copy

Duplicate a bookable area

copyBookableArea

Creates a copy of an existing BookableArea under the same site and organisation. Useful for seeding additional areas off an existing one — e.g. "Hot Tub 2" copied from "Hot Tub 1".

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Request body

  • namestringrequired

    Display name for the new copy.

  • descriptionstringoptional

    Long-form description for the new copy, shown to customers on the shopfront. Markdown is rendered. Omit to inherit the source area's description.

  • capacityintegerrequired

    Maximum guests this area can hold concurrently. Defaults to the source area's capacity when omitted. Lowering capacity later does not affect existing bookings already above the limit.

  • zone_idsstring[]optional

    Zones the copy belongs to. Filtered to the source area's site.

Responses

  • 201

    A single BookableArea.

  • 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

get/shop/bookable-areas/{bookableAreaId}/availability-rules

List availability rules for a bookable area

listBookableAreaAvailabilityRules

Returns all AvailabilityRules configured on a BookableArea. Availability rules carve up the calendar into windows when the area can or cannot be booked — useful for blocking maintenance slots or restricting cabana hours.

Any is_available: false rule overrides any is_available: true rule for the same time period.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Responses

  • 200

    A list of AvailabilityRules on a BookableArea.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/bookable-areas/{bookableAreaId}/availability-rules

Create an availability rule for a bookable area

createBookableAreaAvailabilityRule

Adds a new AvailabilityRule to a BookableArea. With is_available: true the rule opens new bookable windows; with is_available: false it blocks them. Omitting date/time/weekday filters means the rule applies always.

date_from defaults to today in the area's timezone when omitted.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Request body

  • is_availablebooleanoptional

    Whether the window is bookable. false rules override true rules.

  • date_fromdateoptionalnullable

    First date this rule applies (inclusive).

  • date_todateoptionalnullable

    Last date this rule applies (inclusive).

  • time_fromstringoptionalnullable

    Daily start time in HH:MM.

  • time_tostringoptionalnullable

    Daily end time in HH:MM.

  • weekdaysstring[]optional

Responses

  • 201

    A single AvailabilityRule.

  • 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

get/shop/bookable-areas/{bookableAreaId}/availability-rules/{availabilityRuleId}

Retrieve a bookable area availability rule

getBookableAreaAvailabilityRule

Returns a single AvailabilityRule belonging to the given BookableArea.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Responses

  • 200

    A single AvailabilityRule.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/bookable-areas/{bookableAreaId}/availability-rules/{availabilityRuleId}

Update a bookable area availability rule

updateBookableAreaAvailabilityRule

Updates an AvailabilityRule on a BookableArea. The server validates the same shape as on create, so is_available is required. Calendar availability is recomputed from the updated rule set.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Request body

  • is_availablebooleanrequired

    Whether the window is bookable. false rules override true rules.

  • date_fromdateoptionalnullable

    First date this rule applies (inclusive).

  • date_todateoptionalnullable

    Last date this rule applies (inclusive).

  • time_fromstringoptionalnullable

    Daily start time in HH:MM.

  • time_tostringoptionalnullable

    Daily end time in HH:MM.

  • weekdaysstring[]optional

Responses

  • 200

    A single AvailabilityRule.

  • 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/bookable-areas/{bookableAreaId}/availability-rules/{availabilityRuleId}

Delete a bookable area availability rule

deleteBookableAreaAvailabilityRule

Removes an AvailabilityRule from a BookableArea. Calendar availability is recomputed from the remaining rules. Existing bookings are unaffected.

Requires the SETTINGS_MANAGE permission on the area's site.

Path parameters

Responses

  • 204

    Availability rule deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found