API reference

HTS APIs

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

PUT/contracts/{id}/voidOther

Void Contract

https://fintech.staging.htsapis.com/flights-cfar/v2/contracts/{id}/void

Voiding a contract results in the customer being refunded the total price of the product. This should be used when the itinerary associated with the contracts is canceled within the void window.

Parameters

id
path · string
required

A unique identifier for a contract.

Request body application/json

reason
reason · one of 4
required

Explanation for why this void occurred.

Show fields

Explanation for why this void occurred.

Exactly one of the following, selected by type:
good_will (good_will) good_will
type
string
required

value: good_will

not_purchased (not_purchased) not_purchased
type
string
required

value: not_purchased

other (other1) other1
type
string
required

value: other

reason
string
required

Human-readable explanation for why this void was performed.

Length ≥ 1
void_window (void_window) void_window
type
string
required

value: void_window

Responses

204
No body.
400Syntactic errors were encountered while handling the request
Array of error
message
string
required
code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
401The client could not be authenticated
No body.
403The authenticated client does not have permission to call this endpoint
No body.
404The requested resource could not be found
No body.
422Semantic errors were encountered while handling the request
Array of cfar_void_contract_error · one of 3
Items ≥ 1
Exactly one of the following, selected by code:
invalid_contract_status (invalid_contract_status2) invalid_contract_status2
message
string
required

A human-readable message describing the error

code
string
required
order_not_found (order_not_found1) order_not_found1
message
string
required

A human-readable message describing the error

code
string
required
payment_refund_failed (payment_refund_failed) payment_refund_failed
message
string
required

A human-readable message describing the error

code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
499The client cancelled the request
No body.
500The server encountered an internal error
No body.
Request
curl -X PUT "https://fintech.staging.htsapis.com/flights-cfar/v2/contracts/<id>/void" \
  -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.