Getting Started with the Xeni Activities APIHow to Book an ActivityHow to Browse Activity Tags and CategoriesHow to Cancel an Activity BookingHow to Check Activity AvailabilityHow to Get Activity DetailsHow to Retrieve Activity Booking DetailsHow to Search for Activities with FiltersHow to Search for Activity DestinationsCar Rental API - Getting StartedCar Rental API - Understanding Response FieldsHow to Book a Car RentalHow to Get Rental Car Details and Equipment Add-OnsHow to Retrieve or Cancel a Car Rental BookingHow to Search for Available Rental CarsHow to Search for Pickup LocationsHow to Use Car Rental Search FiltersDeals API Best Practices for IntegrationDeals API Frequently Asked QuestionsGetting Started with the Xeni Deals APIDeals API Request Parameters and Headers ReferenceDeals API Supported Currencies and LocalizationHow to Display Deals in Your ApplicationHow to Fetch Hotel Deals by LocationFlights API Error Codes and TroubleshootingGetting Started with the Xeni Flights APIHow to Book a FlightHow to Check Flight Availability and PricingHow to Confirm or Cancel a Flight BookingHow to Retrieve Fare Rules for a FlightHow to Retrieve Flight Booking DetailsHow to Search for Airports Using AutocompleteHow to Search for FlightsHow to Use Flight Search Filters, Sorting, and PaginationHow to Check Room Availability and PricingHow to Filter Vacation Rental ResultsHow to Get Resort Property Details, Amenities, and AccessibilityHow to Hold and Confirm a Resort BookingHow to Release a Resort HoldHow to Retrieve Resort Booking DetailsHow to Search for Available ResortsHow to Search for Resort DestinationsHow to Search for Vacation Rental LocationsHow to Search for Vacation RentalsHow to Use Resort Search Filters and SortingGetting Started with the Xeni Resorts APIResorts API: Understanding Booking Statuses and PoliciesGetting Started with the Vacation Rentals APIVacation Rentals Frequently Asked QuestionsVacation Rentals Supported Property TypesUnderstanding Async Search for Vacation RentalsAuthentication & API SignaturesBooking Hotels — Direct API & SSO CheckoutError Handling, Rate Limits & Best PracticesGetting Started with the Xeni Hotels APIManaging Bookings: Status, Retrieval & CancellationPricing Confirmation & Token LifecycleRetrieving Hotel Details & Room AvailabilitySearching for Hotels: Locations, Filters & PaginationSearching for HotelsSession Management & Correlation IDsAPI authentication and getting your API keys

How to Book a Car Rental

Last updated: 2026-03-03

How to Book a Car Rental

Once the customer has selected a vehicle and reviewed the details, use the Create Booking endpoint to confirm the reservation. This endpoint accepts customer information, optional additional drivers, and selected equipment add-ons.

Endpoint

POST /cars/api/v2/bookings?currency=USD

Query Parameters

ParameterTypeRequiredDescription
currencystringYesThree-letter currency code (e.g., USD, EUR).

Request Body

JSON
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6...",
  "customer": {
    "birth_date": "1990-05-15",
    "language": "en",
    "gender": "M",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+1-555-123-4567",
    "email": "john.doe@example.com",
    "address": {
      "street": "123 Main Street",
      "city": "New York",
      "postal_code": "10001"
    },
    "citizencountrycode": "US",
    "additional_drivers": [
      {
        "birth_date": "1988-03-22",
        "first_name": "Jane",
        "last_name": "Doe"
      }
    ]
  },
  "equipments": [
    {
      "code": "CSI",
      "quantity": 1
    },
    {
      "code": "NAV",
      "quantity": 1
    }
  ]
}

Request Body Fields

Top-Level Fields

FieldTypeRequiredDescription
tokenstringYesThe availability token from the Search Rentals or Rental Details response.
customerobjectYesCustomer details (see below).
equipmentsarrayNoList of selected equipment add-ons (see below).

Customer Object

FieldTypeRequiredDescription
birthdatestringYesDate of birth in YYYY-MM-DD format.
languagestringNoPreferred language code (e.g., en, es).
genderstringYesGender: "M" for male, "F" for female.
firstnamestringYesCustomer's first name. Must match the driver's license.
lastnamestringYesCustomer's last name. Must match the driver's license.
phonestringYesContact phone number with country code.
emailstringYesContact email address. Booking confirmation is sent here.
addressobjectYesCustomer's address (see below).
citizencountrycodestringYesTwo-letter ISO country code of the customer's citizenship.
additionaldriversarrayNoList of additional driver objects (see below).

Address Object

FieldTypeRequiredDescription
streetstringYesStreet address.
citystringYesCity name.
postal_codestringYesPostal or ZIP code.

Additional Driver Object

FieldTypeRequiredDescription
birthdatestringYesDate of birth in YYYY-MM-DD format.
firstnamestringYesDriver's first name.
last_namestringYesDriver's last name.

Equipment Object

FieldTypeRequiredDescription
codestringYesEquipment code from the Rental Details response (e.g., CSI).
quantitynumberYesNumber of units. Must not exceed the max_quantity from details.

Example Response

JSON
{
  "data": {
    "status": "Confirmed",
    "id": "XNCTPN3cuzY",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6...",
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone": "+1-555-123-4567"
    },
    "vehrentalcore": {
      "pickupdatetime": "2026-06-15T10:00:00",
      "returndatetime": "2026-06-20T10:00:00",
      "pickup_location": {
        "name": "Hertz - Manhattan Midtown",
        "address": "310 W 40th St, New York, NY 10018"
      },
      "return_location": {
        "name": "Hertz - Manhattan Midtown",
        "address": "310 W 40th St, New York, NY 10018"
      }
    },
    "vehicle": {
      "name": "Toyota Camry or similar",
      "sipp_code": "CCAR",
      "vehicle_type": "Sedan",
      "vehicle_size": "Standard"
    },
    "rental_rate": {
      "vehicle_charges": [
        {
          "currency_code": "USD",
          "base_price": 245,
          "total_price": 289.75,
          "tax_inclusive": true,
          "purpose": "rental"
        }
      ]
    },
    "fees": [],
    "payment_rules": []
  }
}

Response Fields

FieldDescription
statusBooking status. A successful booking returns "Confirmed".
idUnique booking ID. Use this to retrieve or cancel the booking.
tokenBooking token. Required for cancellation requests.
customerSummary of customer details.
vehrentalcoreRental dates and location details.
vehicleVehicle information.
rentalratePricing breakdown.
feesAny additional fees applied to the booking.
paymentrulesPayment terms and conditions.

Important Notes

  • Store both the id and token from the response. The id is needed to retrieve the booking, and the token is required for cancellation.
  • Customer names must match the driver's license that will be presented at the rental counter.
  • Driver age restrictions are enforced. The customer's age (calculated from birthdate) must fall within the minimumage and maximum_age from the rate restrictions. The same applies to additional drivers.
  • Equipment quantities must not exceed the max_quantity returned by the Rental Details endpoint.
  • Booking confirmation is sent to the email address provided in the customer.email field.

Error Handling

Common error scenarios include:

ScenarioLikely Cause
Token expiredThe availability token has a limited validity window. Re-run the search.
Driver age out of rangeThe customer's age does not meet the vendor's age requirements.
Equipment unavailableThe requested equipment code or quantity is no longer available.
Missing required fieldsOne or more required fields in the request body are missing.

If a booking fails, check the error response message for details and prompt the user to correct the issue before retrying.

Was this article helpful?