API reference

HTS APIs

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

Schema

contract_expired_webhook_data

The webhook payload.

Fields

contract
dafar_contract
required

The expired contract.

Show fields
id
string
required

Unique identifier for a contract.

status
string enum
required

Current status of the contract.

Values canceledconfirmeddraftedexercise_eligibleexpiredexercisedvoided
price
contract_price
required

The price breakdown of the product.

Show fields
total_amount
string
required

Total amount to be paid for the product, including taxes.

Range ≥ 0
base_amount
string
required

Amount to be paid for the product, excluding taxes.

Range ≥ 0
taxes
array of tax
Items ≥ 1
Show fields
Array of tax
Items ≥ 1
code
string
required

Code representing this tax.

Length ≥ 1
amount
string
required

Total amount of the tax.

eligible_disruptions
eligible_disruptions
required

The disruption events which allow a customer to exercise their product.

Show fields
flight_cancellation
flight_cancellation

The product becomes exercise eligible in the event of a flight cancellation.

flight_delay
flight_delay

The product becomes exercise eligible in the event of a flight delay.

Show fields
delay_minutes_threshold
integer · int32
required

The number of minutes a flight must be delayed to qualify for disruption exercise eligibility.

missed_connection
missed_connection

The product becomes exercise eligible in the event of a missed connection.

Show fields
minimum_connection_minutes_threshold
integer · int32
required

The minimum number of minutes between connections for which the product will consider a connection missed in the event of a disruption.

rebooking_allowance_per_passenger
string
required

Total monetary allowance per passenger for rebooking a flight in case a disruption occurs.

Range ≥ 0
window_minutes_before_departure
integer · int32
required

The number of minutes before departure of each slice from which a purchased contract would be eligible for exercise in the event of a disruption.

currency
string
required

Currency of all pricing fields within the contract.

expires_at
string · date-time
required

Date and time at which the contract will expire, once purchased, as a UTC RFC3339 formatted datetime.

booking_references
map_string
required

Record locators if PSS, Order ID if OMS, etc. Used to retrieve the flight booking later. It's a dictionary of key/value pairs. The keys can be anything, but they are referenced in the configuration when retrieving the booking, so those must align.

exercises
array of dafar_exercise
required

Details of how this contract was exercised (payout and/or rebook). Always present as a list. Populated when exercised, empty otherwise.

Show fields
Array of dafar_exercise · one of 2 · Details of how this contract was exercised (payout and/or rebook). Always present as a list. Populated when exercised, empty otherwise.
Exactly one of the following, selected by type:
payout (payout1) payout1
type
string
required

value: payout

id
string
required

Unique identifier for this exercise.

contract_id
string
required

The contract that was exercised.

payouts
array of exercise_payout
required

The payouts issued to the customer.

Items ≥ 1
Show fields
Array of exercise_payout · one of 1 · The payouts issued to the customer.
Items ≥ 1
Exactly one of the following, selected by type:
original_form_of_payment (original_form_of_payment) original_form_of_payment
rebook (rebook) rebook
type
string
required

value: rebook

id
string
required

Unique identifier for this exercise.

contract_id
string
required

The contract that was exercised.

rebooked_segments
array of itinerary_slice_segment
required

The new flight segments the customer was rebooked on.

Items ≥ 1
Show fields
Array of itinerary_slice_segment · The new flight segments the customer was rebooked on.
Items ≥ 1
origin_airport
string
required

IATA airport code of origin.

Pattern [A-Z]{3}
destination_airport
string
required

IATA airport code of destination.

Pattern [A-Z]{3}
departure_date_time
string
required

Local date and time of departure, in ISO 8601 format.

arrival_date_time
string
required

Local date and time of arrival, in ISO 8601 format.

cabin
string enum
required

Cabin of the segment.

Values economypremium_economybusinessfirst
marketing_carrier_code
string
required

IATA airline code of the marketing carrier for this segment.

Pattern [A-Z0-9]{2}
marketing_flight_number
string
required

Flight number for the marketing carrier.

Pattern [0-9]{1,4}
reservation_booking_designator
string

Reservation Booking Designator (RBD) for this segment: the booking code the airline sold the seat under, one uppercase letter and an optional second letter or digit. Also known as booking class, booking code, class of service, or fare class (e.g. Y, B, M, Q, N, J, F, E1). Pass the code exactly as it appears on the ticket/PNR.

Pattern ^[A-Z][A-Z0-9]?$
operating_carrier_code
string

IATA airline code of the operating carrier for this segment. Assumed to be the same asmarketing_carrier_code if not set.

Pattern [A-Z0-9]{2}
operating_flight_number
string

Flight number for the operating carrier. Assumed to be the same asmarketing_flight_number if not set.

Pattern [0-9]{1,4}
itinerary
confirmed_itinerary
required

The new itinerary details.

Show fields
currency
string
required
slices
array of itinerary_slice
required

List of slices of the itinerary; 1 (one way), 2 (round trip), or up to 10 (multi-destination) slices are allowed

Items ≥ 1
Show fields
Array of itinerary_slice · List of slices of the itinerary; 1 (one way), 2 (round trip), or up to 10 (multi-destination) slices are allowed
Items ≥ 1
passengers
array of confirmed_itinerary_passenger
required

List of passengers on the itinerary.

