Skip to content

Orders

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

This endpoint returns the total final price with final charges, as well as the price breakdown and payment/cancellation policies for each product passed in the input.

Security
BearerAuth
Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/json
bookerobject(OrdersPreviewBookerOutput)required

The booker's information.

currencystring^[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"
accommodationobject(OrdersPreviewAccommodationInput)required

Input parameter with the checkin and checkout date and all the accommodation products to be ordered.

curl -i -X POST \
  https://demandapi.booking.com/3.1/orders/preview \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "booker": {
      "country": "nl",
      "platform": "mobile",
      "travel_purpose": "leisure",
      "user_groups": [
        "authenticated"
      ]
    },
    "currency": "EUR",
    "accommodation": {
      "id": 6745031,
      "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

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

dataobject(OrdersPreviewDataOutput)
Response
{ "request_id": "01fr9ez700exycb98w90w5r9sh", "data": { "accommodation": {}, "order_token": "..." } }