Get a flight booking
Read a booking of your agency by its PNR, its supplier order id or its FX-Port id: status, prices, ticket number, the links of the PDF tickets and the ACD state.
/api/v1/flights/get_bookingbooking_id takes any of the three values (order_id and pnr are other names of the same field; when they are sent with a different value, booking_id wins and an ignored_field warning names the dropped one). Prefer the FX-Port id (a UUID) or the order id: PNRs are not unique across suppliers and airlines. A booking that is not yours, or that belongs to the other environment, is answered 404 booking_not_found, the same as one that does not exist.
booking.status is confirmed, awaiting_payment (a hold), cancelled, partial_refund or failed. ticket_number is null until the airline returns it: ask get_ticket_number. acd_required says whether the booking needs ACD passports and acd_submitted whether they are all uploaded; acd_documents[] and acd_links list the files that were uploaded (public links, without FX-Port's storage keys), but get_acd_documents is the better source for the state of each traveler. The links pdf_url and pdf_url_no_price (bucket_link and bucket_link_no_price) are public: anybody who has them can open the PDF, so treat them as sensitive. The booking is a database row: only the keys listed below are part of the contract.
curl https://api.fx-port.com/api/v1/flights/get_booking \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"booking_id": "Y7PAEU"
}'{
"environment": "sandbox",
"success": true,
"requestId": "0c2b315c",
"processingTime": 0.272,
"booking": {
"id": "711371c3-00aa-4be2-b790-9f0ca2ccfdb7",
"booking_id": "Y7PAEU",
"amadeus_id": "eJzTd9ePNA9wdA0FAAs8AmE",
"status": "confirmed",
"created_at": "2026-11-01T15:26:14.871035+00:00",
"paid_at": "2026-11-01T15:26:21.961664+00:00",
"updated_at": "2026-11-01T15:26:21.998944+00:00",
"total_price": 4930.37,
"agency_commission": 4.93,
"currency": "DZD",
"departure_airport": "ALG",
"arrival_airport": "ORN",
"departure_date": "2026-12-22T19:45:00",
"arrival_date": "2026-12-22T20:45:00",
"return_departure_date": null,
"return_arrival_date": null,
"included_checked_bags": "0",
"ticketing_agreement": "DELAY_TO_CANCEL",
"supplier_name": "Amadeus Algeria",
"supplier_id": "amadeus_aqc_dz_1",
"ticket_number": "124-2446977397",
"bucket_link": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH.pdf",
"bucket_link_no_price": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH-no-price.pdf",
"email_sent": false,
"require_acd": false,
"acd_submitted": false,
"acd_links": null,
"acd_amount": null,
"acd_paid": false,
"acd_documents_revision": 0,
"acd_documents": null,
"has_changed": false,
"new_flight_details": null,
"voided_at": null,
"refund_amount": null,
"refund_currency": null,
"refund_method": null,
"agent_id": null,
"environment": "sandbox",
"pricingBreakdown": {
"supplier_currency": "DZD",
"agency_currency": "DZD",
"base_price": 3160,
"taxes_and_fees": 1765.44,
"agency_commission": 4.93,
"final_price": 4930.37,
"b2b_price": 4925.44,
"created_at": "2026-11-01T15:26:22.176516+00:00",
"environment": "sandbox"
},
"travelerPricing": [
{
"traveler_id": "1",
"traveler_type": "ADULT",
"fare_option": "STANDARD",
"supplier_currency": "DZD",
"agency_currency": "DZD",
"base": 3160,
"total": 4930.37,
"b2b_price": 4925.44,
"created_at": "2026-11-01T15:26:15.133066+00:00",
"environment": "sandbox"
}
],
"balanceOperations": [],
"order_id": "eJzTd9ePNA9wdA0FAAs8AmE",
"pnr": "Y7PAEU",
"pdf_url": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH.pdf",
"pdf_url_no_price": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH-no-price.pdf",
"acd_required": false,
"requires_acd": false
}
}{
"environment": "sandbox",
"success": true,
"requestId": "251723b0",
"processingTime": 0.292,
"booking": {
"id": "2acf8907-f5c5-4d5d-93b5-3e4a038ccdf1",
"booking_id": "Y7HWMD",
"amadeus_id": "eJzTd9ePNPcI93UBAAtdAmY",
"status": "confirmed",
"created_at": "2026-11-01T14:19:02.015222+00:00",
"paid_at": "2026-11-01T14:19:01.979761+00:00",
"updated_at": "2026-11-01T14:24:33.08805+00:00",
"total_price": 78780.71,
"agency_commission": 78.71,
"currency": "DZD",
"departure_airport": "CDG",
"arrival_airport": "ALG",
"departure_date": "2026-12-16T06:10:00",
"arrival_date": "2026-12-16T16:55:00",
"return_departure_date": null,
"return_arrival_date": null,
"included_checked_bags": "0",
"ticketing_agreement": "CONFIRM",
"supplier_name": "Amadeus Algeria",
"supplier_id": "amadeus_aqc_dz_1",
"ticket_number": null,
"bucket_link": "https://s3.example.com/flight-bookings/Y7HWMD-JANE-DOE.pdf",
"bucket_link_no_price": "https://s3.example.com/flight-bookings/Y7HWMD-JANE-DOE-no-price.pdf",
"email_sent": false,
"require_acd": true,
"acd_submitted": true,
"acd_links": [
"https://s3.example.com/fx-port/acd_passports/Y7HWMD/1/20261101142432_087a6dc8.png"
],
"acd_amount": 235,
"acd_paid": false,
"acd_documents_revision": 2,
"acd_documents": [
{
"traveler_id": "1",
"traveler_name": "JANE DOE",
"traveler_type": "ADULT",
"link": "https://s3.example.com/fx-port/acd_passports/Y7HWMD/1/20261101142432_087a6dc8.png",
"filename": "rescan.png",
"content_type": "image/png",
"size": 69,
"format": "png",
"uploaded_at": "2026-11-01T14:24:33.057044+00:00",
"replaced_count": 1,
"previous_links": [
{
"link": "https://s3.example.com/fx-port/acd_passports/Y7HWMD/1/20261101142430_9b354245.pdf",
"uploaded_at": "2026-11-01T14:24:31.256905+00:00",
"replaced_at": "2026-11-01T14:24:33.057044+00:00"
}
],
"source": "api"
}
],
"has_changed": false,
"new_flight_details": null,
"voided_at": null,
"refund_amount": null,
"refund_currency": null,
"refund_method": null,
"agent_id": null,
"environment": "sandbox",
"pricingBreakdown": {
"supplier_currency": "DZD",
"agency_currency": "DZD",
"base_price": 16390,
"taxes_and_fees": 62312,
"agency_commission": 78.71,
"final_price": 78780.71,
"b2b_price": 78702,
"created_at": "2026-11-01T14:19:02.205874+00:00",
"environment": "sandbox"
},
"travelerPricing": [
{
"traveler_id": "1",
"traveler_type": "ADULT",
"fare_option": "STANDARD",
"supplier_currency": "DZD",
"agency_currency": "DZD",
"base": 16390,
"total": 78780.72,
"b2b_price": 78702.01,
"created_at": "2026-11-01T14:19:02.115601+00:00",
"environment": "sandbox"
}
],
"balanceOperations": [],
"order_id": "eJzTd9ePNPcI93UBAAtdAmY",
"pnr": "Y7HWMD",
"pdf_url": "https://s3.example.com/flight-bookings/Y7HWMD-JANE-DOE.pdf",
"pdf_url_no_price": "https://s3.example.com/flight-bookings/Y7HWMD-JANE-DOE-no-price.pdf",
"acd_required": true,
"requires_acd": true
}
}Request
Body
Required, JSON.
booking_idstringThe PNR, the supplier order id or the FX-Port booking UUID. Prefer the UUID or the order id: PNRs are not unique.
order_idstringAnother name of booking_id.
pnrstringAnother name of booking_id.
include_api_responsebooleanget_booking only: true adds booking.apiResponse. Default false.
agency_idstringNot needed: the agency of a call is always the one of your API key. The field is accepted so that older clients keep working, and it is ignored.
bookingIdstringdeprecatedLegacy name, still accepted. Use booking_id instead.
The previous spelling of booking_id: The PNR, the supplier order id or the FX-Port booking UUID.
orderIdstringdeprecatedLegacy name, still accepted. Use booking_id instead.
The previous spelling of booking_id: The PNR, the supplier order id or the FX-Port booking UUID.
includeApiResponsebooleandeprecatedLegacy name, still accepted. Use include_api_response instead.
The previous spelling of include_api_response: get_booking only: true adds booking.apiResponse.
agencyIdstringdeprecatedLegacy name, still accepted. Use agency_id instead.
The previous spelling of agency_id: Not needed: the agency of a call is always the one of your API key.
Response
200The booking.
environmentstringThe environment of the key that made the call: sandbox for fxp_test_ keys, live for fxp_live_ keys. Present in every JSON body.
One of sandbox, live.
request_idstringThe id of the request, also in the X-Request-Id header.
warningsarray of objectPresent only when the request used a previous spelling of a field or something the endpoint ignored.
ShowHide 5 attributes
codestringWhat the warning is about.
One of deprecated_field, ignored_field, coerced_value, deprecated_value, deprecated_endpoint.
fieldstringThe request field the warning is about.
replacementstringThe name to use instead, for deprecated_* warnings.
messagestringA sentence that says what happened and what to do.
documentation_urlstringWhere the naming rules are explained.
successbooleantrue when the booking was found.
requestIdstringdeprecatedLegacy name, still accepted. Use request_id instead.
The id of this request, 8 characters, for support.
processingTimenumberdeprecatedLegacy name, still accepted. Use processing_time instead.
Seconds spent.
processing_timenumberSeconds spent. The snake_case twin of processingTime, with the same value: use this name.
bookingFlightBookingA flight booking of your agency, as FX-Port stores it. The booking is a database row: more keys than the ones listed here exist (the void history, the details of a changed schedule ...); they are internal and not part of the contract. Where the ACD passports sit in FX-Port's storage is never returned: only their public links.
Errors
| Status | Code | Example message |
|---|---|---|
| 400 | bad_request | booking_id is required |
| 400 | invalid_booking_id | `booking_id` is not a valid identifier (letters, digits and - _ . : = ~ only, up to 128 characters). |
| 404 | booking_not_found | No booking found for 'ZZZZZZ' |
The shape of the error body depends on the endpoint. See Errors for every shape and code.