API reference

HTS APIs

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

Schema

book_request

Payload for finalizing a lodging reservation using the provided quote details.

Fields

book_token
string
required

Opaque token from the /quote response used to finalize this booking. Important: Use the book_token only for the booking it was generated for. Each unique booking (different guests or reservations) requires calling /quote to obtain a new token. Reusing a token from a completed booking will result in an error. The token is also bound to the application that quoted it. Call /book with the API key of that same application, otherwise the request is rejected with 403 token_application_mismatch.

Example string
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
partner_reference_id
string
required

A client-determined unique identifier for this booking, used for reconciliation and tracking. Important: This identifier must be unique across all your bookings. Reusing the same partner_reference_id for different bookings will result in an error. Use a different value for each unique reservation, even when booking the same hotel/dates/room with different guests.

Example 123e4567-e89b-12d3-a456-426614174000
primary_guest
PrimaryGuest
required

Details of the primary guest who will check in for the reservation.

Show fields
first_name
string · person-name
required

First name of the primary guest. Validation allows ANY character in any language (Latin, CJK, Arabic, etc), numbers, and punctuation. Strictly blocks Emojis and other 4-byte Unicode characters.

Length ≥ 1, ≤ 255 · Pattern ^[\u0000-\uD7FF\uE000-\uFFFF]+$ · Example Fred
last_name
string · person-name
required

Last name of the primary guest. Validation allows ANY character in any language, numbers, and punctuation. Strictly blocks Emojis and other 4-byte Unicode characters.

Length ≥ 1, ≤ 255 · Pattern ^[\u0000-\uD7FF\uE000-\uFFFF]+$ · Example Lalonde
email
string · email
required

Email address of the primary guest.

Example fred@example.com
phone
string

Phone number of the primary guest.

Pattern ^\+?[0-9]{7,15}$ · Example +18339334671
hotel_loyalty
array of hotel_loyalty

Optional. The guest's hotel loyalty memberships. Send whichever the guest holds; we forward the one matching the program on the rate being booked. Always accepted, whatever the quote said. loyalty.loyalty_transmission on the quote advises whether collecting a membership is worth it — where it is not eligible we may have no way to transmit one, so the guest should verify at check-in — but it never gates this field.

Items ≤ 10
Show fields
Array of hotel_loyalty · Optional. The guest's hotel loyalty memberships. Send whichever the guest holds; we forward the one matching the program on the rate being booked. Always accepted, whatever the quote said. `loyalty.loyalty_transmission` on the quote advises whether collecting a membership is worth it — where it is not `eligible` we may have no way to transmit one, so the guest should verify at check-in — but it never gates this field.
Items ≤ 10
program_code
string
required

The 3-character code identifying a hotel loyalty program.

Codes are added as more programs are supported, so treat an unrecognised code as a program you do not yet know about rather than as invalid.

Eligibility is determined by the provider from the rate plan; it is never derived from the traveller, and no loyalty membership is required to shop or book a loyalty-eligible rate.

Length ≥ 3, ≤ 3 · Pattern ^[A-Z0-9]{3}$
loyalty_number
string
required

The guest's membership number for this loyalty program.

Length ≥ 1, ≤ 64 · Example 123456789
payment_method
book_payment_method · one of 1

Payment method for direct credit card payment. Required for tenants configured for direct payment processing; ignored for others. Use the provider-specific variant to supply the vault token. Contact Hopper to enable this feature for your tenant.

Show fields

Payment method for direct credit card payment. Required for tenants configured for direct payment processing; ignored for others. Use the provider-specific variant to supply the vault token. Contact Hopper to enable this feature for your tenant.

Exactly one of the following, selected by provider:
spreedly (spreedly_payment_method) spreedly_payment_method
provider
string enum
required

Identifies this as a Spreedly payment method.

Values spreedly · Example spreedly
token
string
required

Payment method token issued by the Spreedly vault.

Length ≥ 1 · Example LbDpERKx17Y8PGeR4EvnMVdB1bN
fraud_prevention
fraud_prevention · one of 1

Fraud prevention data collected by the partner. Required for tenants using partner-managed fraud prevention; ignored for others. Use the type-specific variant to supply session data. Contact Hopper to enable this feature for your tenant.

Show fields

Fraud prevention data collected by the partner. Required for tenants using partner-managed fraud prevention; ignored for others. Use the type-specific variant to supply session data. Contact Hopper to enable this feature for your tenant.

Exactly one of the following, selected by type:
riskified (riskified_fraud_prevention) riskified_fraud_prevention
type
string enum
required

Identifies this as a Riskified fraud prevention payload.

Values riskified · Example riskified
customer_ip_address
string
required

The IP address of the customer making the booking.

Length ≥ 1 · Example 203.0.113.42
session_token
string

Session token from the fraud prevention provider (e.g. the Riskified Beacon session ID).

Example 00000000-0000-0000-0000-000000000000
user_agent
string

The User-Agent string of the customer's browser or device.

Example Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)

Used by

POST/api/lodging/v1/bookBook a lodging
Example
{
  "book_token": "string",
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "partner_reference_id": "123e4567-e89b-12d3-a456-426614174000",
  "primary_guest": {
    "first_name": "Fred",
    "last_name": "Lalonde",
    "email": "fred@example.com",
    "phone": "+18339334671",
    "hotel_loyalty": [
      {
        "program_code": "string",
        "loyalty_number": "123456789"
      }
    ]
  },
  "payment_method": {
    "provider": "spreedly",
    "token": "LbDpERKx17Y8PGeR4EvnMVdB1bN"
  },
  "fraud_prevention": {
    "type": "riskified",
    "session_token": "00000000-0000-0000-0000-000000000000",
    "customer_ip_address": "203.0.113.42",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
  }
}