Last updated

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).

⏱️ Estimated time to complete: 25 – 40 minutes

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:
    1. Search for car rentals.
    2. Retrieve results and car rental details.
    3. Check availability.
    4. Display Terms and Conditions.
    5. 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.

Important

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.

Authenticate every request

Include your API key token and your X-Affiliate-Id in every request. See Authentication.

Integration overview

Search, look and book integration for cars

Endpoints flow and key fields

StepEndpointResultYou will need next
  1. Search for vehicles (v3.2)
cars/searchReturns available cars with prices and basic details.
  • Key fields: search_token, offer, car.id
Availability, T&Cs.
  1. Retrieve details (v3.2)
/cars/suppliers
/cars/depots
/cars/details
Access vehicle, supplier, and depot information (static data).
  • Key fields: Static car.id, supplier info, etc.
UI rendering.
  1. Check availability (3.2 Beta)
/cars/availabilityReturns full price breakdown and optional extras (e.g., child seat, GPS).
  • Key fields: Live pricing, products
T&Cs, Preview.
  1. Display Terms & Conditions (3.2 Beta)
/cars/terms-and-conditionsDisplays T&Cs for selected vehicle before booking.
  • Key fields: Displayable legal info.
Preview.
  1. Preview the order (3.2 Beta)
/orders/previewPreview of payment, details, etc.
  • Key field: order_token
Create order.
  1. Create order (3.2 Beta)
orders/createComplete the booking within your platform.
  • Key fields: order.id, reservation_id
Post-booking operations.

Identifier glossary

FieldMeaningUsed in
carCar model + fleet identifier/cars/details
offerSpecific commercial offerAvailability, Preview, Create
search_tokenSearch session contextAvailability, T&Cs, Preview
order_tokenLocked 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.
City and country lookup
  • Use the location airports and countries endpoints to resolve the IDs and ISO‑2 codes.
  • Country codes must be lowercase (e.g., nl).

Try it yourself

After this step you should have:

  • car.id
  • offer
  • search_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
}

Try it yourself

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 id details.
  • supplier id 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.

Try it yourself

To process bookings directly in your application (Search, look & book flow) you must use the /orders API collection (currently in Beta).

Important

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:

  • offer
  • search_token
  • currency
{
  "currency": "EUR",
  "car": {
    "offer": 664812451, 
    "search_token": "eyJhbGciOiJIUzI1NiJ9.eyJwIjp7InNlYXJjaF9rZXkiOiJleUprY21sMlpYSnpRV2RsSWpvek1Dd2laSEp2Y0U5bVprUmhkR1ZVYVcxbElqb2lNakF5Tmkwd01TMHhOVlF4TVRvd05Ub3dNQ0lzSW1SeWIzQlBabVpNYjJOaGRHbHZiaUk2SWtKRFRpSXNJbVJ5YjNCUFptWk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY0dsamExVndSR0YwWlZScGJXVWlPaUl5TURJMkxUQXhMVEV3VkRFeE9qQTFPakF3SWl3aWNHbGphMVZ3VEc5allYUnBiMjRpT2lKQ1EwNGlMQ0p3YVdOclZYQk1iMk5oZEdsdmJsUjVjR1VpT2lKSlFWUkJJaXdpY21WdWRHRnNSSFZ5WVhScGIyNUpia1JoZVhNaU9qVXNJbk5sY25acFkyVkdaV0YwZFhKbGN5STZXeUpUVlZCUVVrVlRVMTlFU1ZKRlExUmZVRUZaWDB4UFEwRk1YMVpGU0VsRFRFVlRJbDBzSW5OcFoyNWhkSFZ5WlNJNkltMVFURk5MVXpWbVlVMXRRbVE1V0ZGdGFIQm5MMkZvTTNKdFQyNDVVRXRGZGtnck5uaFpZV1V2YlZVOUluMD0iLCJib29rZXIiOnsiY291bnRyeSI6ImVzIn0sImRyaXZlcl9hZ2UiOjMwfSwiYXVkIjpbIi9jYXJzL2F2YWlsYWJpbGl0eSIsIi9vcmRlcnMvcHJldmlldyIsIi9jYXJzL3Rlcm1zLWFuZC1jb25kaXRpb25zIl0sImV4cCI6MTc2NDE3MzI0M30.cB9yzO8jwfWa-FGnChdUjvyMP_lzSrU9HnVjhsQnfSw"
  }
}

Note: The search_token expires after 90 minutes.

Try it yourself

After this step you should have:

  • order_token that encapsulates all the order details.
  • Use it on your orders/create request.
Attention

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.

Security

Never store or log raw card details. All payment handling must comply with PCI requirements.

You must include:

  • The car driver details -address, email, name and telephone number.

  • booker - Specify the address, email, name and telephone number details of the person who is making the booking.

  • order_token:

  • The selected payment option:

    • card - Specify the card details provided by the traveller.
    • include_receipt - Set to true to generate a receipt that you can provide to the traveller.
    • method - Specify the payment method.
    • timing - Choose between pay_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
  }
}

Try it yourself

🎉 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.

Curious to know more?