FX-Port API
Flights

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 valueDescription
internal booking id (UUID)Recommended — stable and unambiguous
supplier order IDAmadeus/Duffel order identifier stored on the booking
PNRAirline 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

FieldDescription
booking.idInternal UUID — use this as primary key when storing or re-fetching a booking
booking.booking_idPNR / airline record locator. Not globally unique; prefer id.
booking.bucket_linkConfirmation PDF URL. null until generated — poll until populated.
booking.ticket_numberE-ticket number(s)
booking.statusconfirmed, awaiting_payment, cancelled, etc.
booking.ticketing_agreementAmadeus ticketing-time-limit agreement code, e.g. DELAY_TO_CANCEL
booking.require_acd / .acd_submittedAlgerian Currency Declaration requirement/upload state for this booking, when applicable — see Flight pricing
booking.has_changed / .new_flight_detailsSet when the airline schedule-changed this booking after ticketing
booking.email_sentWhether the confirmation email was sent to the traveler
pricingBreakdown.b2b_priceAmount debited from agency balance = final_price − agency_commission
pricingBreakdown.taxes_and_feesTaxes + platform fees. Excludes agency_commission.
travelerPricing[n]Per-traveler price breakdown, same shape as search but snake_case
balanceOperationsInternal ledger entries for this booking (topups, refunds); usually empty unless a manual adjustment occurred

On this page