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.
Retrieve full booking details by FX-Port booking ID, supplier order ID, or PNR.
Permission: Read
Identifying the booking
The request body has one field, booking_id. Its value can be any of these identifiers:
booking_id value | Description |
|---|---|
internal booking id (UUID) | Recommended — stable and unambiguous |
| supplier order ID | Amadeus/Duffel order identifier stored on the booking |
| PNR | Airline record locator — not globally unique |
Always send the value in booking_id. Prefer the internal UUID or supplier order ID. PNRs can
collide across suppliers/airlines.
Getting the confirmation PDF
After a booking is confirmed, the PDF is generated asynchronously (typically 10–30 seconds).
Call get_booking and check booking.bucket_link.
If bucket_link is null, the PDF is still generating. Retry every 5–10 seconds.
Once bucket_link is populated, it contains the direct download URL to the PDF.
Alternatively, use POST /api/v1/flights/get_ticket which returns a ticket_ready boolean
and the URL once ready.
Request example
curl --request POST \
--url https://api.fx-port.com/api/v1/flights/get_booking \
--header 'Authorization: Bearer fxp_test_YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '{
"booking_id": "eJzTd9ePMo_0NXMEAAtYAlQ"
}'Response example
An Amadeus Algeria booking, already paid and ticketed:
{
"environment": "sandbox",
"success": true,
"requestId": "562ec08a",
"booking": {
"id": "fbecce4f-022b-45c9-9bee-f82a09bcb7c3",
"booking_id": "Z7YM6A",
"status": "confirmed",
"created_at": "2026-08-27T18:14:08.357503+00:00",
"paid_at": "2026-08-27T18:14:30.784785+00:00",
"total_price": 5086.53,
"agency_commission": 5.09,
"currency": "DZD",
"departure_airport": "ALG",
"arrival_airport": "ORN",
"departure_date": "2026-09-20T21:20:00",
"arrival_date": "2026-09-20T22:20:00",
"included_checked_bags": "0",
"ticketing_agreement": "DELAY_TO_CANCEL",
"supplier_name": "Amadeus Algeria",
"supplier_id": "amadeus_aqc_dz_1",
"amadeus_id": "eJzTd9ePMo_0NXMEAAtYAlQ",
"ticket_number": "124-2442997961",
"bucket_link": "https://s3.example.com/flight-bookings/Z7YM6A-confirmed.pdf",
"email_sent": true,
"require_acd": false,
"acd_submitted": null,
"has_changed": false,
"voided_at": null,
"refund_amount": null,
"environment": "sandbox",
"pricingBreakdown": {
"supplier_currency": "DZD",
"agency_currency": "DZD",
"base_price": 3160.0,
"taxes_and_fees": 1921.44,
"agency_commission": 5.09,
"final_price": 5086.53,
"b2b_price": 5081.44
},
"travelerPricing": [
{
"traveler_id": "1",
"traveler_type": "ADULT",
"fare_option": "STANDARD",
"supplier_currency": "DZD",
"agency_currency": "DZD",
"base": 3160.0,
"total": 5086.53,
"b2b_price": 5081.44
}
],
"balanceOperations": []
}
}Key fields
| Field | Description |
|---|---|
booking.id | Internal UUID — use this as primary key when storing or re-fetching a booking |
booking.booking_id | PNR / airline record locator. Not globally unique; prefer id. |
booking.bucket_link | Confirmation PDF URL. null until generated — poll until populated. |
booking.ticket_number | E-ticket number(s) |
booking.status | confirmed, awaiting_payment, cancelled, etc. |
booking.ticketing_agreement | Amadeus ticketing-time-limit agreement code, e.g. DELAY_TO_CANCEL |
booking.require_acd / .acd_submitted | Algerian Currency Declaration requirement/upload state for this booking, when applicable — see Flight pricing |
booking.has_changed / .new_flight_details | Set when the airline schedule-changed this booking after ticketing |
booking.email_sent | Whether the confirmation email was sent to the traveler |
pricingBreakdown.b2b_price | Amount debited from agency balance = final_price − agency_commission |
pricingBreakdown.taxes_and_fees | Taxes + platform fees. Excludes agency_commission. |
travelerPricing[n] | Per-traveler price breakdown, same shape as search but snake_case |
balanceOperations | Internal ledger entries for this booking (topups, refunds); usually empty unless a manual adjustment occurred |