API reference

HTS APIs

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

POST/orderCreateBook

Create a booking and trigger ticketing

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

Create confirm PNR and trigger ticketing process.

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
Idempotency-Key
header · string

Optional client-supplied unique string to ensure idempotent processing. When provided, sending the same key for the same request will return the same result without re-processing. When omitted, the server generates a UUID automatically. The resolved key is always returned in the Idempotency-Key response header so it can be captured and re-sent for retries.

Length ≤ 128 · Pattern ^[\x20-\x7E]+$ · Example 550e8400-e29b-41d4-a716-446655440000

Request body application/json · required

token
string
required

Opaque token from an offerPrice response

Length ≥ 1, ≤ 1024 · Example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
payment
payment · one of 2
required

Payment details for the booking.

Show fields

Payment details for the booking.

Exactly one of the following, selected by type:
balance (balance_payment) balance_payment
type
string enum
required

Payment method type discriminator

Values balance
spreedly (spreedly_payment) spreedly_payment
type
string enum
required

Payment method type discriminator

Values spreedly
token
string
required

Payment method token issued by the Spreedly vault.

Length ≥ 1
services
array of selected_service

Ancillary services to include in the booking

Show fields
Array of selected_service · Ancillary services to include in the booking
id
string
required

The service identifier to purchase

Example svc_bag_checked
passenger_ids
array of string
required

Which passengers to attach this service to

segment_ids
array of string

Which segments to attach this service to. When absent, applies to the entire journey.

quantity
integer

Number of units to purchase per passenger (default 1). Mainly useful for bags with tiered pricing.

Default 1 · Range ≥ 1 · Example 2

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.

Idempotency-Key
response header

The idempotency key used for this request. If a valid Idempotency-Key was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Capture this value from the response to retry the same request safely.

id
string
required

Unique order identifier

Example ord_abc123
status
string enum
required
  • booked: Booking confirmed, pending ticketing.
  • ticketed: Tickets issued.
  • cancelled: Order cancelled.
  • pending: Awaiting processing or provider confirmation.
Values bookedticketedcancelledpending · Example ticketed
booked_at
string · date-time
required

When the booking was created

Example 2026-07-15T10:30:00Z
slices
array of slice
required

The flight slices (journeys) included in this order.

Show fields
Array of slice · The flight slices (journeys) included in this order.
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
passengers
array of passenger
required
Show fields
Array of passenger
type
string enum
required
Values adultchildlap_infantseated_infant · Example adult
first_name
string
required

Passenger's first name

Length ≥ 1 · Example John
last_name
string
required

Passenger's last name

Length ≥ 1 · Example Doe
date_of_birth
string · date
required

Passenger's date of birth in YYYY-MM-DD format

Example 1990-01-15
gender
string enum
required
Values malefemaleunspecified · Example male
email
string · email
required

Passenger's email address

Example john@example.com
phone_number
string
required

Passenger's phone number

Length ≥ 1 · Example +15551234567
id
string

Unique passenger identifier within this quote/order

Example a1b2c3d4-e5f6-7890-abcd-ef1234567890
middle_name
string

Passenger's middle name

Example Michael
nationality
string

Passenger's nationality as an ISO 3166-1 alpha-2 country code

Length ≥ 2, ≤ 2 · Example US
travel_documents
array of travel_document

Passenger's travel documents

Show fields
Array of travel_document · one of 4 · Passenger's travel documents
Exactly one of the following, selected by type:
passport (passport_document) passport_document
type
string enum
required

Travel document type discriminator

Values passport
number
string
required

Passport number

Length ≥ 1 · Example A1234567
issuing_country
string
required

ISO 3166-1 alpha-2 country code of the issuing country

Length ≥ 2, ≤ 2 · Example US
expiry_date
string · date

Passport expiry date

Example 2030-01-15
national_id (national_id_document) national_id_document
type
string enum
required

Travel document type discriminator

Values national_id
number
string
required

National ID number

Length ≥ 1 · Example 12345678
issuing_country
string
required

ISO 3166-1 alpha-2 country code of the issuing country

Length ≥ 2, ≤ 2 · Example BR
known_traveler (known_traveler_document) known_traveler_document
type
string enum
required

Travel document type discriminator

Values known_traveler
number
string
required

TSA PreCheck Known Traveler Number

Length ≥ 1 · Example 123456789
issuing_country
string
required

ISO 3166-1 alpha-2 country code of the issuing country

Length ≥ 2, ≤ 2 · Example US
redress (redress_document) redress_document
type
string enum
required

Travel document type discriminator

Values redress
number
string
required

DHS Redress Control Number

Length ≥ 1 · Example 1234567
issuing_country
string
required

ISO 3166-1 alpha-2 country code of the issuing country

Length ≥ 2, ≤ 2 · Example US
frequent_flyer_programs
array of frequent_flyer_program

