---
title: "Reservations search"
method: POST
path: "/occupations"
tags: ["PMS/CM endpoints"]
---

# Reservations search

`POST /occupations`

Synchronization of changes in reservations created by Termino/Slevomat. This allows changes in reservation made in PMS to be propagated to Termino and Slevomat. Changes can also be pushed via [/occupations-update](#tag/Termino-endpoints/operation/occupations-update) endpoint.
Usage:
  - synchronizing occupation changes once a day

## Request body

- object
  - `accessToken` string, required — Access token to your API.
  - `hotelId` union, required — Your hotel id.
    - string
    - integer
  - `interval` DateInterval, required — DateInterval is [start, end) – end date is exclusive.
    - `start` string, date, required — Start date in the format 'yyyy-mm-dd'.
    - `end` string, date, required — End date in the format 'yyyy-mm-dd'. Exclusive.
  - `roomTypeIds` union[] — Filter occupations on given room types.
    - union
      - string
      - integer

## Response `200`

Successful response

- OccupationsResponse
  - `occupations` Occupation[], required — List of matched occupations. Empty array if none found
    - `id` union, required — Your occupation id.
      - string
      - integer
    - `type` 'reservation', required — Type of occupation. `reservation` is only supported value
    - `status` string — Reservation status; optional and ignored for blockages.
    - `roomId` union — Your room id.
      - string
      - integer
    - `roomTypeId` union, required — Room type id.
      - string
      - integer
    - `created` string, date-time, required — Creation date and time in ISO 8601 format.
    - `term` DateInterval, required — DateInterval is [start, end) – end date is exclusive.
      - `start` string, date, required — Start date in the format 'yyyy-mm-dd'.
      - `end` string, date, required — End date in the format 'yyyy-mm-dd'. Exclusive.

## Other responses

- `400` — Expected error

## Changes

- **2023-10-31** `371c7c53f22d` — 1 breaking, 4 info
  - the response property `occupations/items/roomId` became optional for the status `200`
  - api tag `PMS/CM endpoints` added
  - api tag `Pull endpoints` removed
  - response property `occupations/items/roomId` deprecated
  - …1 more
- **2023-10-30** `e19082e0fb0f` — 1 breaking, 4 info
  - removed the required property `occupations/items/roomTypeId` from the response with the `200` status
  - api tag `Pull endpoints` added
  - api tag `PMS/CM endpoints` removed
  - the response property `occupations/items/roomId` became required for the status `200`
  - …1 more

[Change history](https://skmtc.dev/slevomat/apis/termino-hotel-api/changes/occupations/post.md)

---

[API](https://skmtc.dev/slevomat/apis/termino-hotel-api.md) · [All operations](https://skmtc.dev/slevomat/apis/termino-hotel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/slevomat/termino-hotel-api/revisions/776409ba477b/schema)
