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 Retrieve or Cancel a Car Rental Booking

Last updated: 2026-03-03

How to Retrieve or Cancel a Car Rental Booking

After creating a booking, you can retrieve its details at any time or cancel it if the customer's plans change. This article covers both the Retrieve Booking and Cancel Booking endpoints.

Retrieve a Booking

Endpoint

GET /cars/api/v2/bookings/{booking_id}

Path Parameters

ParameterTypeRequiredDescription
booking_idstringYesThe booking ID returned by the Create Booking endpoint (e.g., XNCTPN3cuzY).

Example Request

HTTP
GET /cars/api/v2/bookings/XNCTPN3cuzY
x-api-key: YOURAPIKEY
x-correlation-id: 550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer YOUR_SIGNATURE

Example Response

JSON
{
  "data": {
    "core": {
      "reference_number": "XNCTPN3cuzY",
      "reservation_status": "CONFIRMED",
      "customer": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@example.com",
        "phone": "+1-555-123-4567"
      },
      "vehsegmentcore": {
        "vehrentalcore": {
          "pickupdatetime": "2026-06-15T10:00:00",
          "returndatetime": "2026-06-20T10:00:00",
          "pickup_location": {
            "name": "Hertz - Manhattan Midtown"
          },
          "return_location": {
            "name": "Hertz - Manhattan Midtown"
          }
        },
        "vehicle": {
          "name": "Toyota Camry or similar",
          "sipp_code": "CCAR",
          "vehicle_type": "Sedan",
          "vehicle_size": "Standard",
          "transmission_type": "Automatic",
          "air_conditioning": true,
          "passenger_quantity": 5,
          "baggage_quantity": 2
        },
        "rental_rate": {
          "vehicle_charges": [
            {
              "currency_code": "USD",
              "base_price": 245,
              "total_price": 289.75,
              "tax_inclusive": true,
              "purpose": "rental"
            }
          ]
        }
      },
      "fees": []
    }
  }
}

Response Fields

FieldDescription
referencenumberThe booking reference, same as the booking ID.
reservationstatusCurrent status of the booking (e.g., "CONFIRMED").
customerCustomer contact details.
vehsegmentcoreContains rental dates, locations, vehicle info, and rate details.
feesAny fees associated with the booking.

Reservation Status Values

StatusDescription
CONFIRMEDThe booking is active and confirmed.
CANCELLEDThe booking has been cancelled.
COMPLETEDThe rental period has ended.
NO_SHOWThe customer did not pick up the vehicle.

Cancel a Booking

Endpoint

PATCH /cars/api/v2/bookings/{bookingid}?token={bookingtoken}

Parameters

ParameterTypeRequiredLocationDescription
booking_idstringYesPathThe booking ID.
tokenstringYesQueryThe booking token returned by the Create Booking endpoint.
No request body is required.

Example Request

HTTP
PATCH /cars/api/v2/bookings/XNCTPN3cuzY?token=eyJhbGciOiJIUzI1NiIsInR5cCI6...
x-api-key: YOURAPIKEY
x-correlation-id: 550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer YOUR_SIGNATURE

Example Response

JSON
{
  "data": {
    "core": {
      "cancel_status": "Cancelled",
      "cancel_rules": [
        {
          "amount": 0
        }
      ]
    },
    "info": {
      "veh_reservation": {
        "reservation_status": "Cancelled by customer",
        "fees": []
      }
    }
  }
}

Response Fields

FieldDescription
cancelstatusCancellation outcome. "Cancelled" indicates success.
cancelrulesArray of cancellation fee rules. An amount of 0 means no fee.
reservation_statusUpdated status string (e.g., "Cancelled by customer").
feesAny fees charged as a result of the cancellation.

Cancellation Fees

Cancellation fees depend on the vendor's cancellation policy and how close to the pickup date the cancellation occurs. The cancel_rules array in the response shows the actual fee charged.

Typical cancellation policies include:

Policy TypeDescription
Free cancellationamount: 0 — No fee charged. Common when cancelled well in advance.
Partial feeA percentage or fixed amount is charged based on proximity to the pickup date.
Full chargeThe full rental amount is charged. Applies to non-refundable bookings or very late cancellations.

To check the cancellation policy before cancelling, review the raterules.cancellationpolicy field from the Rental Details endpoint.

Best Practices

  • Always store both the booking id and token at the time of booking. You need both to cancel a reservation.
  • Check the cancellation policy first. Display the policy to the customer and get their confirmation before sending the cancel request.
  • Handle already-cancelled bookings gracefully. If you attempt to cancel a booking that is already cancelled, the API will return an appropriate error.
  • Use the Retrieve endpoint to confirm cancellation. After a successful cancel, you can call the Retrieve endpoint to verify the reservation_status has changed.
  • Display the cancellation fee. Always show the cancel_rules amount to the customer in the cancellation confirmation screen.

Was this article helpful?