Car rental quick guide
Follow this quick guide to start playing with our Car rental API collection in your client application.
This quick guide shows the minimum steps needed to integrate the Demand API car rental endpoints in the Search and look flow.
- Purpose: Fast setup to search, retrieve car rental details, display results and redirect for booking.
- When to use: You’re not familiar with the Car rental APIs and want to try it quickly.
- Integration: Search & Look flow (with URL booking redirection).
- You´ll learn how to:
- Search for car rentals.
- Retrieve results and car rental details.
- Display results.
- Redirect to book car rental.
- Code samples: Minimal, only required fields.
Before you start
Before you start, make sure you’ve completed the prerequisites. You’ll need:
✓ A valid API key token.
✓ Your X-Affiliate-Id
✓ Open the try out console.
Use case
This use case represents a typical Cars API scenario:
A traveller visiting your website wants to add car rental for their upcoming holiday in Edinburgh, Scotland.
They want to book a medium sized car for 8 days.
The traveller is in the Netherlands and is using your website from their mobile phone.
To get familiar with the Car API flow and the endpoints involved, take this use case as an example in every step of this guide.
- Do not forget to authenticate every call that you make to our endpoints by using your API key - Token and your
X-Affiliate-Idparameter. - For more information, see the Authentication and authorisation section.
Step 1 - Search for vehicles
→ Use the /search request to let travellers search for car rentals and look at the price and list of available vehicles for the route they are interested on.
Search request
These are the key parameters to create your search request (valid for both 3.1 and 3.2 versions).
Key parameters | Description | Recommendation |
booker.country | Specify the country from which the search request is made.
|
|
currency | Specify the three-letter code that uniquely identifies the country's monetary currency. | For this example, you will use "EUR" as the traveller is in the Netherlands.
|
driver.age | This field determines if age related fees are required or not. | If the customer’s age is known, send the actual age (Must be a number between 18 and 99)
|
route.pickup/ dropoff | Specify the traveller's requested pickup and dropoff dates and times. | Use the YYYY-MM-DDTHH:MM:SS. |
route.pickup/ dropoff.location | Specify location where pickup/dropoff is taking place. | Use the IATA three-letter code to identify an airport. In this case, would be: EDI for Edimburgh airport.
|
Locations can be specified using airport IATA codes, city IDs, or latitude/longitude coordinates.
For the provided use case you should create a request body similar to this example:
{
"booker": {
"country": "nl"
},
"currency": "EUR",
"driver": {
"age": 36
},
"route": {
"pickup": {
"datetime": "2026-09-01T10:00:00",
"location": {
"airport": "EDI"
}
},
"dropoff": {
"datetime": "2024-09-08T11:05:00",
"location": {
"airport": "EDI"
}
}
}
}
Example with latitude and longitude coordinates:
{
"booker": {
"country": "nl"
},
"currency": "EUR",
"driver": {
"age": 36
},
"route": {
"pickup": {
"datetime": "2026-09-01T10:00:00",
"location": {
"coordinates": {
"latitude": 52.309456,
"longitude": 4.762266
}
}
},
"dropoff": {
"datetime": "2026-09-08T11:05:00",
"location": {
"coordinates": {
"latitude": 52.309456,
"longitude": 4.762266
}
}
}
}
}
See the Cars search guide and Use cases for best practices.
The response contains a list of vehicles that match the specified search criteria. For each vehicle in the list, the response contains:
In this case, 3.1 version response has these parameters:
Key parameters | |
car | The car’s unique identifier (id).
|
deal | Contains promotional deal details when available, including discount percentage, deal tags, and the original (public) price.
|
policies | Includes the policies applied on cancellations, fuel, mileage and payment.
|
policies.payment | The timing when the payment takes place.
|
price | The total price for each vehicle that is available for the specified search criteria.
|
route.pickup/ dropoff | A depot id is retrieved in both the pickup and dropoff fields. |
Supplier id | You can use this id in step 2 to get further details about a specific supplier. |
URL | The links point to the relevant Booking App search page, and cars.booking.com search page.
|
next_page | All results are paginated for better readability. |
Step 2 - Retrieve car details
Before you show the search results to the traveller, you need to get additional content about each vehicle, the supplier and the depot(s).
You can do it in two different ways:
a) Using the stored static data.
b) Alternatively you can call the static data endpoints:
| Endpoint | Use it to ... |
| /cars/details | Get additional information about the available vehicles. |
| /cars/suppliers | Return the list of available cars suppliers. |
| /cars/depots | For information about the pickup and dropoff locations returned in the cars/search response. |
| /cars/constants | For localised car rental constants (e.g., fuel types, transmission, payment timings). |
Note: These endpoints remain unchanged between versions 3.1 and 3.2. It continues to be used to fetch static car information such as capacity, make, model, and specifications, etc. See the Cars details guide and Static data for best practices.
Step 3 - Display your search results page
You now have the necessary information to display the search results to the traveller.
Use data from both the cars/search and car/details responses to provide the level of detail suited to your business needs.
Recommendations
Limiting the number of results
To improve the search experience, consider limiting the maximum number of results displayed.
{
"last_modified": "2024-12-01T11:05:00+00:00",
"maximum_results": 100
}Keeping content up-to-date
For static content (e.g., data from the car/details endpoint), we recommend checking the last_modified timestamp to ensure the information is up-to-date.
Timestamps follow the ISO 8601 standard, with the format: YYYY-MM-DDTHH:MM:SSZ (UTC only).
Show supplier logo
When displaying supplier results, consider showing the supplier’s logo alongside their name.
This helps travellers easily recognise the supplier and makes their decision-making process smoother.
Display scores
We also recommend showing the total score, as well as the breakdown of scores for each depot, on the search results page.
This can significantly aid the traveller in their booking decision.
See the Look at details guide for best practices.
Step 4 - Redirect the traveller to complete the booking
After a traveller has chosen the vehicle they want to book, you should redirect them to the URL (either app or web link) returned in your /search response.
- Go to the /search response.
- Copy the returned Booking URL.
- Redirect the traveller to the selected URL.
For example:
"url": {
"app": "booking://search?affiliate_id=xxxxx&driver_age=25&do_time=2024-06-22T10:00&do_loc_iata=MAN&pu_time=2024-06-20T10:00&pu_loc_iata=LHR&pu_loc_name=London+Heathrow+Airport&expand_search=false",
"web": "https://cars.booking.com/search-results?vehicleId=699340901&vehicleInfo.vehicle.id=699340901&aid=xxxxxxx&prefcurrency=USD&preflang=en&driversAge=25&doHour=10&doMinute=0&doDay=22&doMonth=6&doYear=2024&dropLocationIata=MAN&puHour=10&puMinute=0&puDay=20&puMonth=6&puYear=2024&locationIata=LHR&locationName=London+Heathrow+Airport"
}- See the Search guide and Use cases for examples and best practices.
- Ready to migrate your integration? Check out our Migration guide to smoothly transition to 3.2 Demand API car rental.
- Ready for the full Search, look and book flow? Follow the end to end tutorial.