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 the ticket PDF of a booking

Get the download links of the ticket PDF of a booking (the hold voucher for a hold).

POST/api/v1/flights/get_ticket

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

The PDF is generated after the booking: call again until ticket_ready is true.

ticket_ready is true as soon as the booking has a PDF link, whatever its status: it does not mean that an e-ticket exists, ask get_ticket_number for that. get_booking returns the same links as booking.pdf_url and booking.pdf_url_no_price together with the rest of the booking.

The links are public. Anybody who has a pdf_url can open the PDF with no key and no login; it holds the traveler's name, the itinerary and the fare. Do not log them, do not send them to third parties, and prefer to download the PDF on your server and serve it yourself.

curl https://api.fx-port.com/api/v1/flights/get_ticket \
  -H "Authorization: Bearer fxp_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "booking_id": "Y7PAEU"
}'
Response200
{
  "environment": "sandbox",
  "success": true,
  "requestId": "71fdaeb7",
  "ticket_ready": true,
  "booking_id": "Y7PAEU",
  "download_url": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH.pdf",
  "download_url_with_price": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH.pdf",
  "download_url_no_price": "https://s3.example.com/flight-bookings/Y7PAEU-JAMES-SMITH-no-price.pdf"
}
Response200
{
  "environment": "sandbox",
  "success": true,
  "requestId": "76be69dc",
  "ticket_ready": false,
  "booking_id": "Y7PAEU",
  "message": "Ticket is not ready yet. Please retry in a moment."
}

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 links, or ticket_ready: false with a message while the PDF is being generated.

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.

ticket_readyboolean

true as soon as the booking has a PDF link, whatever its status. It does not mean that an e-ticket exists: ask get_ticket_number.

booking_idstring

Echoes the value you sent: the PNR, the order id or the UUID.

messagestring

Only when ticket_ready is false.

download_urlstringdeprecated

Legacy name, still accepted. Use pdf_url instead.

The PDF with the fare receipt. A public link.

pdf_urlstring

The PDF with the fare receipt. A public link. The snake_case twin of download_url, with the same value: use this name.

download_url_with_pricestring

The same address as download_url.

download_url_no_pricestringnullabledeprecated

Legacy name, still accepted. Use pdf_url_no_price instead.

A second PDF of the same ticket without prices. A public link.

pdf_url_no_pricestringnullable

A second PDF of the same ticket without prices. A public link. The snake_case twin of download_url_no_price, with the same value: use this name.

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 the ticket PDF
  • Get a booking
PreviousGet a flight bookingNext Get the e-ticket number of a booking

© 2026 FX-Port

TermsPrivacy[email protected]