Skip to content

Create an order

Request

Use this endpoint to create and confirm an order using a valid order token and payment information when required by the selected offer.

Security
BearerAuth
Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/jsonrequired
One of:

Use this object to create an accommodation order. Include accommodation details, booker details, an order token and the payment information required by the order.

accommodationobject(Accommodation order creation request)required

Additional information related to the accommodation order. Only one travel service object can be included in a request.

Example:
{ "label": "Sample label", "products": [ { … } ], "remarks": { "estimated_arrival_time": { … }, "special_requests": "We will need an extra cot." } }
bookerobject(AccommodationOrderCreateBookerInput)required

The booker's information for an accommodation order.

Example:
{ "address": { "address_line": "Road-1, house-2", "city": "Amsterdam", "country": "nl", "post_code": "11111" }, "company": "Booking B.V", "email": "john.doe@booking.com", "language": "en-gb", "name": { "first_name": "John", "last_name": "Doe" }, "telephone": "12345678" }
order_tokenstringrequired

Token returned by /orders/preview containing the data required to create the order.

Example:"sample-token"
paymentobject(OrderCreatePaymentInput)required

Payment related information for the order.

Example:
{ "card": { "cardholder": "John Doe", "cvc": "111", "expiry_date": "2030-10", "number": "23333333333333" }, "include_receipt": true, "method": "card", "timing": "pay_online_now" }
curl -i -X POST \
  https://demandapi.booking.com/3.2/orders/create \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "accommodation": {
      "label": "Sample label",
      "products": [
        {
          "id": "333",
          "bed_configuration": "123456",
          "guests": [
            {
              "email": "john.doe@booking.com",
              "name": "John Doe"
            }
          ]
        }
      ],
      "remarks": {
        "estimated_arrival_time": {
          "hour": 12
        },
        "special_requests": "We will need an extra cot."
      }
    },
    "booker": {
      "address": {
        "address_line": "Road-1, house-2",
        "city": "Amsterdam",
        "country": "nl",
        "post_code": "11111"
      },
      "company": "Booking B.V",
      "email": "john.doe@booking.com",
      "language": "en-gb",
      "name": {
        "first_name": "John",
        "last_name": "Doe"
      },
      "telephone": "12345678"
    },
    "order_token": "sample-token",
    "payment": {
      "card": {
        "cardholder": "John Doe",
        "cvc": "111",
        "expiry_date": "2030-10",
        "number": "23333333333333"
      },
      "include_receipt": true,
      "method": "card",
      "timing": "pay_online_now"
    }
  }'

Responses

The order was successfully created. The response includes the reservation details.

Bodyapplication/json
request_idstring(requestId)

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

dataAccommodation order creation output (object) or Car order creation output (object)(OrderCreateDataOutput)
One of:
Response
{ "request_id": "string", "data": { "order": "509430129718799", "accommodation": { … }, "payment": { … } } }