v1

latestOpenAPI 3.0.02026-07-247251950.2 KB
Make bookings

1. Create a checkout session (PREBOOK)

Overview

Step 1 of 2 in the booking flow. Create a prebook session to check the availability of a rate and get final pricing before payment. This prebookId needed to complete the booking.

When to Use

  • Before payment - Always call this before completing a booking
  • Rate confirmation - Verify final pricing and availability
  • Session creation - Generate a checkout session for your payment flow

What You Get

  • Prebook ID - Required for the next step (completing the booking)
  • Final pricing - Confirmed rates with all fees and taxes
  • Terms and conditions - Cancellation policies and booking rules
  • Room details - Complete information about the selected rooms

Key Features

  • Live availability check - Verifies the rate is available before you collect payment
  • Payment SDK support - Set usePaymentSdk=true to use client-side payment forms
  • Reusable - PrebookId can be used for multiple bookings if needed

Quick Start

Provide the offerId from your hotel rates search and set usePaymentSdk (true/false). Returns a prebookId to use in the next step.

Next Step: Use the prebookId with /rates/book to complete the booking.

post/rates/prebook

Query parameters

timeoutinteger
includeCreditBalanceboolean

Optional flag to include credit line information in the response. When set to true, credit line details will be returned if the user has a credit line available. This can also be provided in the request body as includeCreditBalance.

Request body

offerIdstring required

The unique identifier of the selected offer from the search results.

usePaymentSdkboolean required

Specifies whether the fields needed to call the payment processing SDK are returned. Set to true if using the SDK for payment processing.

voucherCodestring

An optional voucher code to apply discounts to the booking. The vouchers API allows creation of these discounts

bedTypeIdsinteger[]

An optional array of bed type IDs to specify preferred bed configurations for the rooms being booked. The availability of specific bed types depends on the hotel's inventory.

includeCreditBalanceboolean

Optional flag to include credit line information in the response. When set to true, credit line details will be returned if the user has a credit line available.

Example request

{
  "addons": [
    {
      "addon": "uber",
      "value": 50,
      "currency": "USD",
      "addonDetails": {
        "package_id": 1,
        "destination_code": "ES",
        "start_date": "2025-12-05",
        "end_date": "2025-12-10"
      }
    }
  ]
}

Response

OK

guestLevelinteger

Used with loyalty programs to determine the guests level of cost reduction.