API reference

HTS APIs

Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.

PUT/api/lodging/v1/shopFeedShop

Get all room rates for given lodgings on a specific feed

https://travel-distribution.staging.htsapis.com/api/lodging/v1/shopFeed

Get all room rates for given lodgings on a specific feed for the given search criteria. Additional information must be setup during onboarding for usage.

Request body application/json · required

Search criteria for the room rates feed

request_id
string · uuid
required

Unique value used to identify this request. If provided to us during operational questions, it will help us provide better support.

Example 123e4567-e89b-12d3-a456-426614174000
lodging_ids
array of lodging_id
required

List of lodging IDs to shop feed for. (1 to 200)

Items ≥ 1, ≤ 200
point_of_sale
PointOfSale
required

Description of the point of sale where the booking is made. This is typically the user's location.

Show fields
country
string
required

Country code (ISO 3166-1 alpha-2)

Pattern ^[A-Z]{2}$ · Example US
check_in
string · date
required

The check-in date. Notes:

  • Check-in cannot be in the past.
  • Check-in date can be at most 1 year in the future.
Example 2022-01-01
check_out
string · date
required

The 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.
Example 2022-01-02
occupancy
occupancy
required

Number of guests that want to stay in the lodging

Show fields
adults
integer
required

Number of adult guests

Range ≥ 1, ≤ 24 · Example 2
children
array of integer
required

List of children guest ages

pets
integer

Number of pets accompanying the guests

Range ≥ 0, ≤ 10 · Example 1
currency
string enum
required

Requested currency code for the owed now portion of the rates, in ISO 4217 format.

Values USD · Example USD

Responses

200List of room rates feed for the lodging
lodgings
array of shopped_lodging
required

List of lodgings with room rates feed

Items ≥ 1, ≤ 200
Show fields
Array of shopped_lodging · List of lodgings with room rates feed
Items ≥ 1, ≤ 200
lodging_id
string
required

Unique identifier for the lodging

Example 123e4567-e89b-12d3-a456-426614174000
room_rates
array of room_rate
required

List of rooms with its available rates

Show fields
Array of room_rate · List of rooms with its available rates
room_id
string
required

Unique identifier for the room

Example 123e4567-e89b-12d3-a456-426614174000
name
string
required

Name of the room

Example Standard Room
rates
array of rate
required

List of available rates for the room

Show fields
Array of rate · List of available rates for the room
payment_schedule
payment_schedule
required

Pricing breakdown of a rate. Includes the amounts owed at book time and the amounts owed at check-in.

Show fields
merchandising
merchandising
required

Merchandising information for promotional badging and marketing displays.

Show fields
product
product
required

Describes a bookable rate. Differentiates between two rates for the same room.

Show fields
cancellation_penalty
cancellation_penalty
required

Cancellation 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_token
string
required

Token to pass in the quote request. Only returned in shop responses.

Example string
valid_until
string · date-time
required

ISO 8601 timestamp until which the quote token remains valid. Only returned in shop responses.

Example 2025-01-13T13:45:15.523Z
payment_clauses
array of payment_clause

List of payment clauses associated with the rate

Show fields
…
recommended_sell
recommended_sell_price

The 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
commission
commission

The estimated commission amount included in the base price. If not specified, there is no commission on this rate.

Show fields
initial_price
object

Initial sell price of a lodging before any price reductions were applied.

Show fields
…
unavailability_reasons
array of unavailability_reason
required

List 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_id
string · uuid
required

Unique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.

Example 123e4567-e89b-12d3-a456-426614174000
400Invalid Request. There will be an error code in the response detailing the issue.
error_code
string enum
required

Error codes for the shopfeed operation. This is a non-exhaustive list of enum values, which will be extended in the future.

The following error codes are currently supported:

  • invalid_input: A provided request parameter is invalid.
  • invalid_key_configuration: There is an issue with the api-key configuration. Contact Hopper to resolve.
  • unauthorized: The tenant is not authorized to access this API.
Values invalid_inputinvalid_key_configurationunauthorized
description
string
required

A human-readable description of the error.

response_id
string · uuid
required

Unique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.

Example 123e4567-e89b-12d3-a456-426614174000
Example
{
  "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_code
string enum
required

Error returned when a client closes the connection before the response could be sent.

Values client_closed_request
description
string
required

A human-readable description of what happened. For booking requests, this may include the partner reference ID for tracking.

response_id
string · uuid
required

Unique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.

Example 123e4567-e89b-12d3-a456-426614174000
additional_context
object

Additional 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_code
string enum
required

Error returned when an internal server error occurs.

Values internal_server_error
description
string
required

A human-readable description of the error.

response_id
string · uuid
required

Unique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.

Example 123e4567-e89b-12d3-a456-426614174000
Example
{
  "error_code": "internal_server_error",
  "description": "string",
  "response_id": "123e4567-e89b-12d3-a456-426614174000"
}
Request
curl -X PUT "https://travel-distribution.staging.htsapis.com/api/lodging/v1/shopFeed" \
  -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"
  ],
  "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"
}'
Response 200
{
  "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.