HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/contracts/{id}/exerciseOtherExercise a Contract
Record an exercise for all remaining passengers or only the identified passengers. Full-itinerary exercise uses supplied payouts; passenger exercise records the full covered amount for the selected passengers in the contract's currency. This should only be used in cases where a customer could not exercise their contract via the standard flow. The partner can perform the exercise and inform HTS of the action.
Parameters
idA unique identifier for a contract.
Request body application/json · required
type:full_itinerary_exercise_request (full_itinerary_exercise_request) full_itinerary_exercise_request
typevalue: full_itinerary_exercise_request
payout_informationPayout information for the exercise. Either a detailed breakdown of payouts (Provided) or a signal that no payout details are available (NotProvided). If both payouts and payout_information are provided, payout_information takes precedence.
Show fields
Payout information for the exercise. Either a detailed breakdown of payouts (Provided) or a signal that no payout details are available (NotProvided). If both payouts and payout_information are provided, payout_information takes precedence.
type:not_provided (not_provided3) not_provided3
typevalue: not_provided
amountTotal amount of the payout.
provided (provided1) provided1
typevalue: provided
payoutsList of payouts issued to the customer.
Show fields
type:alternate_payment_method (alternate_payment_method) alternate_payment_method
typeA payment that cannot be tokenized. eg: ApplePay.
amountmethodThe method of payment.
Show fields
loyalty_program (loyalty_program) loyalty_program
typevalue: loyalty_program
amountnameThe name of the of the loyalty program, e.g. points, miles, cash_rewards, etc. Required, to ensure that the amounts are refunded to the same loyalty program used during purchase.
unitsThe unit to currency exchange rate is implicit from the amount in the Payment object and this number of points.
payment_card (payment_card) payment_card
typeA credit or debit card. Must be tokenized (refer to above documentation).
amountidentifierShow fields
currencyCurrency of all exercise payouts.
reasonHuman-readable explanation for why this exercise was performed.
payoutsDEPRECATED: Use payout_information instead. The payouts issued to the customer.
Show fields
type:alternate_payment_method (alternate_payment_method) alternate_payment_method
typeA payment that cannot be tokenized. eg: ApplePay.
amountmethodThe method of payment.
Show fields
The method of payment.
type:apple_pay (apple_pay) apple_pay
typevalue: apple_pay
other (other) other
typevalue: other
nameName of the alternate payment method for unsupported types, e.g. Bank Transfer.
paypal (paypal) paypal
typevalue: paypal
venmo (venmo) venmo
typevalue: venmo
loyalty_program (loyalty_program) loyalty_program
typevalue: loyalty_program
amountnameThe name of the of the loyalty program, e.g. points, miles, cash_rewards, etc. Required, to ensure that the amounts are refunded to the same loyalty program used during purchase.
unitsThe unit to currency exchange rate is implicit from the amount in the Payment object and this number of points.
payment_card (payment_card) payment_card
typeA credit or debit card. Must be tokenized (refer to above documentation).
amountidentifierShow fields
type:details (details) details
typevalue: details
last_four_digitsLast four digits of the payment card.
[0-9]{4}expiration_monthTwo digits expiration month of the payment card.
[0-9]{2}expiration_yearFour digits expiration year of the payment card.
[0-9]{4}token (token) token
typevalue: token
valueThe token representing a credit card or a debit card. Used to process refunds to the original form of payment.
passengers_from_ids_exercise_request (passengers_from_ids_exercise_request) passengers_from_ids_exercise_request
typevalue: passengers_from_ids_exercise_request
reasonHuman-readable explanation for why this exercise was performed.
passenger_idsPartner-defined passenger IDs to exercise. Must contain at least one value.
Responses
204
400Syntactic errors were encountered while handling the request
messagecodeExample
[
{
"message": "string",
"code": "string"
}
]401The client could not be authenticated
403The authenticated client does not have permission to call this endpoint
404The requested resource could not be found
422Semantic errors were encountered while handling the request
code:contract_expired (contract_expired) contract_expired
messageA human-readable message describing the error
codeinvalid_contract_status (invalid_contract_status1) invalid_contract_status1
messageA human-readable message describing the error
codepassenger_already_exercised (passenger_already_exercised) passenger_already_exercised
messageA human-readable message describing the error
codepassenger_not_found (passenger_not_found) passenger_not_found
messageA human-readable message describing the error
codeExample
[
{
"message": "string",
"code": "string"
}
]499The client cancelled the request
500The server encountered an internal error
curl -X PUT "https://fintech.staging.htsapis.com/flights-cfar/v2/contracts/<id>/exercise" \
-H "X-Api-Key: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "string",
"payout_information": {
"type": "provided",
"amount": "200.00"
},
"currency": "CAD",
"reason": "string"
}'Examples are generated from the schema where the spec publishes none; field values are illustrative.
