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 PDF

Returns the ticket PDF download URL. Poll until ticket_ready is true.

POST/api/v1/flights/get_ticket

Returns the download links of the ticket PDF of a booking. The PDF is generated after the booking: call again until ticket_ready is true.

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

A simpler way: get_booking returns the same links as booking.bucket_link and booking.bucket_link_no_price, together with the rest of the booking. Use get_ticket when you only need the links and a ready flag.

The links are public. Anybody who has a download_url can open the PDF, with no key and no login, and the address of a voucher can be guessed from the PNR and the name. The PDF holds the traveler's name, the itinerary and the fare. Treat the links as sensitive: do not log them, do not put them in e-mails to third parties, and prefer to download the PDF on your server and serve it to your customer yourself. See Security.

Request body

FieldTypeRequiredDescription
booking_idstringYesThe PNR, the supplier order id or the FX-Port UUID of the booking. 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. A booking of another agency, or of the other environment, is answered 404 booking_not_found.

Request example

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"
}'

Response: not ready

Real response of 2026-11-01, a second after a hold was created:

{
  "environment": "sandbox",
  "success": true,
  "requestId": "76be69dc",
  "ticket_ready": false,
  "booking_id": "Y7PAEU",
  "message": "Ticket is not ready yet. Please retry in a moment."
}

Response: ready

{
  "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"
}
FieldMeaning
ticket_readytrue when a link exists. It does not mean that an e-ticket exists (see below).
booking_idEchoes the value you sent (the PNR if you sent the PNR, the order id if you sent the order id). It is not normalised.
download_url, download_url_with_priceThe same address: the PDF with the fare receipt (twin: pdf_url).
download_url_no_priceA second PDF of the same ticket without prices (twin: pdf_url_no_price). Can be null.
messageOnly when ticket_ready is false.

What ticket_ready means

ticket_ready is true as soon as the booking has a PDF link, whatever the status of the booking:

  • a held booking has a hold voucher, and the flag can be true before the payment;
  • a cancelled hold keeps its voucher link and stays true;
  • an instant ACD booking can be true before the airline has returned an e-ticket number: use get_ticket_number to know whether tickets were issued;
  • a booking with the status failed stays false for ever.

Polling

  1. Book, then keep the order id (or the PNR).
  2. Wait about 10 seconds and call get_ticket.
  3. While ticket_ready is false, call again every 10 seconds, for about two minutes. Stop then: a failed booking never gets a PDF. Check the status with get_booking.
  4. When it is true, download the PDF from download_url.

Errors

StatusCodeWhenWhat to do
400bad_requestNo booking_id (booking_id is required).Send it.
400invalid_booking_idbooking_id is not a valid token.Send the id as you received it.
400invalid_json, invalid_bodyThe body is not valid JSON, or not a JSON object.Send a JSON object.
404booking_not_foundNo such booking in your agency and environment.Check the id and the key.

Related

  • Get a flight booking and Get the ticket number.
  • Security: links to tickets, vouchers and documents.
PreviousGet a flight bookingNext Get the ticket number

On this page

  • Request body
  • Request example
  • Response: not ready
  • Response: ready
  • What ticket_ready means
  • Polling
  • Errors
  • Related

© 2026 FX-Port

TermsPrivacy[email protected]