Car rental tutorial
Follow this end-to-end tutorial to learn how to integrate the /cars API collection into your client application for a complete Search, look and book flow.
This tutorial walks you through a full Search → Look → Book flow for car rentals using the Demand API v3.2 (including 3.2 Beta).
v3.2 | 3.2 Beta
- Purpose: Build a Search → Look → Book flow for car rentals.
- Who this is for: Managed Affiliated Partners integrating car rentals into their booking flow (currently part of the pilot programme).
- Prerequisites: Basic understanding of Booking.com Demand API and API authentication.
- Integration type: Search, look and book flow.
- You´ll learn how to:
- Search for car rentals.
- Retrieve results and car rental details.
- Check availability.
- Display Terms and Conditions.
- Create bookings in your app via the /orders endpoints.
- Code samples: Full request/response bodies with annotations.
Before you start
Make sure you have completed the prerequisites.
✓ A valid API key token.
✓ Your X-Affiliate-Id
✓ Open the try out console.
Search, look & book requires approval, a valid business case, and an appropriate partner agreement with Booking.com.
Use case
The following use case represents a typical car-rental scenario:
A traveller wants to book a car rental in Barcelona, picking up and dropping off at Barcelona Airport (BCN).
Duration: 3 days, 2 adults, unlimited mileage preferred.
Use this scenario when following each step of the guide.
Include your API key token and your X-Affiliate-Id in every request. See Authentication.
Integration overview
Endpoints flow and key fields
| Step | Endpoint | Result | You will need next |
|---|---|---|---|
| cars/search | Returns available cars with prices and basic details.
| Availability, T&Cs. |
| /cars/suppliers /cars/depots /cars/details | Access vehicle, supplier, and depot information (static data).
| UI rendering. |
| /cars/availability | Returns full price breakdown and optional extras (e.g., child seat, GPS).
| T&Cs, Preview. |
| /cars/terms-and-conditions | Displays T&Cs for selected vehicle before booking.
| Preview. |
| /orders/preview | Preview of payment, details, etc.
| Create order. |
| orders/create | Complete the booking within your platform.
| Post-booking operations. |
Identifier glossary
| Field | Meaning | Used in |
|---|---|---|
car | Car model + fleet identifier | /cars/details |
offer | Specific commercial offer | Availability, Preview, Create |
search_token | Search session context | Availability, T&Cs, Preview |
order_token | Locked booking snapshot | /orders/create |
Step 1 - Search for car rentals
→ Use the cars/search endpoint to find car rentals.
Your search request may look like this:
{
"booker": {
"country": "es"
},
"language": "en-gb",
"currency": "EUR",
"driver": {
"age": 30
},
"route": {
"pickup": {
"datetime": "2026-01-10T11:05:00",
"location": {
"airport": "BCN"
}
},
"dropoff": {
"datetime": "2026-01-15T11:05:00",
"location": {
"airport": "BCN"
}
}
}
}Common input fields:
- route. pickup & dropoff locations and times.
driver.age— Required for pricing. May affect coverage/taxes.booker.country— Pricing depends on user context.
After this step you should have:
car.idoffersearch_token
Use them in next steps requests.
Step 2 - Retrieve car details
Retrieve static reference data for cars, depots, and suppliers. You can use cached data (recommended for performance) or call the endpoints directly.
See Cache static data guide for details
Example:
→ Call /cars/details to get additional data about the cars.
{
"last_modified": "2025-11-22T10:00:00+00:00",
"maximum_results": 100
}Build your results and vehicle details page
→ Combine data from:
- cars/search - summary.
- Static data - full details.
Recommended essentials per product:
- Vehicle photo and category.
- Fuel and mileage policy.
- Supplier and desk location.
- Deposit / deductible.
- Cancellation rules.
After this step you should have:
- Car
iddetails. supplierid for branding.
The traveller reviews the search results and selects the car they’re interested in..
Now they want to see availability.
Step 3 - Check availability
→ Use the car's availability endpoint with the offer, search_token and currency from Step 1.
Note: The search_token expires after 90 mins.
{
"offer": 664812451,
"search_token": "eyJhbGciOiJIUzI1NiJ9.eyJwIjp7InNlYXJjaF9rZXkiOiJleUprY21sMlpYSnpRV2RsSWpvek1Dd2laSEp2Y0U5bVprUmhkR1ZVYVcxbElqb2lNakF5Tmkwd01TMHhOVlF4TVRvd05Ub3dNQ0lzSW1SeWIzQlBabVpNYjJOaGRHbHZiaUk2SWtKRFRpSXNJbVJ5YjNCUFptWk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY0dsamExVndSR0YwWlZScGJXVWlPaUl5TURJMkxUQXhMVEV3VkRFeE9qQTFPakF3SWl3aWNHbGphMVZ3VEc5allYUnBiMjRpT2lKQ1EwNGlMQ0p3YVdOclZYQk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY21WdWRHRnNSSFZ5WVhScGIyNUpia1JoZVhNaU9qVXNJbk5sY25acFkyVkdaV0YwZFhKbGN5STZXeUpUVlZCUVVrVlRVMTlFU1ZKRlExUmZVRUZaWDB4UFEwRk1YMVpGU0VsRFRFVlRJbDBzSW5OcFoyNWhkSFZ5WlNJNkltMVFURk5MVXpWbVlVMXRRbVE1V0ZGdGFIQm5MMkZvTTNKdFQyNDVVRXRGZGtnck5uaFpZV1V2YlZVOUluMD0iLCJib29rZXIiOnsiY291bnRyeSI6ImVzIn0sImRyaXZlcl9hZ2UiOjMwfSwiYXVkIjpbIi9jYXJzL2F2YWlsYWJpbGl0eSIsIi9vcmRlcnMvcHJldmlldyIsIi9jYXJzL3Rlcm1zLWFuZC1jb25kaXRpb25zIl0sImV4cCI6MTc2NDE3MzI0M30.cB9yzO8jwfWa-FGnChdUjvyMP_lzSrU9HnVjhsQnfSw",
"currency": "EUR"
}
→ (Try it yourself)
See the Cars availability guide for full step-by-step details.
After this step you should have:
- Final price confirmation (
price.total) - Optional extras (
products.id)
The traveller reviews the results and selects a car.
Step 4 - Display Terms & Conditions (Beta)
→ Use the cars/terms-and-conditions.
{
"offer": "664812451",
"search_token": "eyJhbGciOiJIUzI1NiJ9.eyJwIjp7InNlYXJjaF9rZXkiOiJleUprY21sMlpYSnpRV2RsSWpvek1Dd2laSEp2Y0U5bVprUmhkR1ZVYVcxbElqb2lNakF5Tmkwd01TMHhOVlF4TVRvd05Ub3dNQ0lzSW1SeWIzQlBabVpNYjJOaGRHbHZiaUk2SWtKRFRpSXNJbVJ5YjNCUFptWk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY0dsamExVndSR0YwWlZScGJXVWlPaUl5TURJMkxUQXhMVEV3VkRFeE9qQTFPakF3SWl3aWNHbGphMVZ3VEc5allYUnBiMjRpT2lKQ1EwNGlMQ0p3YVdOclZYQk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY21WdWRHRnNSSFZ5WVhScGIyNUpia1JoZVhNaU9qVXNJbk5sY25acFkyVkdaV0YwZFhKbGN5STZXeUpUVlZCUVVrVlRVMTlFU1ZKRlExUmZVRUZaWDB4UFEwRk1YMVpGU0VsRFRFVlRJbDBzSW5OcFoyNWhkSFZ5WlNJNkltMVFURk5MVXpWbVlVMXRRbVE1V0ZGdGFIQm5MMkZvTTNKdFQyNDVVRXRGZGtnck5uaFpZV1V2YlZVOUluMD0iLCJib29rZXIiOnsiY291bnRyeSI6ImVzIn0sImRyaXZlcl9hZ2UiOjMwfSwiYXVkIjpbIi9jYXJzL2F2YWlsYWJpbGl0eSIsIi9vcmRlcnMvcHJldmlldyIsIi9jYXJzL3Rlcm1zLWFuZC1jb25kaXRpb25zIl0sImV4cCI6MTc2NDE3MzI0M30.cB9yzO8jwfWa-FGnChdUjvyMP_lzSrU9HnVjhsQnfSw",
"currency": "EUR",
"language": "es"
}Highlights to display:
- Damage excess and deposit amounts.
- Accepted credit/debit cards.
- Driver & licence requirements.
- Mileage rules.
- Included insurance and waivers.
To process bookings directly in your application (Search, look & book flow) you must use the /orders API collection (currently in Beta).
Requires approval and partner agreement.
Step 5 - Preview the order
→ Use /orders/preview to confirm:
- What will be booked.
- Price & currency.
- Payment timing.
- Cancellation & policies.
To construct the orders/preview request, you need the same values returned in previous steps:
offersearch_tokencurrency
{
"currency": "EUR",
"car": {
"offer": 664812451,
"search_token": "eyJhbGciOiJIUzI1NiJ9.eyJwIjp7InNlYXJjaF9rZXkiOiJleUprY21sMlpYSnpRV2RsSWpvek1Dd2laSEp2Y0U5bVprUmhkR1ZVYVcxbElqb2lNakF5Tmkwd01TMHhOVlF4TVRvd05Ub3dNQ0lzSW1SeWIzQlBabVpNYjJOaGRHbHZiaUk2SWtKRFRpSXNJbVJ5YjNCUFptWk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY0dsamExVndSR0YwWlZScGJXVWlPaUl5TURJMkxUQXhMVEV3VkRFeE9qQTFPakF3SWl3aWNHbGphMVZ3VEc5allYUnBiMjRpT2lKQ1EwNGlMQ0p3YVdOclZYQk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY21WdWRHRnNSSFZ5WVhScGIyNUpia1JoZVhNaU9qVXNJbk5sY25acFkyVkdaV0YwZFhKbGN5STZXeUpUVlZCUVVrVlRVMTlFU1ZKRlExUmZVRUZaWDB4UFEwRk1YMVpGU0VsRFRFVlRJbDBzSW5OcFoyNWhkSFZ5WlNJNkltMVFURk5MVXpWbVlVMXRRbVE1V0ZGdGFIQm5MMkZvTTNKdFQyNDVVRXRGZGtnck5uaFpZV1V2YlZVOUluMD0iLCJib29rZXIiOnsiY291bnRyeSI6ImVzIn0sImRyaXZlcl9hZ2UiOjMwfSwiYXVkIjpbIi9jYXJzL2F2YWlsYWJpbGl0eSIsIi9vcmRlcnMvcHJldmlldyIsIi9jYXJzL3Rlcm1zLWFuZC1jb25kaXRpb25zIl0sImV4cCI6MTc2NDE3MzI0M30.cB9yzO8jwfWa-FGnChdUjvyMP_lzSrU9HnVjhsQnfSw"
}
}Note: The search_token expires after 90 minutes.
After this step you should have:
order_tokenthat encapsulates all the order details.- Use it on your orders/create request.
The order_token expires after 15 minutes. You must therefore call /orders/create within this time window.
Display your order preview page
You can now show the traveller final details of:
- What they are booking
- What they will have to pay.
- When and how they can pay it.
- And the cancellation terms that will apply.
→ Select the data from your /orders/preview response to provide the appropriate information on your preview page.
After checking the details of the order, the traveller supplies their payment information and any other needed information, and proceeds with the booking.
Step 6 - Create the order
→ Call /orders/create to process the payment.
Never store or log raw card details. All payment handling must comply with PCI requirements.
You must include:
The car driver details -
address,email,nameandtelephonenumber.booker- Specify theaddress,email,nameandtelephonenumber details of the person who is making the booking.order_token:- Use the
order_tokenreturned in the /orders/preview response.
- Use the
The selected payment option:
card- Specify the card details provided by the traveller.include_receipt- Set totrueto generate a receipt that you can provide to the traveller.method- Specify the payment method.timing- Choose betweenpay_online_now,pay_partial_online_now,pay_at_pickup.
Your request body should look like this example.
{
"order_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.car-preview-token",
"car": {
"driver": {
"title": "mr",
"first_name": "John",
"last_name": "Doe",
"telephone": "+44 20 1234 5678",
"address": {
"address_line1": "221B Baker Street",
"address_line2": "",
"city": "London",
"country": "gb",
"postcode": "NW1 6XE"
}
},
"label": "summer_campaign_2025"
},
"booker": {
"address": {
"address_line": "221B Baker Street",
"city": "London",
"country": "gb",
"post_code": "NW1 6XE"
},
"company": "ACME Travel",
"email": "john.doe@example.com",
"language": "en-gb",
"name": {
"first_name": "John",
"last_name": "Doe"
},
"telephone": "+44 20 1234 5678"
},
"payment": {
"timing": "pay_online_now",
"method": "card",
"card": {
"cardholder": "John Doe",
"number": "4111111111111111",
"expiry_date": "12/28",
"cvc": "123",
"authentication": {
"3d_secure": {
"authentication_value": "AAABBJg0VhI0VniQEjRGAAAAAAA=",
"eci": "05",
"transaction": "3ds-trans-123456"
}
}
},
"include_receipt": true
}
}
🎉 Congratulations, a confirmed booking now exists in the system.
Recommendation
Never store or log raw card details. All payment handling must comply with PCI requirements.
Integration completion checklist
You should now support:
- ✅ Searching cars by route and date.
- ✅ Displaying real prices & availability.
- ✅ Optional extras upsell.
- ✅ Mandatory pre-booking T&Cs.
- ✅ Order preview with payment timing and method.
- ✅ Booking creation and receipt generation.
Next steps:
- Integrate reporting & labels.
- Check the Orders section for more tips on how to preview and create your orders.
- Learn more about Payment methods.
- Check Payments quick guide for best practices.