API reference

HTS APIs

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

Schema

search_contracts_response

Fields

contracts
array of dafar_contract
required
Show fields
Array of dafar_contract
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
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
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
…
passengers
array of confirmed_itinerary_passenger
required

List of passengers on the itinerary.

Items ≥ 1
Show fields
…
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
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
ineligible (ineligible1) ineligible1

Used by

POST/contracts/searchSearch Contracts
Example
{
  "contracts": [
    {
      "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": [
              {}
            ],
            "fare_brand": "Standard",
            "exercise_eligibility": {
              "type": "eligible"
            }
          }
        ]
      },
      "exercises": [
        {
          "type": "string",
          "id": "string",
          "contract_id": "string",
          "payouts": []
        }
      ]
    }
  ]
}