Skip to content

Orders

This API collection enables management of booking orders within the Demand API.
Use these endpoints to:
- Preview and create new orders.
- Check order details.
- Cancel or modify existing orders.
This collection is required to integrate booking and order management functionality.

Preview an order

Request

Use this endpoint to validate an order before checkout and calculate the final price, including a detailed price breakdown, payment schedule, and cancellation policies for accommodation and car rentals. Provide the booker's details and preferred currency to receive personalised pricing.

For accommodations: Include check-in and check-out dates, room allocation, and selected products.

For cars: Include the offer ID and search token. Optionally include selected optional products (such as GPS or child seats) returned by /cars/availability to add extras, and/or an insurance.quote_reference from /cars/availability to attach third-party insurance.

Security
BearerAuth
Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/json
One of:

Use this option to preview pricing and policies for car rentals.

carobject(OrdersPreviewCarInput)

Additional information related to the car order. This field is mutually exclusive with accommodation; only one of them can be included in a request.

accommodationobject(OrdersPreviewAccommodationInput)

Input parameter with the checkin and checkout date and all the accommodation products to be ordered. This field is mutually exclusive with car; only one of them can be included in a request.

currencystring or null(currencyId)^[A-Z]{3}$

A three-letter code that uniquely identifies a monetary currency as defined by the ISO 4217 standard. The full list can be obtained by calling common/payments/currencies.

Example:"EUR"
curl -i -X POST \
  https://demandapi.booking.com/3.2/orders/preview \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "currency": "EUR",
    "accommodation": {
      "id": 6745031,
      "booker": {
        "country": "nl",
        "platform": "mobile",
        "travel_purpose": "leisure",
        "user_groups": [
          "authenticated"
        ]
      },
      "checkin": "!START_DATE!",
      "checkout": "!END_DATE!",
      "products": [
        {
          "id": "674503106_275710478_0_2_0",
          "allocation": {
            "number_of_adults": 1,
            "children": [
              8
            ]
          }
        },
        {
          "id": "674503113_275710486_0_1_0",
          "allocation": {
            "number_of_adults": 1,
            "children": []
          }
        }
      ]
    }
  }'

Responses

Successful response.

Bodyapplication/json
request_idstring(requestId)

Uniquely identifies the request. Please provide this identifier when contacting support.

dataobject(OrdersPreviewDataOutput)

Contains the calculated order details for accommodation or car products, including pricing, policies, etc.

Response
{ "request_id": "01fr9ez700exycb98w90w5r9sh", "data": { "accommodation": {}, "order_token": "..." } }