---
title: "CheckAvailability"
method: POST
path: "/CheckAvailability"
tags: ["Callbacks"]
---

# CheckAvailability

`POST /CheckAvailability`

**Endpoint:** `https://api.myallocator.com/callback/ota/{ota}/v202203` (replace `{ota}` with your channel ID)

Use this callback to check if a room (rateplan) is available for booking.

Although information about specific room (rateplan) availability is supposed to be present locally on a channel side,
we would like to provide an opportunity to double check if a room (rateplan) is available prior to creating a
reservation. Using this callback ensures that due to a possible technical issue leading to a room (rateplan)
availability numbers not having been (or having been incorrectly / not in time) delivered to a channel, the room
is not overbooked and therefore helps avoid both host and guest frustration when such an over-booking has to be canceled by a host
due to physical inability to accomodate.

## Request body

- object
  - `ota_property_id` string, required — Username, login or property ID on the OTA
  - `ota_room_id` string, required — Room ID on the OTA
  - `ota_rateplan_id` string, required — Room rateplan ID on the OTA (In case OTA supports rateplans)
  - `start_date` string, date, required — Desired check in date
  - `end_date` string, date, required — Desired check out date
  - `unit_type` 'room' | 'guest', required — Room availability can be checked by number of rooms or by number of guests (beds) to stay. We recommend using `guest` in case a room is a dormitory/shared room and is sold by beds.
  - `number_of_units` integer, required — Number of rooms or guests to check availability for
  - `shared_secret` string, required — Authentication between the OTA and the channel. Identical for all requests. Not to be shared with customers.

## Response `200`

CheckAvailability

- union
  - object
    - `Success` true — This field indicates that a request has been processed successfully. The value of this field does NOT indicate room availability.
    - `is_available` boolean — This field indicates whether or not the requested room(s) (rateplan) is(are) available for booking
    - `reasons_unavailable` object[] — If room(s) (rateplan) is(are) is not available for booking, this field contains explanations as to why
      - `text` string — Reason text
      - `related_dates` string[] — Related dates
  - ResponseCallbackError
    - `Success` false, required — Always `false` when the response contains an error.
    - `ErrorCode` integer, required — Error code. Check the "Error Codes" section of the specification for valid codes.
    - `Error` string, required — Human-readable error message.

---

[API](https://skmtc.net/cloudbeds/apis/cloudbeds-api.md) · [All operations](https://skmtc.net/cloudbeds/apis/cloudbeds-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudbeds/cloudbeds-api/revisions/2faa857793e8/schema)
