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
| Parameter | Type | Required | Description |
|---|---|---|---|
booking_id | string | Yes | The 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
| Field | Description |
|---|---|
referencenumber | The booking reference, same as the booking ID. |
reservationstatus | Current status of the booking (e.g., "CONFIRMED"). |
customer | Customer contact details. |
vehsegmentcore | Contains rental dates, locations, vehicle info, and rate details. |
fees | Any fees associated with the booking. |
Reservation Status Values
| Status | Description |
|---|---|
CONFIRMED | The booking is active and confirmed. |
CANCELLED | The booking has been cancelled. |
COMPLETED | The rental period has ended. |
NO_SHOW | The customer did not pick up the vehicle. |
Cancel a Booking
Endpoint
PATCH /cars/api/v2/bookings/{bookingid}?token={bookingtoken}
Parameters
| Parameter | Type | Required | Location | Description |
|---|---|---|---|---|
booking_id | string | Yes | Path | The booking ID. |
token | string | Yes | Query | The booking token returned by the Create Booking endpoint. |
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
| Field | Description |
|---|---|
cancelstatus | Cancellation outcome. "Cancelled" indicates success. |
cancelrules | Array of cancellation fee rules. An amount of 0 means no fee. |
reservation_status | Updated status string (e.g., "Cancelled by customer"). |
fees | Any 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 Type | Description |
|---|---|
| Free cancellation | amount: 0 — No fee charged. Common when cancelled well in advance. |
| Partial fee | A percentage or fixed amount is charged based on proximity to the pickup date. |
| Full charge | The 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
idandtokenat 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_statushas changed. - Display the cancellation fee. Always show the
cancel_rulesamount to the customer in the cancellation confirmation screen.