Items ≥ 1
Show fields
Array of confirmed_itinerary_passenger · List of passengers on the itinerary.
Items ≥ 1
booking_references
map_string
required
user_id
string

User ID in the partner system.

payout
payout

If the product is eligible for payout, the payout to be issued upon exercise.

Show fields
amount
string
required

The total amount to be paid out upon exercise.

Range ≥ 0
percentage
integer · int32
required

The percentage of the booking to be paid out upon exercise.

Range ≥ 0, ≤ 100
itinerary
contract_itinerary

The trip as purchased, with each slice's exercise eligibility and each segment's rebook eligibility and disruption. It doesn't change after a rebook; the rebooked flights are in that rebook's exercise. Populated on Get Contract and the contract webhooks; absent on Create Contract.

Show fields
slices
array of contract_itinerary_slice
required

The slices of the trip as purchased, in purchase order.

Items ≥ 1
Show fields
Array of contract_itinerary_slice · The slices of the trip as purchased, in purchase order.
Items ≥ 1
segments
array of contract_itinerary_segment
required

The ordered list of segments that make up this slice.

Items ≥ 1
Show fields
Array of contract_itinerary_segment · The ordered list of segments that make up this slice.
Items ≥ 1
id
string
required

Base64-encoded string of ":", both zero-based. The encoding is padded, so some ids end in =; treat the id as an opaque string.

origin_airport
string
required

IATA airport code of origin.

Pattern [A-Z]{3}
destination_airport
string
required

IATA airport code of destination.

Pattern [A-Z]{3}
departure_date_time
string
required

Local date and time of departure, in ISO 8601 format.

arrival_date_time
string
required

Local date and time of arrival, in ISO 8601 format.

cabin
string enum
required

Cabin of the segment.

Values economypremium_economybusinessfirst
marketing_carrier_code
string
required

IATA airline code of the marketing carrier for this segment.

Pattern [A-Z0-9]{2}
marketing_flight_number
string
required

Flight number for the marketing carrier.

Pattern [0-9]{1,4}
rebook_eligibility
rebook_eligibility · one of 2
required

Whether a rebook can start from this segment, with the search criteria when it can.

Show fields
reservation_booking_designator
string

Reservation Booking Designator (RBD) for this segment: the booking code the airline sold the seat under, one uppercase letter and an optional second letter or digit. Also known as booking class, booking code, class of service, or fare class (e.g. Y, B, M, Q, N, J, F, E1). Pass the code exactly as it appears on the ticket/PNR.

Pattern ^[A-Z][A-Z0-9]?$
operating_carrier_code
string

IATA airline code of the operating carrier for this segment. Assumed to be the same as marketing_carrier_code if not set.

Pattern [A-Z0-9]{2}
operating_flight_number
string

Flight number for the operating carrier. Assumed to be the same as marketing_flight_number if not set.

Pattern [0-9]{1,4}
disruption
disruption_reason · one of 3

The disruption on this segment. Absent when the segment has not been disrupted.

Show fields
fare_brand
string
required

Name of the brand for the fare of the slice.

Length ≥ 1
exercise_eligibility
exercise_eligibility · one of 2
required

Whether this slice can be exercised, and how.

Show fields

Whether this slice can be exercised, and how.

Exactly one of the following, selected by type:
eligible (eligible1) eligible1
type
string
required

value: eligible

exercise_options
array of exercise_option
required

The ways the slice can be exercised.

Items ≥ 1
ineligible (ineligible1) ineligible1
type
string
required

value: ineligible

Example
{
  "contract": {
    "id": "string",
    "user_id": "33bb4eb2-2937-4bd3-97b1-7796206712f0",
    "status": "Confirmed",
    "price": {
      "total_amount": "40.80",
      "base_amount": "30.20",
      "taxes": [
        {
          "code": "VAT",
          "amount": "20.00"
        }
      ]
    },
    "eligible_disruptions": {
      "flight_cancellation": {},
      "flight_delay": {
        "delay_minutes_threshold": 120
      },
      "missed_connection": {
        "minimum_connection_minutes_threshold": 120
      }
    },
    "payout": {
      "amount": "400.00",
      "percentage": 100
    },
    "rebooking_allowance_per_passenger": "1000.00",
    "window_minutes_before_departure": 1440,
    "currency": "CAD",
    "expires_at": "2020-12-20T12:15:48Z",
    "booking_references": {},
    "itinerary": {
      "slices": [
        {
          "segments": [
            {
              "id": "MDow",
              "origin_airport": "YUL",
              "destination_airport": "SFO",
              "departure_date_time": "2026-11-15T08:00",
              "arrival_date_time": "2026-11-15T11:15",
              "cabin": "Economy",
              "reservation_booking_designator": "Y",
              "marketing_carrier_code": "AC",
              "marketing_flight_number": "759",
              "operating_carrier_code": "AC",
              "operating_flight_number": "759"
            }
          ],
          "fare_brand": "Standard",
          "exercise_eligibility": {
            "type": "string",
            "exercise_options": []
          }
        }
      ]
    },
    "exercises": [
      {
        "type": "string",
        "id": "string",
        "contract_id": "string",
        "payouts": [
          {
            "type": "original_form_of_payment"
          }
        ]
      }
    ]
  }
}