---
title: "Get calendar occupancy"
method: GET
path: "/shop/calendar-occupancy"
tags: ["CalendarEvents"]
---

# Get calendar occupancy

`GET /shop/calendar-occupancy`

Returns occupancy metrics for the operator calendar on a given
date. The response counts the guests covered by all
confirmed/waitlisted offerings (appointments, area bookings, and
sessions) that fall within the date — bucketed by hour, by
selected view, and as a single daily total.

Occupancy is gated by the `occupancy_overview` feature flag. If
the flag is off for the site, the underlying data resolves to
`null`. Filter results by `view_type` (and optionally `zone_id`)
to constrain the calculation to a single resource lane.

## Query parameters

- `date` string, date
- `events` string
- `view_type` 'area' | 'practitioner' | 'room'
- `zone_id` string
- `site_id` string

## Response `200`

Calendar occupancy successfully retrieved.

- object
  - `data` object, nullable, required — Occupancy figures for the requested date, or `null` when the `occupancy_overview` feature flag is off.
    - `occupancy_for_view` number, required — Guests covered by the filtered events for the currently-selected view (e.g. all appointments when `view_type=practitioner`).
    - `occupancy_per_day` number, required — Site-wide guest count for the day across every offering type. Independent of `view_type`.
    - `occupancy_per_hour` object[], required — Guests in scope keyed by hour-of-day, ascending. Hours without bookings are omitted.
      - `guests` number, required — Guests covered in this hour bucket.
      - `time` string, required — Start of the hour bucket as a 24-hour `HH:mm` string in the site's local timezone.

## Other responses

- `400` — The request failed.
- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.

---

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