HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/flight_bookingsOtherCreate Flight Booking
Create a flight booking from a price quote. HTS derives how the booking is fulfilled from the price quote: for an HTS-issued quote HTS issues the ticket asynchronously and the partner polls for status; for a partner-supplied quote the partner has already issued the ticket and supplies a partner_booking_reference, which HTS records as the redemption against the contract instead of issuing a ticket. Partner-supplied inventory is gated per tenant.
Request body application/json · required
price_quote_idThe ID of the price quote to book.
partner_booking_referenceThe partner's own booking reference (PNR) for a rebooked ticket it already issued. Send it when the partner booked the replacement flight itself, and HTS records this reference instead of issuing its own ticket; omit it when HTS issues the ticket. HTS determines from the price quote whether this field is required.
Show fields
pnrsThe PNR(s) of the partner-issued booking.
Responses
201The created flight booking
idUnique identifier for this flight booking.
statusCurrent status of the booking.
Show fields
Current status of the booking.
type:confirmed (confirmed) confirmed
typevalue: confirmed
failed (failed) failed
typevalue: failed
errorError message describing why the booking failed.
pending (pending) pending
typevalue: pending
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
422Semantic errors were encountered while handling the request
code:booking_failed (booking_failed) booking_failed
messageA human-readable message describing the error
codepartner_booking_reference_required (partner_booking_reference_required) partner_booking_reference_required
messageA human-readable message describing the error
codepartner_inventory_not_enabled (partner_inventory_not_enabled1) partner_inventory_not_enabled1
messageA human-readable message describing the error
codeprice_quote_expired (price_quote_expired) price_quote_expired
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 POST "https://fintech.staging.htsapis.com/flights-dafar/v2/flight_bookings" \
-H "X-Api-Key: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_quote_id": "pq_abc123",
"partner_booking_reference": {
"pnrs": [
"string"
]
}
}'{
"id": "bk_abc123",
"status": {
"type": "string"
}
}Examples are generated from the schema where the spec publishes none; field values are illustrative.
