API reference

HTS APIs

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

GET/contracts/{id}/rebook_eligibilityOther

Get Rebook Eligibility

https://fintech.staging.htsapis.com/flights-dafar/v2/contracts/{id}/rebook_eligibility

Check whether a contract's segments are eligible for rebook due to a disruption. Each rebook-eligible segment's rebook_eligibility carries search_criteria (nearby airports and the departure date window), so partners sourcing their own inventory can match HTS's search.

Parameters

id
path · string
required

A unique identifier for a contract.

Responses

200The rebook eligibility details for the contract
slices
array of slice_eligibility
required

Slice-grouped eligibility for the contract's itinerary. Each slice carries its segments' eligibility for rebook.

Items ≥ 1
Show fields
Array of slice_eligibility · Slice-grouped eligibility for the contract's itinerary. Each slice carries its segments' eligibility for rebook.
Items ≥ 1
segments
array of segment_eligibility
required

The ordered list of segments that make up this slice.

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

Stable identifier for this segment within the rebook eligibility. Echo it back as segment_id on the flight shop request to rebook this exact segment. Stable across eligibility calls for the same disruption.

origin_airport
string
required

IATA code of the origin airport.

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

IATA code of the destination airport.

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

Scheduled local departure date and time in ISO Local Date Time format.

arrival_date_time
string
required

Scheduled local arrival date and time in ISO Local Date Time format.

marketing_carrier_code
string
required

IATA marketing carrier code.

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

Marketing flight number.

Pattern [0-9]{1,4}
cabin
string enum
required

Cabin class.

Values economypremium_economybusinessfirst
rebook_eligibility
rebook_eligibility · one of 2
required

Whether this segment is eligible for rebook, with the search criteria when it is.

Show fields

Whether this segment is eligible for rebook, with the search criteria when it is.

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

value: eligible

search_criterias
array of search_criteria
required

The searches HTS applies before shopping a rebook from this segment. Partners sourcing their own inventory must apply them so their rebook options match the HTS-sourced flow.

Items ≥ 1
Show fields
…
ineligible (ineligible) ineligible
type
string
required

value: ineligible

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]?$
disruption
disruption_reason · one of 3

The disruption experienced by the segment, if any has occurred.

Show fields

The disruption experienced by the segment, if any has occurred.

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

value: canceled

delayed (delayed) delayed
type
string
required

value: delayed

delay_minutes
integer · int32
required

The number of minutes the flight was delayed.

missed_connection (missed_connection1) missed_connection1
type
string
required

value: missed_connection

400Syntactic errors were encountered while handling the request
Array of error
message
string
required
code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
401The client could not be authenticated
No body.
403The authenticated client does not have permission to call this endpoint
No body.
404The requested resource could not be found
No body.
422Semantic errors were encountered while handling the request
Array of dafar_rebook_eligibility_error · one of 5
Items ≥ 1
Exactly one of the following, selected by code:
contract_already_exercised (contract_already_exercised) contract_already_exercised
message
string
required

A human-readable message describing the error

code
string
required
contract_expired (contract_expired) contract_expired
message
string
required

A human-readable message describing the error

code
string
required
contract_not_confirmed (contract_not_confirmed) contract_not_confirmed
message
string
required

A human-readable message describing the error

code
string
required
contract_not_found (contract_not_found) contract_not_found
message
string
required

A human-readable message describing the error

code
string
required
contract_voided (contract_voided) contract_voided
message
string
required

A human-readable message describing the error

code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
499The client cancelled the request
No body.
500The server encountered an internal error
No body.
Request
curl -X GET "https://fintech.staging.htsapis.com/flights-dafar/v2/contracts/<id>/rebook_eligibility" \
  -H "X-Api-Key: $HTS_API_KEY"
Response 200
{
  "slices": [
    {
      "segments": [
        {
          "id": "seg_1",
          "origin_airport": "YUL",
          "destination_airport": "YYZ",
          "departure_date_time": "2024-06-15T14:30",
          "arrival_date_time": "2024-06-15T16:00",
          "marketing_carrier_code": "AC",
          "marketing_flight_number": 123,
          "cabin": "Economy",
          "reservation_booking_designator": "J",
          "rebook_eligibility": {
            "type": "string",
            "search_criterias": []
          },
          "disruption": {
            "type": "string"
          }
        }
      ]
    }
  ]
}

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