HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/api/lodging/v1/shopShopGet all room rates for a lodging
Get all room rates for a lodging for the given search criteria
Request body application/json · required
Search criteria for the room rates
request_idUnique value used to identify this request. If provided to us during operational questions, it will help us provide better support.
123e4567-e89b-12d3-a456-426614174000lodging_idsList of lodging IDs to shop for. (1 to 200)
sales_channelDefines the type of device the user is using. This is a non-exhaustive list of enum values, which will be extended in the future.
- web: User is using a web browser on a desktop or laptop
- mobile_web: User is using a web browser on a mobile device
- mobile_app: User is using a mobile app
webmobile_webmobile_app · Example mobile_apprate_optionsSet of rate options to enable. Each option has its own inventory of rates. See RateOption schema enum for the list of supported options.
point_of_saleDescription of the point of sale where the booking is made. This is typically the user's location.
Show fields
countryCountry code (ISO 3166-1 alpha-2)
^[A-Z]{2}$ · Example UScheck_inThe check-in date. Notes:
- Check-in cannot be in the past.
- Check-in date can be at most 1 year in the future.
2022-01-01check_outThe checkout date. Note:
- Checkout date needs to be at least one day after the check-in date.
- Checkout date can be at most 1 year after the check-in date.
2022-01-02occupancyNumber of guests that want to stay in the lodging
Show fields
adultsNumber of adult guests
2childrenList of children guest ages
petsNumber of pets accompanying the guests
1currencyRequested currency code for the owed now portion of the rates, in ISO 4217 format.
USD · Example USDsales_environmentThe sales environment for the shop request. Defaults to lodging_only if not provided.
lodging_onlylodging_package · Default "lodging_only"Show fields
Responses
200List of room rates for the lodging
lodgingsList of lodgings with room rates
Show fields
lodging_idUnique identifier for the lodging
123e4567-e89b-12d3-a456-426614174000room_ratesList of rooms with its available rates
Show fields
room_idUnique identifier for the room
123e4567-e89b-12d3-a456-426614174000nameName of the room
Standard RoomratesList of available rates for the room
Show fields
payment_schedulePricing breakdown of a rate. Includes the amounts owed at book time and the amounts owed at check-in.
Show fields
merchandisingMerchandising information for promotional badging and marketing displays.
Show fields
productDescribes a bookable rate. Differentiates between two rates for the same room.
Show fields
cancellation_penaltyCancellation penalty for a lodging.
This object will contain an ordered sequence of gapless penalty ranges starting from the booking time and ending at the check-in time.
The penalty amount will be withheld if the cancellation time falls within the range of the start time (inclusive) and end time (exclusive).
A penalty range with 0 amount indicates that the rate if fully refundable on that range. On the other hand, if the penalty amount equals the booking amount, the rate is non-refundable on that range.
Show fields
quote_tokenToken to pass in the quote request. Only returned in shop responses.
stringvalid_untilISO 8601 timestamp until which the quote token remains valid. Only returned in shop responses.
2025-01-13T13:45:15.523Zpayment_clausesList of payment clauses associated with the rate
Show fields
recommended_sellThe recommended tax inclusive sell price for this rate.
If the payment schedule include amounts to be paid both at booking and at check-in, this recommended sell price only includes the taxes and fees paid at booking.
Availability of this field depends on configuration and is not guaranteed.
Hopper provides this field to allow partners to display pricing in a variety of ways. Ultimately, however, each partner using Hopper’s API is responsible for ensuring that the way it displays Hopper travel information and pricing complies with the law.
Show fields
commissionThe estimated commission amount included in the base price. If not specified, there is no commission on this rate.
Show fields
initial_priceInitial sell price of a lodging before any price reductions were applied.
Show fields
unavailability_reasonsList of reasons why the lodging is unavailable. This field is only present if there are no available room_rate. If room_rate is empty and unavailability_reasons is also empty it means that the lodging is unavailable but the reason for the unavailability is unknown.
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-426614174000400Invalid Request. There will be an error code in the response detailing the issue.
error_codeError codes for the shop operation. This is a non-exhaustive list of enum values, which will be extended in the future.
invalid_inputforbiddenunauthorizeddescriptionA human-readable description of 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"
}499Client closed the connection before the response could be sent (HTTP 499). This occurs when clients timeout or cancel requests while the server is still processing. The client will not receive this response. This means a quote, a booking or any other long running process may have been processed.
error_codeError returned when a client closes the connection before the response could be sent.
client_closed_requestdescriptionA human-readable description of what happened. For booking requests, this may include the partner reference ID for tracking.
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-426614174000additional_contextAdditional context about the error. For booking requests, includes partner_reference_id for tracking in BigQuery.
Example
{
"error_code": "client_closed_request",
"description": "string",
"response_id": "123e4567-e89b-12d3-a456-426614174000",
"additional_context": {}
}500Internal server error
error_codeError returned when an internal server error occurs.
internal_server_errordescriptionA human-readable description of 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": "internal_server_error",
"description": "string",
"response_id": "123e4567-e89b-12d3-a456-426614174000"
}curl -X PUT "https://travel-distribution.staging.htsapis.com/api/lodging/v1/shop" \
-H "HTS-API-KEY: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "123e4567-e89b-12d3-a456-426614174000",
"lodging_ids": [
"123e4567-e89b-12d3-a456-426614174000"
],
"sales_channel": "mobile_app",
"sales_environment": {},
"rate_options": [
"member"
],
"point_of_sale": {
"country": "US"
},
"check_in": "2022-01-01",
"check_out": "2022-01-02",
"occupancy": {
"adults": 2,
"children": [
3,
5,
9
],
"pets": 1
},
"currency": "USD"
}'{
"lodgings": [
{
"lodging_id": "123e4567-e89b-12d3-a456-426614174000",
"room_rates": [
{
"room_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Standard Room",
"rates": [
{
"payment_schedule": {
"owed_now": {
"base": {
"currency": "USD",
"amount": "100.00"
},
"taxes": [
{
"category": "tax_recovery_charges",
"currency": "USD",
"amount": "10.00"
},
{
"category": "sales_tax",
"currency": "USD",
"amount": "5.00"
}
],
"fees": [],
"total": {
"currency": "USD",
"amount": "115.00"
}
},
"owed_at_check_in": {
"base": {
"currency": "EUR",
"amount": "0.00"
},
"taxes": [
{
"category": "city_tax",
"currency": "EUR",
"amount": "18.00"
}
],
"fees": [],
"total": {
"currency": "EUR",
"amount": "18.00"
}
}
},
"payment_clauses": [],
"recommended_sell": {},
"commission": {},
"initial_price": {
"base": {
"currency": "USD",
"amount": "100.00"
},
"total": {
"currency": "USD",
"amount": "135.00"
}
},
"merchandising": {},
"product": {},
"cancellation_penalty": {
"penalty_ranges": [
{
"start_time": "2020-01-01T00:00:00Z",
"end_time": "2020-01-02T00:00:00Z",
"penalty": {
"currency": "USD",
"amount": "0.00"
}
},
{
"start_time": "2020-01-02T00:00:00Z",
"end_time": "2020-01-03T00:00:00Z",
"penalty": {
"currency": "USD",
"amount": "75.00"
}
},
{
"start_time": "2020-01-03T00:00:00Z",
"end_time": "2020-01-05T00:00:00Z",
"penalty": {
"currency": "USD",
"amount": "135.00"
}
}
]
},
"quote_token": "string",
"valid_until": "2025-01-13T13:45:15.523Z"
}
]
}
],
"unavailability_reasons": [
"min_stay_violation"
]
}
],
"response_id": "123e4567-e89b-12d3-a456-426614174000"
}Examples are generated from the schema where the spec publishes none; field values are illustrative.
