HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/api/cars/v1/bookBookBook an offer.
Create a car rental order for a chosen offer, using the offer_id and any necessary driver details. It finalizes the booking process with the provider and, if applicable, initiates the sending of an itinerary or confirmation email to the customer.
Request body application/json · required
Request body for finalizing a car rental order.
request_idUnique identifier of the specific request. Use this identifier when you need to refer to a specific request, when requiring technical support.
123e4567-e89b-12d3-a456-426614174000book_tokenOpaque token generated at quote time to initiate a book request.
book_12345partner_reference_idAn client determined id for the given booking for potential reconciliation.
123e4567-e89b-12d3-a456-426614174000driverDetails of the primary driver for the booking.
Show fields
emailThe email address of the primary driver.
john.doe@example.comfirst_nameThe first name of the primary driver.
Johnlast_nameThe last name of the primary driver.
Doedate_of_birthThe date of birth of the primary driver in ISO 8601 format. The driver age must match the age provided in the shop request.
1990-05-20phonePhone number of the driver.
^\+?[0-9]{7,15}$ · Example +18339334671Responses
200Book a order successfully.
order_idThe unique identifier of the confirmed order.
ORD-987654321response_idUnique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.
123e4567-e89b-12d3-a456-426614174000400Invalid Request. There will be an error code in the response detailing the issue.
error_codeA specific code identifying the type of error.
invalid_inputinvalid_book_tokenrate_unavailabledriver_age_changedage_restriction_not_metprice_changedbooking_conflictadvance_lead_time_not_metdescriptionA human-readable message providing more details about the error.
response_idUnique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.
123e4567-e89b-12d3-a456-426614174000Example
{
"error_code": "invalid_input",
"description": "string",
"response_id": "123e4567-e89b-12d3-a456-426614174000"
}500Internal server error
error_codeError returned when an internal server error occurs.
internal_server_error · Example internal_server_errordescriptionA human-readable description of the error.
An unexpected error occurred.response_idUnique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.
123e4567-e89b-12d3-a456-426614174000Example
{
"error_code": "internal_server_error",
"description": "An unexpected error occurred.",
"response_id": "123e4567-e89b-12d3-a456-426614174000"
}curl -X POST "https://travel-distribution.staging.htsapis.com/api/cars/v1/book" \
-H "HTS-API-KEY: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "123e4567-e89b-12d3-a456-426614174000",
"book_token": "book_12345",
"partner_reference_id": "123e4567-e89b-12d3-a456-426614174000",
"driver": {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-05-20",
"phone": "+18339334671"
}
}'{
"order_id": "ORD-987654321",
"response_id": "123e4567-e89b-12d3-a456-426614174000"
}Examples are generated from the schema where the spec publishes none; field values are illustrative.
