API reference

HTS APIs

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

PUT/orderReshopPre-cancel

Get cancel and exchange eligibility, or shop for exchange offers

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

Unified post-booking reshop endpoint with two phases based on request body:

  • Phase 1 — Eligibility (send order_id only): Returns cancel eligibility (penalty, refund amount, refund method) and exchange eligibility (type, penalty) for the full order.

  • Phase 2 — Shop (send order_id + slices): Returns available replacement flight offers with pricing differentials. Each offer includes a token used to confirm the exchange via orderChange.

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

order_id
string
required

The order to evaluate for cancel or exchange

Example ord_abc123
slices
order_change_slices

Specifies which slices to remove and what replacement criteria to search for

Show fields
remove
array of slice_to_remove
required

Slices to remove from the original order

Show fields
Array of slice_to_remove · Slices to remove from the original order
slice_id
string
required

ID of the slice to replace from the original order

Example sli_0
add
array of query_slice
required

Replacement slice search criteria

Show fields
Array of query_slice · Replacement slice search criteria
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

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.

Exactly one of the following, selected by type:
eligibility (order_reshop_eligibility) order_reshop_eligibility
type
string enum
required

Discriminator — always 'eligibility' for Phase 1 responses

Values eligibility
cancel
cancel_eligibility
required
Show fields
eligible
boolean
required

Whether the order is eligible for cancellation

Example true
type
string enum
  • void: Same-day cancellation within the void window; full refund, no penalty.
  • refund: Post-void cancellation; penalty deducted from refund.
Values voidrefund · Example refund
refund_to
string enum
  • original_form_of_payment: Refund returned to the card used at booking.
  • voucher: Refund issued as future travel credit.
Values original_form_of_paymentvoucher · Example original_form_of_payment
penalty
price

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
refund
price

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
exchange
exchange_eligibility
required
Show fields
eligible
boolean
required

Whether the order is eligible for exchange

Example true
type
string enum
  • free: No change fee (airline FTC policy or fare rules).
  • fee: Change fee applies. The penalty field contains the fee amount when the provider reports it upfront; otherwise it is omitted and the exact fee appears on each offer during exchange shopping.
Values freefee · Example fee
penalty
object

Exchange penalty amount, if known at eligibility time. Some providers only determine the penalty during exchange shopping; in that case this field is omitted and the fee appears on each exchange 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
offers (order_reshop_offers) order_reshop_offers
type
string enum
required

Discriminator — always 'offers' for Phase 2 responses

Values offers
offers
array of reshop_offer
required

Available exchange options. Empty when no alternatives exist.

Show fields
Array of reshop_offer · Available exchange options. Empty when no alternatives exist.
token
string
required

Opaque token identifying this offer. Pass to orderChange to confirm.

Example eyJhbGciOiJIUzI1NiJ9...
slices
array of slice
required

The replacement flight slices for this offer.

Show fields
Array of slice · The replacement flight slices for 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
change_total
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
penalty
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
new_total
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
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"
  }
}
404Not Found
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/orderReshop" \
  -H "HTS-API-KEY: $HTS_API_KEY" \
  -H "Request-Id: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "ord_abc123",
  "slices": {
    "remove": [
      {
        "slice_id": "sli_0"
      }
    ],
    "add": [
      {
        "origin": "YUL",
        "destination": "JFK",
        "departure_date": "2026-06-01",
        "origin_type": "airport",
        "destination_type": "airport"
      }
    ]
  }
}'
Response 200
{
  "type": "eligibility",
  "cancel": {
    "eligible": true,
    "type": "refund",
    "refund_to": "original_form_of_payment",
    "penalty": {
      "currency": "USD",
      "base_amount": "120.00",
      "total_amount": "150.00",
      "taxes_and_fees_amount": "30.00",
      "taxes_and_fees": [
        {
          "code": "YQ",
          "amount": "15.00"
        }
      ]
    },
    "refund": {
      "currency": "USD",
      "base_amount": "120.00",
      "total_amount": "150.00",
      "taxes_and_fees_amount": "30.00",
      "taxes_and_fees": [
        {
          "code": "YQ",
          "amount": "15.00"
        }
      ]
    }
  },
  "exchange": {
    "eligible": true,
    "type": "fee",
    "penalty": {
      "currency": "USD",
      "base_amount": "120.00",
      "total_amount": "150.00",
      "taxes_and_fees_amount": "30.00",
      "taxes_and_fees": [
        {
          "code": "YQ",
          "amount": "15.00"
        }
      ]
    }
  }
}

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