HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/orderCancelCancelConfirm order cancellation
Execute the cancellation for a previously evaluated order. The server re-evaluates the cancellation terms at commit time. Returns the confirmed cancellation with final refund amount.
Parameters
Request-IdOptional 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.
Idempotency-KeyOptional 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.
Request body application/json · required
order_idThe order to cancel
ord_abc123Responses
200OK
Request-IdUUID 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-KeyThe 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.
idUnique cancellation identifier
ocn_xyz789order_idThe order that was cancelled
ord_abc123statusconfirmedpending · Example confirmedrefundPrice information for an offer.
Show fields
currencyISO 4217 currency code
^[A-Z]{3}$ · Example USDbase_amountThe base fare amount before taxes as a decimal string.
120.00total_amountThe total amount as a decimal string (base_amount + taxes_and_fees).
150.00taxes_and_fees_amountThe total amount of taxes and fees as a decimal string.
30.00taxes_and_feesItemized taxes and fees breakdown.
Show fields
codeCharge code identifier (e.g., IATA tax/fee codes)
YQamountCharge amount as a decimal string
15.00penaltyPrice information for an offer.
Show fields
currencyISO 4217 currency code
^[A-Z]{3}$ · Example USDbase_amountThe base fare amount before taxes as a decimal string.
120.00total_amountThe total amount as a decimal string (base_amount + taxes_and_fees).
150.00taxes_and_fees_amountThe total amount of taxes and fees as a decimal string.
30.00taxes_and_feesItemized taxes and fees breakdown.
Show fields
codeCharge code identifier (e.g., IATA tax/fee codes)
YQamountCharge amount as a decimal string
15.00refund_methodHow the refund will be issued to the customer.
original_form_of_payment: Refund to the original payment method.voucher: Airline-issued travel voucher or future travel credit.
original_form_of_paymentvoucher · Example original_form_of_payment400Bad Request
Request-IdUUID 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-KeyThe 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.
errorShow fields
codeA machine-readable snake_case string for programmatic handling.
parameter_missingmessageA human-readable description for the developer.
The 'passengers' parameter is required to create a booking.paramThe specific request parameter that caused the error.
passengersExample
{
"error": {
"code": "parameter_missing",
"message": "The 'passengers' parameter is required to create a booking.",
"param": "passengers"
}
}404Not Found
Request-IdUUID 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-KeyThe 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.
errorShow fields
codeA machine-readable snake_case string for programmatic handling.
parameter_missingmessageA human-readable description for the developer.
The 'passengers' parameter is required to create a booking.paramThe specific request parameter that caused the error.
passengersExample
{
"error": {
"code": "parameter_missing",
"message": "The 'passengers' parameter is required to create a booking.",
"param": "passengers"
}
}422Unprocessable Entity
Request-IdUUID 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-KeyThe 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.
errorShow fields
codeA machine-readable snake_case string for programmatic handling.
parameter_missingmessageA human-readable description for the developer.
The 'passengers' parameter is required to create a booking.paramThe specific request parameter that caused the error.
passengersExample
{
"error": {
"code": "parameter_missing",
"message": "The 'passengers' parameter is required to create a booking.",
"param": "passengers"
}
}500Internal Server Error
Request-IdUUID 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-KeyThe 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.
errorShow fields
codeA machine-readable snake_case string for programmatic handling.
parameter_missingmessageA human-readable description for the developer.
The 'passengers' parameter is required to create a booking.paramThe specific request parameter that caused the error.
passengersExample
{
"error": {
"code": "parameter_missing",
"message": "The 'passengers' parameter is required to create a booking.",
"param": "passengers"
}
}curl -X POST "https://travel-distribution.staging.htsapis.com/api/flights/v1/orderCancel" \
-H "HTS-API-KEY: $HTS_API_KEY" \
-H "Request-Id: $(uuidgen)" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"order_id": "ord_abc123"
}'{
"id": "ocn_xyz789",
"order_id": "ord_abc123",
"status": "confirmed",
"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"
}
]
},
"refund_method": "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"
}
]
}
}Examples are generated from the schema where the spec publishes none; field values are illustrative.
