Booking.com Demand API (3.1)

The Demand API allows Affiliate Partners to access Booking.com’s inventory, including accommodation, car rental, and flight information.

- The API follows REST principles and returns JSON responses.
- You can consume them directly through HTTPS calls, using the POST method.
- Note: Authentication is required using your Affiliate ID and token credentials.

Try it out!

Download OpenAPI description
Languages
Servers
Production environment
https://demandapi.booking.com/3.1/
Sandbox environment
https://demandapi-sandbox.booking.com/3.1/

Accommodation

This API collection is specific for the stay part of the connected trip.

Use these endpoints to search for stays such as hotels and apartments, check availability, retrieve reviews, and get detailed property information.

Operations

Car rentals

This API collection is specific to the car rentals part of the connected trip.

Use these endpoints to search for car rentals, check car details and look for depots and suppliers.

Operations

Locations

Provides identifiers for a wide range of geographical locations, including airports, countries, cities, and regions.

Use these identifiers to construct your requests.

Note: These identifiers are available across all travel services and you can use them for both accommodotation and car rentals requests.

Operations

Payments

Provides generic payment-related endpoints, including supported currencies and payment types.

Operations

Languages

Provides a list of supported language codes for use in API requests.

Operations

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.

Operations

Messages

Provides endpoints for two-way post-booking communication between guests and properties.

Use these endpoints to send and retrieve messages, exchange images, and check conversation details.

Operations

Send a message

Request

Sends a message within a conversation. The message body supports plain text. Optionally, attach a file by referencing a previously uploaded attachment ID.

Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/jsonrequired
conversationstringrequired

Unique identifier of the conversation.

accommodationstringrequired

Unique identifier of the property.

contentstringrequired

The message text to send.

attachmentsArray of strings

Optional list of attachment IDs, if sending one or more files.

curl -i -X POST \
  https://demandapi.booking.com/3.1/messages/send \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "conversation": "8586a789-44f4-5521-9f27-f5efd097cba6",
    "accommodation": "6819547",
    "content": "Hello, I'\''m your guest!.",
    "attachments": [
      "c325f460-1dc6-11f0-80f0-8d0908786f77"
    ]
  }'

Responses

Message sent successfully.

Bodyapplication/json
request_idstring

Unique identifier for this request. Provide this ID when contacting support.

dataobject
Response
application/json
{ "request_id": "cdb0b154-2eae-481b-8fee-fb2725296e1f", "data": { "message": "3164e570-19e0-11f0-baca-e5019c8df435" } }

Fetch latest messages

Request

Retrieves up to 100 of the most recent messages from a specified conversation, including messages from both property and guest.

  • Messages are returned in reverse chronological order (newest first).
  • Use this endpoint to sync message threads or poll for updates.

Important: This endpoint does not accept a request body. To retrieve the latest messages, send an empty POST request.
Any content in the request body will be ignored.

Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

curl -i -X POST \
  https://demandapi.booking.com/3.1/messages/latest \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'X-Affiliate-Id: 0'

Responses

Latest messages fetched successfully.

Bodyapplication/json
request_idstring

Unique identifier for this request. Provide this ID when contacting support.

dataobject
Response
application/json
{ "request_id": "0248d85a-17e0-44b3-a37c-7d4b5c03f58b", "data": { "messages": [] } }

Confirm message receipt

Request

Confirms receipt of specified messages. This confirmation is required before receiving new messages from the POST /messages/latest endpoint.

Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/jsonrequired
messagesArray of strings
Example: ["8586a789-44f4-5521-9f27-f5efd097cba"]
curl -i -X POST \
  https://demandapi.booking.com/3.1/messages/latest/confirm \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "messages": [
      "8586a789-44f4-5521-9f27-f5efd097cba"
    ]
  }'

Conversations

Provides endpoints to retrieve and manage messaging conversations.

Use these endpoints to list conversations, fetch conversation details, and track updates.

Operations

Attachments

Provides endpoints for handling message attachments.

Use these endpoints to upload and download images shared within conversations.

Operations