Flights
POST /api/v1/flights/get_ticket
Returns the ticket PDF download URL. Polls ticket_ready until the PDF is ready.
Returns the PDF download URL for a confirmed booking. The PDF is generated asynchronously after
booking — poll until ticket_ready is true.
Permission: Read
Simpler alternative: Call get_booking and read booking.bucket_link directly. It is
populated as soon as the PDF is ready (same data, one fewer endpoint).
Recommended polling strategy
- Book flight → store the returned
order_id(or PNR). - After ~10 seconds, call
get_ticket. - If
ticket_ready: false, retry every 10 seconds (up to ~2 minutes). - Once
ticket_ready: true, present or download the PDF fromdownload_url.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
booking_id | string | Yes | PNR or supplier order ID |
Request example
curl --request POST \
--url https://api.fx-port.com/api/v1/flights/get_ticket \
--header 'Authorization: Bearer fxp_live_YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '{
"booking_id": "XE4YCB"
}'Response — ticket not ready yet
{
"success": true,
"requestId": "a1b2c3d4",
"ticket_ready": false,
"booking_id": "XE4YCB",
"message": "Ticket is not ready yet. Please retry in a moment."
}Response — ticket ready
{
"success": true,
"requestId": "a1b2c3d4",
"ticket_ready": true,
"booking_id": "XE4YCB",
"download_url": "https://s3.eu-central-003.backblazeb2.com/213carousat/flight-bookings/XE4YCB-JAMES-SMITH.pdf"
}POST /api/v1/flights/get_booking
Retrieve full booking details through one booking_id field that accepts an internal UUID, supplier order ID, or PNR. Includes the PDF download link.
GET /api/v1/flights/airports
Airport autocomplete for origin/destination inputs. No authentication required. Supports 30+ language locales.