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
Mark a contract as exercised with the supplied payouts. 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:payout (payout2) payout2
typevalue: payout
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 in the currency of the original booking.
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.
rebooking (rebooking) rebooking
typevalue: rebooking
amountThe amount that the rebooking cost in the currency of the original booking.
currencyCurrency of the rebooking amount.
reasonHuman-readable explanation for why this exercise was performed.
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:invalid_contract_status (invalid_contract_status) invalid_contract_status
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-dafar/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.
