API reference

HTS APIs

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

POST/flight_bookingsOther

Create Flight Booking

https://fintech.staging.htsapis.com/flights-dafar/v2/flight_bookings

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_id
string
required

The ID of the price quote to book.

partner_booking_reference
partner_booking_reference

The 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
pnrs
array of string
required

The PNR(s) of the partner-issued booking.

Items ≥ 1

Responses

201The created flight booking
id
string
required

Unique identifier for this flight booking.

status
status1 · one of 3
required

Current status of the booking.

Show fields

Current status of the booking.

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

value: confirmed

failed (failed) failed
type
string
required

value: failed

error
string
required

Error message describing why the booking failed.

Length ≥ 1
pending (pending) pending
type
string
required

value: pending

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.
422Semantic errors were encountered while handling the request
Array of dafar_flight_booking_error · one of 4
Items ≥ 1
Exactly one of the following, selected by code:
booking_failed (booking_failed) booking_failed
message
string
required

A human-readable message describing the error

code
string
required
partner_booking_reference_required (partner_booking_reference_required) partner_booking_reference_required
message
string
required

A human-readable message describing the error

code
string
required
partner_inventory_not_enabled (partner_inventory_not_enabled1) partner_inventory_not_enabled1
message
string
required

A human-readable message describing the error

code
string
required
price_quote_expired (price_quote_expired) price_quote_expired
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-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"
    ]
  }
}'
Response 201
{
  "id": "bk_abc123",
  "status": {
    "type": "string"
  }
}

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