Get the e-ticket number of a booking
Get the e-ticket number of a booking, asking the airline for it when it is not stored yet.
/api/v1/flights/get_ticket_numberUse it after an instant booking whose number has not arrived, or to find out whether the tickets of a booking were issued.
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 number on the booking and can send the confirmation e-mail that was held back until the ticket exists. Calling it twice is harmless. Wait 5 to 10 seconds between calls instead of looping. ticket_available: false with a message means the airline has not returned a number yet. A hold has no ticket number until it is paid.
booking_response is the stored answer of the booking, without the supplier's costs and commissions. Only bookings of your agency in the environment of your key are answered.
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"
}'{
"environment": "sandbox",
"success": true,
"requestId": "a8e2164f",
"ticket_available": true,
"ticket_number": "124-2446977397",
"booking_id": "Y7PAEU",
"supplier_order_id": "eJzTd9ePNA9wdA0FAAs8AmE",
"booking_response": {
"booking": {
"pnr": "Y7PAEU",
"type": "instant",
"status": "confirmed",
"content": "managed",
"syncedAt": "2026-11-01T15:26:21.896668",
"createdAt": "2026-11-01T15:26:21.896668",
"reference": "eJzTd9ePNA9wdA0FAAs8AmE",
"cancelledAt": null,
"cancellation": null,
"voidableUntil": "2026-11-01T23:00:00Z",
"availableActions": []
},
"supplier": {
"id": "amadeus_aqc_dz_1",
"name": "Amadeus AQC",
"offerId": "1",
"technology": "amadeus_aqc"
},
"pricing": {
"b2bPrice": 4736,
"basePrice": 3160,
"finalPrice": 4930.37,
"taxesAndFees": 1770.37,
"agencyCurrency": "DZD",
"agencyCommission": 4.93,
"supplierCurrency": "DZD",
"additionalServices": []
},
"payment": {
"paidAt": "2026-11-01T15:26:21.896710",
"status": "paid",
"awaitingPayment": false,
"paymentRequiredBy": null,
"priceGuaranteeExpiresAt": null
},
"documents": [
{
"type": "electronic_ticket",
"status": "ISSUED",
"segmentIds": [
"1"
],
"documentType": "ETICKET",
"passengerIds": [
"1"
],
"uniqueIdentifier": "124-2446977397"
}
],
"bookingReferences": [
{
"pnr": "Y7PAEU",
"carrier": {
"name": "Air Algerie",
"logoUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/AH.svg",
"iataCode": "AH",
"logoLockupUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/AH.svg"
}
}
],
"passengers": [
{
"id": "1",
"type": "ADULT",
"email": "[email protected]",
"title": "mr",
"bornOn": "1988-06-15",
"gender": "male",
"givenName": "JAMES",
"familyName": "SMITH",
"phoneNumber": "15555550123",
"ticketNumber": "124-2446977397",
"infantPassengerId": null,
"loyaltyProgrammeAccounts": []
}
],
"owner": {
"id": null,
"name": "Air Algerie",
"logoUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/AH.svg",
"iataCode": "AH",
"logoLockupUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/AH.svg",
"conditionsOfCarriageUrl": null
}
}
}{
"environment": "sandbox",
"success": true,
"requestId": "921cee35",
"ticket_available": false,
"ticket_number": null,
"booking_id": "Y7PAEU",
"supplier_order_id": "eJzTd9ePNA9wdA0FAAs8AmE",
"booking_response": {
"booking": {
"pnr": "Y7PAEU",
"type": "hold",
"status": "pending",
"content": "managed",
"syncedAt": "2026-11-01T15:26:00.000",
"createdAt": "2026-11-01T15:26:00.000",
"reference": "eJzTd9ePNA9wdA0FAAs8AmE",
"cancelledAt": null,
"cancellation": null,
"voidableUntil": null,
"availableActions": [
"confirm",
"cancel"
]
},
"supplier": {
"id": "amadeus_aqc_dz_1",
"name": "Amadeus AQC",
"offerId": "3",
"technology": "amadeus_aqc"
},
"pricing": {
"acd": {
"applied": false
},
"b2bPrice": 4736,
"basePrice": 3160,
"finalPrice": 4930.37,
"taxesAndFees": 1770.37,
"agencyCurrency": "DZD",
"agencyCommission": 4.93,
"supplierCurrency": "DZD",
"additionalServices": []
},
"payment": {
"paidAt": null,
"status": "awaiting_payment",
"awaitingPayment": true,
"paymentRequiredBy": null,
"priceGuaranteeExpiresAt": null
},
"documents": [],
"bookingReferences": [
{
"pnr": "Y7PAEU",
"carrier": {
"name": "Air Algerie",
"logoUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/AH.svg",
"iataCode": "AH",
"logoLockupUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/AH.svg"
}
}
],
"passengers": [
{
"id": "1",
"type": "ADULT",
"email": "[email protected]",
"title": "mr",
"bornOn": "1988-06-15",
"gender": "male",
"givenName": "JAMES",
"familyName": "SMITH",
"phoneNumber": "15555550123",
"ticketNumber": null,
"infantPassengerId": null,
"loyaltyProgrammeAccounts": []
}
],
"owner": {
"id": null,
"name": "Air Algerie",
"logoUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/AH.svg",
"iataCode": "AH",
"logoLockupUrl": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/AH.svg",
"conditionsOfCarriageUrl": null
}
},
"message": "The airline has not returned a ticket number yet. Please retry shortly."
}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 ticket number, or ticket_available: false with a message.
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.
ticket_availablebooleantrue when the airline has returned a ticket number.
ticket_numberstringnullableThe e-ticket number, for example 124-2446977397 (Amadeus); in the Duffel sandbox the text 1. Several tickets are joined in one text. null until available.
booking_idstringdeprecatedLegacy name, still accepted. Use pnr instead.
The PNR.
pnrstringThe PNR. The snake_case twin of booking_id, with the same value: use this name.
supplier_order_idstringdeprecatedLegacy name, still accepted. Use order_id instead.
The supplier's order id.
order_idstringThe supplier's order id. The snake_case twin of supplier_order_id, with the same value: use this name.
messagestringOnly when ticket_available is false.
booking_responseobjectThe stored answer of the booking, in the shape of the book_flight response, without the supplier's costs and commissions.
Errors
| Status | Code | Example message |
|---|---|---|
| 400 | bad_request | booking_id is required |
| 400 | unsupported_supplier | Ticket-number retrieval is only supported for Amadeus, Travelport and Duffel bookings. |
| 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.