Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Overview
  • Error object

Search and price

  • Search flightsPOST
  • Flexible datesPOST
  • Price an offerPOST
  • Airport autocompleteGET
  • Most searched airportsGET

Book, pay and cancel

  • Book an offerPOST
  • Quote a held orderPOST
  • Pay a held orderPOST
  • Cancel a held orderPOST

After booking

  • Get a bookingPOST
  • Ticket PDFPOST
  • Ticket numberPOST
  • Quote a refundPOST
  • Confirm a cancellationPOST

ACD documents

  • Get the document statePOST
  • Upload passportsPOST

Objects

  • Flight offer
  • Flight booking

Flights · After booking

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.

POST/api/v1/flights/get_booking

Requires an API key with Read permission; a Read+Write key works too.

booking_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"
}'
Response200
{
  "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
  }
}
Response200
{
  "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_idstring

The PNR, the supplier order id or the FX-Port booking UUID. Prefer the UUID or the order id: PNRs are not unique.

order_idstring

Another name of booking_id.

pnrstring

Another name of booking_id.

include_api_responseboolean

get_booking only: true adds booking.apiResponse. Default false.

agency_idstring

Not 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.

bookingIdstringdeprecated

Legacy 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.

orderIdstringdeprecated

Legacy 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.

includeApiResponsebooleandeprecated

Legacy name, still accepted. Use include_api_response instead.

The previous spelling of include_api_response: get_booking only: true adds booking.apiResponse.

agencyIdstringdeprecated

Legacy 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.

environmentstring

The 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_idstring

The id of the request, also in the X-Request-Id header.

warningsarray of object

Present only when the request used a previous spelling of a field or something the endpoint ignored.

ShowHide 5 attributes
codestring

What the warning is about.

One of deprecated_field, ignored_field, coerced_value, deprecated_value, deprecated_endpoint.

fieldstring

The request field the warning is about.

replacementstring

The name to use instead, for deprecated_* warnings.

messagestring

A sentence that says what happened and what to do.

documentation_urlstring

Where the naming rules are explained.

successboolean

true when the booking was found.

requestIdstringdeprecated

Legacy name, still accepted. Use request_id instead.

The id of this request, 8 characters, for support.

processingTimenumberdeprecated

Legacy name, still accepted. Use processing_time instead.

Seconds spent.

processing_timenumber

Seconds spent. The snake_case twin of processingTime, with the same value: use this name.

bookingFlightBooking

A 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.

See the Flight booking object

Errors

StatusCodeExample message
400bad_requestbooking_id is required
400invalid_booking_id`booking_id` is not a valid identifier (letters, digits and - _ . : = ~ only, up to 128 characters).
404booking_not_foundNo booking found for 'ZZZZZZ'

The shape of the error body depends on the endpoint. See Errors for every shape and code.

Related guides

  • Get a booking
  • Post-booking operations
PreviousCancel a held reservationNext Get the ticket PDF of a booking

© 2026 FX-Port

TermsPrivacy[email protected]