HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/contracts/{id}/cancelCancelCancel Contract
Canceling a contract does not result in the customer being refunded the total price of the product. This should be used when the itinerary associated with the contracts is canceled outside of the void window.
Parameters
idA unique identifier for a contract.
Request body application/json
reasonExplanation for why this cancellation occurred.
Show fields
Explanation for why this cancellation occurred.
type:chargeback (chargeback) chargeback
typevalue: chargeback
other (other2) other2
typevalue: other
reasonHuman-readable explanation for why this policy cancellation 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_status3) invalid_contract_status3
messageA human-readable message describing the error
codeorder_item_not_found (order_item_not_found) order_item_not_found
messageA human-readable message describing the error
codepayment_refund_failed (payment_refund_failed1) payment_refund_failed1
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>/cancel" \
-H "X-Api-Key: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": {
"type": "string"
}
}'Examples are generated from the schema where the spec publishes none; field values are illustrative.
