---
title: "Capacities"
method: POST
path: "/capacities"
tags: ["Pull endpoints"]
---

# Capacities

`POST /capacities`

Synchronizing available space.

Usage:
 - called when new hotel is registered
 - called after a new reservation is created or reservation fails
 - periodical synchronization of available space unless push endpoint is used

## Request body

- object
  - `accessToken` string, required — Access token to your API.
  - `hotelId` union, required — Hotel id.
    - string
    - integer
  - `interval` DateInterval, required
    - `start` string, date, required — Start date in the format 'yyyy-mm-dd'.
    - `end` string, date, required — End date in the format 'yyyy-mm-dd'.
  - `roomTypeIds` union[] — Requested room type ids. When not provided, return capacities for all room types of given hotel.
    - union
      - string
      - integer

## Response `200`

Successful response

- SuccessCapacitiesResponse
  - `capacities` Capacity[], required — List of available capacities.
    - `roomTypeId` union, required — Your id of room type.
      - string
      - integer
    - `interval` DateInterval, required
      - `start` string, date, required — Start date in the format 'yyyy-mm-dd'.
      - `end` string, date, required — End date in the format 'yyyy-mm-dd'.
    - `availableRooms` integer, required — Count of free rooms in this interval.

## Other responses

- `400` — Expected error

## Changes

- **2023-10-30** `e19082e0fb0f` — 3 info
  - api tag `Pull endpoints` added
  - api tag `PMS/CM endpoints` removed
  - endpoint reactivated

[Change history](https://skmtc.dev/slevomat/apis/termino-hotel-api/changes/capacities/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/e19082e0fb0f/schema)
