API reference

HTS APIs

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

POST/orderCancelCancel

Confirm order cancellation

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

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-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
Idempotency-Key
header · string

Optional 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.

Length ≤ 128 · Pattern ^[\x20-\x7E]+$ · Example 550e8400-e29b-41d4-a716-446655440000

Request body application/json · required

order_id
string
required

The order to cancel

Example ord_abc123

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.

Idempotency-Key
response header

The 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.

id
string
required

Unique cancellation identifier

Example ocn_xyz789
order_id
string
required

The order that was cancelled

Example ord_abc123
status
string enum
required
Values confirmedpending · Example confirmed
refund
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
refund_method
string enum

How 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.
Values original_form_of_paymentvoucher · Example original_form_of_payment
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.

Idempotency-Key
response header

The 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.

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.

Idempotency-Key
response header

The 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.

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.

Idempotency-Key
response header

The 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.

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.

Idempotency-Key
response header

The 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.

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 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"
}'
Response 200
{
  "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.