Integration types
Use the Demand API to implement the right integration for your particular business scenario.
The following sections describe the basic flows that you can use in your Demand API integration, and the endpoints that you need to use to implement them.
Content only
Let travellers browse relevant content about Booking.com properties directly from your application. Redirect travellers to Booking.com so that they can find what availability and prices a property has, and make bookings.
Content is static data about a property that may change infrequently, if at all - such as its address, or photos of the property.
In your application:
- Use the static data endpoints to build a local cache containing data relevant to your business scenario.
- Display the content that you want to share with travellers.
- Redirect travellers to Booking.com when they want to explore further, so that they can check availability and prices, and make bookings.
Static data and caching
Static data comprises two types:
Content: Data about a property that may change infrequently, if at all - such as its address, or photos of the property.
Content is obtained from /accommodations/details, and can be updated by using /accommodations/details/changes.
Reference: Data that provides identifiers (ids or codes) and names (in multiple languages) for different types of location, currencies and payment cards, and languages. The other Demand API endpoints use these ids or codes in their requests and responses.
Reference data is provided by /accommodations/chains, /accommodations/constants, and the /common/* endpoints.
Using a local cache of static data reduces endpoint traffic and improves response times.
Recommendations
We strongly recommend that you use a local cache of static data for any application that you use in a production environment.
- If you do not cache static data, be aware that you will need to call the relevant static data endpoints directly whenever the non-cached data is needed by other endpoints.
- For example, the following diagram shows the additional calls that you may need to make to use /accommodations/search, if you do not already have the necessary information in your local cache.
Do not cache prices or availability data for a property, as this can change frequently and rapidly. Using cached prices or availability data may cause a request to fail because the data is stale and invalid. Price and availability data is returned by the /accommodations/search and /accommodations/availability endpoints.
Search and look
Let travellers search for properties that match their requirements. Show them full details, including current prices and availability, of properties that interest them. Redirect them to Booking.com to make bookings.
In your application:
- Use accommodations/search to provide travellers with a search capability appropriate for your business scenario.
- Use accommodations/availability to let travellers see full price and availability details about properties that they are interested in.
- Provide additional content for your Search results and Property pages from your local cache of static data (or by directly calling the required static data endpoints).
- Redirect travellers to Booking.com when they want to make a booking.
Search, look, and book
Let travellers search for properties that match their requirements. Show them full details, including current prices and availability, of properties that interest them. Let them make bookings directly from your application.
In your application:
- Use accommodations/search to provide travellers with a search capability appropriate for your business scenario.
- Use accommodations/availability to let travellers see full price and availability details about properties that they are interested in.
- Provide additional content for your Search results and Property pages from your local cache of static data (or by directly calling the required static data endpoints).
- Use /orders/preview and /orders/create to let travellers make bookings and submit their payment.
- You can also use /orders/cancel to cancel existing orders.
Post-booking
Perform management and reporting tasks on orders that have been placed.
In your application:
- Use the /orders/details/* endpoints to get information about placed orders, for tasks such as commission reporting and loyalty/rewards management.