API reference

HTS APIs

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

PUT/shoppingSearch

Search for flights

https://travel-distribution.staging.htsapis.com/api/flights/v1/shopping

Retrieve flight offers from multiple sources.

Parameters

Request-Id
header · string · uuid

Optional client-supplied UUID to correlate this request across your systems and ours. When provided, the same value is echoed back in the Request-Id response header and used in logs and traces. When omitted, the server generates one automatically. Must be a valid UUID; invalid values are rejected with 400 Bad Request.

Example d290f1ee-6c54-4b01-90e6-d701748f0851

Request body application/json · required

slices
array of query_slice
required
Items ≥ 1, ≤ 2
Show fields
Array of query_slice
Items ≥ 1, ≤ 2
origin
string
required

IATA airport or city code of the origin

Length ≥ 3, ≤ 3 · Example YUL
destination
string
required

IATA airport or city code of the destination

Length ≥ 3, ≤ 3 · Example JFK
departure_date
string · date
required

Departure date in YYYY-MM-DD format

Example 2026-06-01
origin_type
string enum

Whether a location code refers to an airport or a city. Defaults to airport.

Values airportcity · Default "airport" · Example airport
destination_type
string enum

Whether a location code refers to an airport or a city. Defaults to airport.

Values airportcity · Default "airport" · Example airport
passengers
array of passenger_count
required
Items ≥ 1
Show fields
Array of passenger_count
Items ≥ 1
type
string enum
required
Values adultchildlap_infantseated_infant · Example adult
count
integer
required
Range ≥ 1, ≤ 9 · Example 1

Responses

200OK
Request-Id
response header

UUID that uniquely identifies this request. If a valid Request-Id was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Include this value when contacting support to help correlate logs and traces.

offers
array of offer
required
Show fields
Array of offer
token
string
required

An opaque token that identifies the offer for quoting.

Example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
slices
array of slice
required

The flight slices (journeys) included in this offer.

Show fields
Array of slice · The flight slices (journeys) included in this offer.
id
string
required

Unique slice identifier within this order

Example sli_0
origin_airport_code
string
required

IATA code of the origin airport

Length ≥ 3, ≤ 3 · Example YUL
destination_airport_code
string
required

IATA code of the destination airport

Length ≥ 3, ≤ 3 · Example JFK
duration
string

Total journey duration in ISO 8601 duration format

Example PT5H30M
segments
array of segment
Show fields
Array of segment
id
string
required

Unique segment identifier within this quote/order

Example seg_0
origin_airport_code
string
required

IATA code of the origin airport

Length ≥ 3, ≤ 3 · Example YUL
destination_airport_code
string
required

IATA code of the destination airport

Length ≥ 3, ≤ 3 · Example JFK
departure_date_time
string · date-time
required

Departure date and time in ISO 8601 format

Example 2026-06-01T10:00:00Z
arrival_date_time
string · date-time
required

Arrival date and time in ISO 8601 format

Example 2026-06-01T12:00:00Z
flight_number
string
required

The flight number

Example 1234
marketing_carrier_code
string
required

IATA code of the marketing carrier

Length ≥ 2, ≤ 2 · Example AC
operating_carrier_code
string

IATA code of the operating carrier

Length ≥ 2, ≤ 2 · Example UA
cabin_class
string enum
Values economypremium_economybusinessfirst · Example economy
stops
integer

Number of stops on this segment (0 = non-stop)

Range ≥ 0 · Example 0
fare_basis_code
string

The fare basis code for this segment

Example YOWCA
booking_class_code
string

The booking class (RBD) for this segment

Example Y
fare_brand_name
string

The branded fare name for this segment

Example Economy Flex
duration
string

Flight duration in ISO 8601 duration format

Example PT2H30M
equipment_code
string

IATA aircraft type code

Example 320
status
string enum

Segment booking status. Only present in order responses (not in shopping or offerPrice).

  • confirmed: Segment is confirmed.
  • cancelled: Segment cancelled.
  • pending: Awaiting confirmation.
Values confirmedcancelledpending · Example confirmed
price
price
required

Price information for an offer.

Show fields
currency
string
required

ISO 4217 currency code

Length ≥ 3, ≤ 3 · Pattern ^[A-Z]{3}$ · Example USD
base_amount
string
required

The base fare amount before taxes as a decimal string.

Example 120.00
total_amount
string
required

The total amount as a decimal string (base_amount + taxes_and_fees).

Example 150.00
taxes_and_fees_amount
string
required

The total amount of taxes and fees as a decimal string.

Example 30.00
taxes_and_fees
array of charge
required

Itemized taxes and fees breakdown.

Show fields
Array of charge · Itemized taxes and fees breakdown.
code
string
required

Charge code identifier (e.g., IATA tax/fee codes)

Example YQ
amount
string
required

Charge amount as a decimal string

Example 15.00
validating_carrier_code
string

IATA code of the validating carrier for this offer.

Length ≥ 2, ≤ 2 · Example AC
passenger_pricing
array of passenger_pricing

Per-passenger-type price breakdown for this offer.

Show fields
Array of passenger_pricing · Per-passenger-type price breakdown for this offer.
type
string enum
required
Values adultchildlap_infantseated_infant · Example adult
count
integer
required

