---
title: "GetBookingId"
method: POST
path: "/GetBookingId"
tags: ["Bookings"]
---

# GetBookingId

`POST /GetBookingId`

Returns detailed bookings made on the OTA. See the Booking Format section of the documentation for the full booking format specification.

## Credit/debit card data

If your `GetBookingId` responses can include guest credit/debit card data
(the `Payments` object), your channel must be enabled for secure card
handling. A PCI Attestation of Compliance (AoC) document is required before
card data can be enabled for a channel.

Retrieval of card data is handled over a secure path configured on the
Cloudbeds side; your `GetBookingId` implementation returns the `Payments`
object as documented in the booking format, with no special handling on your
end.

Within the `Payments` object, `CardNumber` and `SeriesCode` **must be encoded
as JSON strings** (quoted values, e.g. `"SeriesCode": "143"`), never as bare
JSON numbers. Card data is tokenized in place with non-numeric tokens;
unquoted numeric values cannot be tokenized.

A booking whose `GetBookingId` response contains card data is **silently
dropped and not imported** (no error can be returned on `GetBookingId`)
unless your channel has been enabled for card handling.

## Request body

- object
  - `mya_property_id` integer, required — Property ID on the Cloudbeds channel manager
  - `ota_property_id` string, required — Username, login or property ID on the OTA
  - `ota_property_password` string, required — Password for property on your OTA. In case the OTA does not use passwords this will be an empty string.
  - `ota_property_sub_id` string, required — Property ID on the OTA, if OTA supports multiple properties under one `ota_property_id`/`ota_property_password` combination. See `GetSubProperties` for more details.
  - `guid` string, required — Request reference ID, used for debugging and support requests.
  - `shared_secret` string, required — Authentication between the OTA and the channel. Identical for all requests. Not to be shared with customers.
  - `ota_cid` string, required — OTA ID as given by Cloudbeds
  - `verb` 'GetBookingId', required
  - `booking_id` string, required — OTA booking ID of the booking to be retrieved.
  - `version` string — Versioning string if returned by `GetBookingList`. May be used to retrieve a specific version of the booking.

## Response `200`

GetBookingId

- union
  - object
    - `success` true, required
    - `Booking` Booking, required — Object describing the booking. The fields listed here are just the minimum required fields.
      - `OrderId` string, required — Unique booking ID on the OTA. Maximum of 64 characters.
      - `OrderAdults` integer, required — Total number of unique adults. Adult age threshold is defined by the channel. Should equal sum of Adults in each room if this breakdown is given.
      - `OrderChildren` integer, required — Total number of unique children or babies. Child/baby age threshold is defined by the channel. Should equal sum of `Children` plus `Babies` in each room if this breakdown is given.
      - `OrderCustomers` integer, required — Total number of unique customers. Should equal sum of `Occupancy` in each room if this breakdown is given. Should also equal the sum of `OrderAdults` and `OrderChildren` if those fields are present.
      - `OrderDate` string, date, required — Date of booking creation, in UTC (not date when modified!).
      - `OrderTime` string, required — Time of booking creation, in UTC. If seconds are not provided, set value to ":00". Presence of `OrderTime` requires presence of `OrderDate`.
      - `OrderModifDate` string, date — Date of booking modification, in UTC. Required if `IsModification` is `1`; do not pass if booking has not been modified.
      - `OrderModifTime` string — Time of booking modification, in UTC. Required if `IsModification` is `1`; do not pass if booking has not been modified. If seconds are not provided, set value to ":00".
      - `IsCancellation` 0 | 1, required — `1` if booking is cancelled.
      - `IsModification` 0 | 1, required — `1` if booking is modified.
      - `TotalCurrency` string, required — 3-letter ISO 4217 currency code for the `TotalPrice` field.
      - `TotalPrice` number, required — Total price of the booking, including taxes, commission and deposit, after discounts. It should reflect the price the guest will have to pay in total (or has already paid).
      - `PaymentCollect` 'Property' | 'Channel', required — Who collects outstanding balance from the guest? `Property` means that the property takes the payment, either by charging the credit card, or on arrival. `Channel` means that the channel will take the payment, and the property is paid by the channel. Do not set this to `Channel` if you are only collecting the commission/deposit.
      - `Customers` object[], required
        - `CustomerCountry` string, required — 2-letter ISO 3166-1 alpha-2 country code in which the customer resides, corresponding to their address. Value is uppercase.
        - `CustomerEmail` string, email, required — Email address of the customer.
        - `CustomerFName` string, required — First name(s) of the customer. If the name is not stored separated by first and last name, provide full name in `CustomerLName`.
        - `CustomerLName` string, required — Last (family) name or full name of the customer.
      - `Rooms` object[], required — List of rooms booked
        - `Adults` integer, required — Number of adults staying in this room. Adult age threshold is defined by the channel.
        - `Babies` integer, required — Number of babies staying in this room. Baby age threshold is defined by the channel.
        - `ChannelRoomType` string, required — The ID of the room on the OTA.
        - `Children` integer, required — Number of children staying in this room. Child age threshold is defined by the channel.
        - `Currency` string, required — 3-letter ISO 4217 currency code for the `Price` field.
        - `DayRates` object[], required — Contains as many objects as the number of nights of the room stay. They need to be sorted by date.
          - `Date` string, date, required — Date of day rate.
          - `Description` string, required — Name or short description of the rateplan booked. Example: "Non-refundable rate" or "10% festival discount".
          - `Rate` number, required — Price for this day, including `Commission` and `Tax`.
          - `RateAfterTax` number — Gross price for this day (what the guest pays), including taxes.
          - `RateBeforeTax` number — Gross price for this day (what the guest pays), excluding taxes.
          - `NetRateAfterTax` number — Net price for this day (what the property receives, after channel commission), including taxes.
          - `NetRateBeforeTax` number — Net price for this day (what the property receives, after channel commission), excluding taxes.
          - `Currency` string, required — 3-letter ISO 4217 currency code for the `Rate` field.
          - `RateId` string, required — Applicable channel rate plan ID for this day rate.
        - `StartDate` string, date, required — Arrival date of the customer.
        - `EndDate` string, date, required — The date of the last night of stay (equal to departure date minus one).
        - `Occupancy` integer, required — Total number of persons staying in this room, including children and babies. Should be the sum of `Adults`, `Children` and `Babies` if those are present.
        - `Price` number, required — Total price of the room, for all units and all days, including taxes and fees. Example: stay is for two days and three units and a single night costs €10 (including tax), then `Price` is 2 * 3 * 10 = 60.
        - `Units` integer, required — Number of rooms booked (for private rooms) or number of beds booked (for dorms/shared rooms).
        - `RateDesc` string, required — Description of the booked rate plan, as provided by the channel.
        - `RateId` string, required — Applicable rate plan ID for this booking. Normally there is only one. If there are multiple, list them comma-separated.
  - ResponseError
    - `errors` object[], required — Array of error objects.
      - `id` integer, required — Error code. Check the "Error Codes" section of the specification for valid codes.
      - `msg` string — Optional error string to give more details about the error. Myallocator localises errors into different langauges, so this field is generally ignored and only useful for debugging.
    - `success` false, required

---

[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)
