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_live_YOUR_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "booking_id": "e133d887-fd3c-4a44-a19e-4f20ddb690d4"
  }'

Response example

{
    "success": true,
    "requestId": "a1b2c3d4",
    "booking": {
        "id": "e133d887-fd3c-4a44-a19e-4f20ddb690d4",
        "booking_id": "EDJP6K",
        "status": "confirmed",
        "ticket_number": "057-1234567890",
        "total_price": 11107.9,
        "agency_commission": 11.1,
        "currency": "DZD",
        "supplier_id": "duffel_1",
        "supplier_name": "Duffel",
        "departure_airport": "ALG",
        "arrival_airport": "ORY",
        "departure_date": "2026-09-25T08:30:00",
        "paid_at": "2026-08-18T09:14:05Z",
        "bucket_link": null,
        "environment": "sandbox",
        "pricingBreakdown": {
            "supplier_currency": "USD",
            "agency_currency": "DZD",
            "base_price": 6170.0,
            "taxes_and_fees": 4926.8,
            "agency_commission": 11.1,
            "final_price": 11107.9,
            "b2b_price": 11096.8,
            "created_at": "2026-08-18T09:14:05Z",
            "environment": "sandbox"
        },
        "travelerPricing": [
            {
                "traveler_id": "1",
                "traveler_type": "ADULT",
                "fare_option": "STANDARD",
                "supplier_currency": "USD",
                "agency_currency": "DZD",
                "base": 4800.0,
                "total": 11107.9,
                "b2b_price": 11096.8,
                "environment": "sandbox"
            }
        ],
        "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.
pricingBreakdown.b2b_priceAmount debited from agency balance = final_price − agency_commission
pricingBreakdown.taxes_and_feesTaxes + platform fees. Excludes agency_commission.

On this page