API reference

HTS APIs

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

POST/contracts/{id}/user_projected_payoutsOther

Get User Projected Payouts

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

Returns the projected payout a user would receive if they exercised CFAR on this contract, for each payout option, broken down by how they would be refunded. Read-only; does not create an exercise quote.

The projection uses the same payout calculation as the exercise quote. Where the contract carries a cancellation penalty, the payout is capped at that penalty, as it is when exercising. The projection is returned even while the booking is within the void window.

Returns 422 if the contract is not in a state that can be exercised (already exercised, voided, cancelled, expired or not purchased); the body carries the specific reason.

Parameters

id
path · string
required

A unique identifier for a contract.

Responses

200The projected payout breakdown, by payout option
currency
string
required

The currency all payout amounts are in.

payout_options
array of user_payout_option
required

Options detailing the different ways the user could be paid out if they exercised CFAR, mirroring the payout_options of an exercise quote.

Items ≥ 1
Show fields
Array of user_payout_option · Options detailing the different ways the user could be paid out if they exercised CFAR, mirroring the `payout_options` of an exercise quote.
Items ≥ 1
total_payout_amount
string
required

The total amount the user would be paid out under this option. Sum of all payouts amounts.

Range ≥ 0
payouts
array of cfar_exercise_payout
required

The list of payouts which would be issued for this payout option.

Items ≥ 1
Show fields
Array of cfar_exercise_payout · one of 2 · The list of payouts which would be issued for this payout option.
Items ≥ 1

The method by which the payout will be be delivered to the customer.

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

value: future_travel_credit

amount
string
required

The amount of the payout.

original_form_of_payment (original_form_of_payment) original_form_of_payment
type
string
required

value: original_form_of_payment

payment
refundable_payment · one of 5
required

DEPRECATED: The payment details for this payout.

Show fields

DEPRECATED: The payment details for this payout.

Exactly one of the following, selected by type:
alternate_payment_method (alternate_payment_method) alternate_payment_method
loyalty_program (loyalty_program) loyalty_program
not_provided (not_provided2) not_provided2
payment_card (payment_card) payment_card
reseller_controlled (reseller_controlled) reseller_controlled
payout
refundable_payment · one of 5
required

The payment details for this payout.

Show fields

The payment details for this payout.

Exactly one of the following, selected by type:
alternate_payment_method (alternate_payment_method) alternate_payment_method
loyalty_program (loyalty_program) loyalty_program
not_provided (not_provided2) not_provided2
payment_card (payment_card) payment_card
reseller_controlled (reseller_controlled) reseller_controlled
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 user_payouts_error · one of 6
Items ≥ 1
Exactly one of the following, selected by code:
contract_canceled (contract_canceled) contract_canceled
message
string
required

A human-readable message describing the error

code
string
required
contract_exercised (contract_exercised) contract_exercised
message
string
required

A human-readable message describing the error

code
string
required
contract_not_purchased (contract_not_purchased) contract_not_purchased
message
string
required

A human-readable message describing the error

code
string
required
contract_voided (contract_voided) contract_voided
message
string
required

A human-readable message describing the error

code
string
required
expired (expired) expired
message
string
required

A human-readable message describing the error

code
string
required
purchase_payments_not_on_contract (purchase_payments_not_on_contract) purchase_payments_not_on_contract
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 POST "https://fintech.staging.htsapis.com/flights-cfar/v2/contracts/<id>/user_projected_payouts" \
  -H "X-Api-Key: $HTS_API_KEY"
Response 200
{
  "currency": "USD",
  "payout_options": [
    {
      "total_payout_amount": "173.24",
      "payouts": [
        {
          "type": "string",
          "amount": "string"
        }
      ]
    }
  ]
}

Examples are generated from the schema where the spec publishes none; field values are illustrative.