---
title: "Capacities & planning (push)"
method: POST
path: "/planning-update"
tags: ["Termino endpoints"]
---

# Capacities & planning (push)

`POST /planning-update`

Planning update of available capacities, booking restrictions (stop sale, closed arrival, closed departure, minimal length of stay), rateplans and prices.

Granular updates are supported - you can include only availability, only rates, or both in the update. Similarly, rates update may include either prices or restrictions or both. Unchanged data should be omitted in the request.

## Request body

- object
  - `accessToken` string, required — Access token to your API.
  - `hotelId` union, required — Your hotel id.
    - string
    - integer
  - `update` PlanningUpdate[]
    - `roomTypeId` union, required — Id of room type.
      - string
      - integer
    - `availability` RoomTypeAvailability[] — List of updated availability.
      - `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.
      - `availableRooms` integer, required — Count of free rooms in this interval.
    - `rates` RatePlanPlanning[] — List of rates updates.
      - `ratePlanId` union, required — Id of rate plan.
        - string
        - integer
      - `planning` RatePlanPlanningItem[], required
        - `interval` DateInterval — 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.
        - `perRoomPrice` Price
          - `amount` string, decimal, required — Money amount represented as decimal string with dot as decimal separator.
          - `currency` string, ISO 4271 currency code, required — Currency code.
        - `perPersonPriceMatrix` PerPersonPrice[] — Matrix of prices per person count for given rate plan/room type in given interval. Required if pricing model is `per_person`.
          - `personsCount` integer, required — Count of persons.
          - `price` Price, required
            - `amount` string, decimal, required — Money amount represented as decimal string with dot as decimal separator.
            - `currency` string, ISO 4271 currency code, required — Currency code.
          - `stopSale` boolean, required — Stop sale for given persons count.
        - `perOccupancyPriceMatrix` OccupancyPrice[] — List of prices for different occupancies for given rate plan/room type in given interval. Required if pricing model is `per_occupancy`.
          - `adultsCount` integer, required — Count of adults.
          - `childrenCount` integer, required — Count of children.
          - `price` Price, required
            - `amount` string, decimal, required — Money amount represented as decimal string with dot as decimal separator.
            - `currency` string, ISO 4271 currency code, required — Currency code.
          - `stopSale` boolean — Stop sale for given occupancy.
        - `restrictions` BookingRestriction — Booking restrictions to be applied. Omitted properties are considered unchanged.
          - `closedForArrival` boolean — Room is closed for arrival in given interval
          - `closedForDeparture` boolean — Room is closed for departure in given interval
          - `stopSale` boolean — Room is not available for booking in given interval (arrival or stay is not allowed)
          - `minimalLengthOfStay` integer — Bookings starting in given interval have to have this minimal length of stay. 1 is default.
          - `maximalLengthOfStay` integer, nullable — Bookings starting in given interval have to have this maximal length of stay. Null value means unlimited length of stay, 0 has same effect as closed for arrival.
    - `roomTypeRestrictions` object[] — Room type-level booking restrictions to be applied on given intervals.
      - `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.
      - `restrictions` BookingRestriction, required — Booking restrictions to be applied. Omitted properties are considered unchanged.
        - `closedForArrival` boolean — Room is closed for arrival in given interval
        - `closedForDeparture` boolean — Room is closed for departure in given interval
        - `stopSale` boolean — Room is not available for booking in given interval (arrival or stay is not allowed)
        - `minimalLengthOfStay` integer — Bookings starting in given interval have to have this minimal length of stay. 1 is default.
        - `maximalLengthOfStay` integer, nullable — Bookings starting in given interval have to have this maximal length of stay. Null value means unlimited length of stay, 0 has same effect as closed for arrival.

## Response `200`

Successful response

- SuccessResponse
  - `success` boolean, required — Always true.

## Other responses

- `400` — Expected error

---

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