Number of passengers of this type this pricing applies to.

Range ≥ 1 · Example 2
price
price
required

Price information for an offer.

Show fields
currency
string
required

ISO 4217 currency code

Length ≥ 3, ≤ 3 · Pattern ^[A-Z]{3}$ · Example USD
base_amount
string
required

The base fare amount before taxes as a decimal string.

Example 120.00
total_amount
string
required

The total amount as a decimal string (base_amount + taxes_and_fees).

Example 150.00
taxes_and_fees_amount
string
required

The total amount of taxes and fees as a decimal string.

Example 30.00
taxes_and_fees
array of charge
required

Itemized taxes and fees breakdown.

Show fields
Array of charge · Itemized taxes and fees breakdown.
required_passenger_information
array of required_passenger_information

Passenger information required for this offer at offerPrice time. When absent, no additional passenger information is required beyond the standard fields.

Show fields
Array of required_passenger_information · Passenger information required for this offer at offerPrice time. When absent, no additional passenger information is required beyond the standard fields.
type
string enum
required

The type of passenger information required

Values nationalitypassportnational_idknown_travelerredress · Example nationality
id
string

Unique identifier for this shop response.

Example shop_abc123
400Bad Request
Request-Id
response header

UUID that uniquely identifies this request. If a valid Request-Id was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Include this value when contacting support to help correlate logs and traces.

error
error_detail
required
Show fields
code
string
required

A machine-readable snake_case string for programmatic handling.

Example parameter_missing
message
string
required

A human-readable description for the developer.

Example The 'passengers' parameter is required to create a booking.
param
string

The specific request parameter that caused the error.

Example passengers
Example
{
  "error": {
    "code": "parameter_missing",
    "message": "The 'passengers' parameter is required to create a booking.",
    "param": "passengers"
  }
}
422Unprocessable Entity
Request-Id
response header

UUID that uniquely identifies this request. If a valid Request-Id was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Include this value when contacting support to help correlate logs and traces.

error
error_detail
required
Show fields
code
string
required

A machine-readable snake_case string for programmatic handling.

Example parameter_missing
message
string
required

A human-readable description for the developer.

Example The 'passengers' parameter is required to create a booking.
param
string

The specific request parameter that caused the error.

Example passengers
Example
{
  "error": {
    "code": "parameter_missing",
    "message": "The 'passengers' parameter is required to create a booking.",
    "param": "passengers"
  }
}
500Internal Server Error
Request-Id
response header

UUID that uniquely identifies this request. If a valid Request-Id was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Include this value when contacting support to help correlate logs and traces.

error
error_detail
required
Show fields
code
string
required

A machine-readable snake_case string for programmatic handling.

Example parameter_missing
message
string
required

A human-readable description for the developer.

Example The 'passengers' parameter is required to create a booking.
param
string

The specific request parameter that caused the error.

Example passengers
Example
{
  "error": {
    "code": "parameter_missing",
    "message": "The 'passengers' parameter is required to create a booking.",
    "param": "passengers"
  }
}
Request
curl -X PUT "https://travel-distribution.staging.htsapis.com/api/flights/v1/shopping" \
  -H "HTS-API-KEY: $HTS_API_KEY" \
  -H "Request-Id: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "slices": [
    {
      "origin": "YUL",
      "destination": "JFK",
      "departure_date": "2026-06-01",
      "origin_type": "airport",
      "destination_type": "airport"
    }
  ],
  "passengers": [
    {
      "type": "adult",
      "count": 1
    }
  ]
}'
Response 200
{
  "id": "shop_abc123",
  "offers": [
    {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
      "slices": [
        {
          "id": "sli_0",
          "origin_airport_code": "YUL",
          "destination_airport_code": "JFK",
          "duration": "PT5H30M",
          "segments": [
            {
              "id": "seg_0",
              "origin_airport_code": "YUL",
              "destination_airport_code": "JFK",
              "departure_date_time": "2026-06-01T10:00:00Z",
              "arrival_date_time": "2026-06-01T12:00:00Z",
              "flight_number": "1234",
              "marketing_carrier_code": "AC",
              "operating_carrier_code": "UA",
              "cabin_class": "economy",
              "stops": 0,
              "fare_basis_code": "YOWCA",
              "booking_class_code": "Y",
              "fare_brand_name": "Economy Flex",
              "duration": "PT2H30M",
              "equipment_code": "320",
              "status": "confirmed"
            }
          ]
        }
      ],
      "price": {
        "currency": "USD",
        "base_amount": "120.00",
        "total_amount": "150.00",
        "taxes_and_fees_amount": "30.00",
        "taxes_and_fees": [
          {
            "code": "YQ",
            "amount": "15.00"
          }
        ]
      },
      "validating_carrier_code": "AC",
      "passenger_pricing": [
        {
          "type": "adult",
          "count": 2,
          "price": {
            "currency": "USD",
            "base_amount": "120.00",
            "total_amount": "150.00",
            "taxes_and_fees_amount": "30.00",
            "taxes_and_fees": [
              {}
            ]
          }
        }
      ],
      "required_passenger_information": [
        {
          "type": "nationality"
        }
      ]
    }
  ]
}

Examples are generated from the schema where the spec publishes none; field values are illustrative.