Passenger's frequent flyer program memberships

Show fields
Array of frequent_flyer_program · Passenger's frequent flyer program memberships
airline
string
required

IATA code of the airline operating the program

Length ≥ 2, ≤ 2 · Example AC
number
string
required

Frequent flyer membership number

Length ≥ 1 · Example AC123456789
accompanying_adult_id
string

For lap_infant passengers only: the ID of the accompanying adult passenger this infant is traveling with.

Example pas_0
special_assistance
array of string enum

Special assistance requests for this passenger.

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
booking_reference
string

Primary airline PNR/record locator

Example ABC123
booking_references
array of booking_reference

All carrier booking references (one per carrier in interline/codeshare bookings)

Show fields
Array of booking_reference · All carrier booking references (one per carrier in interline/codeshare bookings)
airline_code
string
required

IATA code of the airline

Length ≥ 2, ≤ 2 · Example AC
reference
string
required

Airline confirmation/record locator code (PNR)

Example ABC123
documents
array of document

Issued documents (e-tickets and EMDs) for this order

Show fields
Array of document · Issued documents (e-tickets and EMDs) for this order
type
string enum
required

Document type: electronic_ticket for flight e-tickets, emd (Electronic Miscellaneous Document) for paid ancillary services

Values electronic_ticketemd · Example electronic_ticket
number
string
required

Document number (e.g., 13-digit e-ticket number or EMD number)

Example 0141234567890
passenger_id
string
required

The passenger this document is issued for

Example pas_0
services
array of service

Booked ancillary services

Show fields
Array of service · Booked ancillary services
id
string
required

Service identifier

Example svc_bag_checked
type
string enum
required

Service type

Values baggageseat · Example baggage
quantity
integer
required

Number of units purchased

Example 1
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
segment_ids
array of string

Which segments this service applies to (present for seat services)

passenger_ids
array of string

Which passengers this service applies to

metadata
baggage_metadata

Metadata for a baggage service

Show fields
type
string enum
required

Service type discriminator

Values baggage
baggage_type
string enum
required

Type of baggage

Values checkedcarry_on · Example checked
maximum_weight_kg
number

Maximum weight in kilograms

Example 23
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.

Idempotency-Key
response header

The idempotency key used for this request. If a valid Idempotency-Key was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Capture this value from the response to retry the same request safely.

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.

Idempotency-Key
response header

The idempotency key used for this request. If a valid Idempotency-Key was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Capture this value from the response to retry the same request safely.

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.

Idempotency-Key
response header

The idempotency key used for this request. If a valid Idempotency-Key was sent in the request header, this echoes that value; otherwise a server-generated UUID is returned. Capture this value from the response to retry the same request safely.

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 POST "https://travel-distribution.staging.htsapis.com/api/flights/v1/orderCreate" \
  -H "HTS-API-KEY: $HTS_API_KEY" \
  -H "Request-Id: $(uuidgen)" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
  "payment": {
    "type": "balance"
  },
  "services": [
    {
      "id": "svc_bag_checked",
      "passenger_ids": [
        "pas_0"
      ],
      "segment_ids": [
        "string"
      ],
      "quantity": 2
    }
  ]
}'
Response 200
{
  "id": "ord_abc123",
  "status": "ticketed",
  "booked_at": "2026-07-15T10:30:00Z",
  "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"
        }
      ]
    }
  ],
  "passengers": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "type": "adult",
      "first_name": "John",
      "middle_name": "Michael",
      "last_name": "Doe",
      "date_of_birth": "1990-01-15",
      "gender": "male",
      "nationality": "US",
      "travel_documents": [
        {
          "type": "passport",
          "number": "A1234567",
          "issuing_country": "US",
          "expiry_date": "2030-01-15"
        }
      ],
      "frequent_flyer_programs": [
        {
          "airline": "AC",
          "number": "AC123456789"
        }
      ],
      "accompanying_adult_id": "pas_0",
      "email": "john@example.com",
      "phone_number": "+15551234567",
      "special_assistance": [
        "blind"
      ]
    }
  ],
  "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"
      }
    ]
  },
  "booking_reference": "ABC123",
  "booking_references": [
    {
      "airline_code": "AC",
      "reference": "ABC123"
    }
  ],
  "documents": [
    {
      "type": "electronic_ticket",
      "number": "0141234567890",
      "passenger_id": "pas_0"
    }
  ],
  "services": [
    {
      "id": "svc_bag_checked",
      "type": "baggage",
      "quantity": 1,
      "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"
          }
        ]
      },
      "segment_ids": [
        "string"
      ],
      "passenger_ids": [
        "string"
      ],
      "metadata": {
        "type": "baggage",
        "baggage_type": "checked",
        "maximum_weight_kg": 23
      }
    }
  ]
}

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