Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Introduction
  • Quickstart
  • Security
  • Authentication
  • Environments and Postman
  • Sandbox
  • Conventions and naming
  • Legacy names and twins
  • Errors
  • Rate limits and fair use
  • Streaming search results

Concepts

  • Overview
  • Booking flows
  • Passengers and ages
  • Pricing
  • Post-booking operations

Search and price

  • Airport autocomplete
  • Search flights
  • Basic routes
  • Passengers and cabins
  • Filters
  • Supplier selection
  • Open-jaw and multi-city
  • Flexible dates
  • Price an offer

Book, pay and cancel

  • Book
  • Quote a held booking
  • Pay a held booking
  • Cancel a held booking
  • Quote a cancellation
  • Confirm a cancellation

After booking

  • Get a booking
  • Get the ticket PDF
  • Get the ticket number
  • ACD passport uploads
  • Use these docs with AI

Flights · After booking

Get the ticket number

Ask for the e-ticket number of a booking: FX-Port asks the airline when the number is not stored yet.

POST/api/v1/flights/get_ticket_number

Returns the e-ticket number of a booking, asking the airline for it when it is not stored yet. Use it after an instant booking whose ticket number has not arrived, or to find out whether the tickets of a booking were issued.

Permission: Read. Rate group: default (6,000 requests per minute per key).

This is a Read endpoint that can do work: when the number is not stored, FX-Port asks the supplier (Amadeus, Travelport or Duffel) for the order, stores the ticket number on the booking and can send the confirmation e-mail that was held back until the ticket exists. Calling it twice is harmless. Do not call it in a tight loop: wait 5 to 10 seconds between calls.

Request body

FieldTypeRequiredDescription
booking_idstringYesThe PNR, the supplier order id or the FX-Port UUID. order_id and pnr are accepted as other names.

Legacy names: bookingId and orderId. If booking_id is sent together with order_id or pnr and the values differ, booking_id wins and an ignored_field warning names the dropped one. Only bookings of your agency in the environment of your key are answered (a sandbox key never reads a live booking); anything else, including the booking of another agency, is 404 booking_not_found.

Request example

curl https://api.fx-port.com/api/v1/flights/get_ticket_number \
  -H "Authorization: Bearer fxp_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "booking_id": "Y7PAEU"
}'

Response: not yet

A hold has no ticket; an instant booking can have none for a few seconds. Real response of 2026-11-01 for a hold:

{
  "environment": "sandbox",
  "success": true,
  "requestId": "921cee35",
  "ticket_available": false,
  "ticket_number": null,
  "booking_id": "Y7PAEU",
  "supplier_order_id": "eJzTd9ePNA9wdA0FAAs8AmE",
  "message": "The airline has not returned a ticket number yet. Please retry shortly.",
  "booking_response": { "...": "the stored booking, see below" }
}

Response: issued

The same booking after pay_order:

{
  "environment": "sandbox",
  "success": true,
  "requestId": "a8e2164f",
  "ticket_available": true,
  "ticket_number": "124-2446977397",
  "booking_id": "Y7PAEU",
  "supplier_order_id": "eJzTd9ePNA9wdA0FAAs8AmE",
  "booking_response": { "...": "the stored booking, see below" }
}
FieldMeaning
ticket_availabletrue when the airline has returned a ticket number.
ticket_numberThe e-ticket number, for example 124-2446977397 (Amadeus); in the Duffel sandbox the text 1. When there are several tickets they are joined in one text. null until available.
booking_idThe PNR (twin: pnr).
supplier_order_idThe supplier's order id (twin: order_id).
messageOnly when ticket_available is false.
booking_responseThe stored answer of the booking, in the shape of the book response (booking, supplier, pricing, passengers, itinerary, documents ...), without the supplier's costs and commissions. Use get_booking for a stable description of the booking.

Errors

StatusCodeWhenWhat to do
400bad_requestNo booking_id (booking_id is required).Send it.
400invalid_booking_id, invalid_json, invalid_bodyThe id is not a valid token, or the body is not a JSON object.Fix the request.
400unsupported_supplierThe booking is not an Amadeus, Travelport or Duffel booking.Use get_booking.
404booking_not_foundNo such booking for your agency.Check the id.

Related

  • Get a flight booking and Get the ticket PDF.
  • ACD passport uploads: the ticket_number of an ACD traveler is null until the airline returns it.
PreviousGet the ticket PDFNext ACD passport uploads

On this page

  • Request body
  • Request example
  • Response: not yet
  • Response: issued
  • Errors
  • Related

© 2026 FX-Port

TermsPrivacy[email protected]