---
title: "List Resource Occupations"
method: GET
path: "/locations/{location_id}/resource_occupations"
tags: ["Appointments"]
---

# List Resource Occupations

`GET /locations/{location_id}/resource_occupations`

## Request

- Base URL: `https://api.alteg.io/api/v2`
- URL: `https://api.alteg.io/api/v2/locations/{location_id}/resource_occupations`
- Auth: HTTP bearer

Retrieve resource occupations that intersect a required time interval in a
Location. Results can be narrowed to one or more Services.

Each JSON:API resource identifies the occupied resource instance, its time
interval, and the source Appointment or Event.

## Path parameters

- `location_id` integer, required

## Query parameters

- `filter[service_id]` integer
- `filter[service_ids][]` integer[]
- `filter[date_intersect_from_strict]` string, required
- `filter[date_intersect_to_strict]` string, required

## Headers

- `Accept` string, required
- `Authorization` string, required

## Response `200`

Resource occupations retrieved successfully

- object
  - `data` ResourceOccupationResource[], required
    - `type` 'resource_occupation', required: Literal JSON:API resource type
    - `id` string, required: Resource occupation ID
    - `attributes` object, required
      - `source_type` 'record' | 'activity', required: Deprecated source type; use `source_type_slug`
      - `source_type_slug` 'record' | 'activity', required: Occupation source. Literal `record` and `activity` wire values mean Appointment and Event respectively.
      - `source_id` integer, required: Appointment or Event ID, depending on `source_type_slug`
      - `resource_id` integer, required: Resource ID
      - `resource_instance_id` integer, required: Resource instance ID
      - `from` string, required: Occupation start in the Location timezone
      - `to` string, required: Occupation end in the Location timezone

## Other responses

- `401`: Unauthorized
- `403`: Forbidden - No timetable access for this Location
- `404`: Location not found
- `422`: Invalid filter value or date format

---

[API](https://skmtc.dev/alteg/apis/business-management.md) - [All operations](https://skmtc.dev/alteg/apis/business-management/llms.txt) - [OpenAPI document](https://skmtc.dev/alteg/apis/business-management/revisions/a2d63320b944?raw)
