Flights API overview
Search, price, book, hold, pay and manage flight orders across every enabled GDS, airline and NDC supplier.
Search, price, book and manage flight orders across every enabled supplier through one API. A search fans out to the suppliers that can serve the route and returns the fares of each, with prices in your agency's currency.
For a summary of what the API covers, who it is for and how to get access, see the flight booking API for travel agencies.
Flight concepts
Read these before you integrate: they apply to every flight endpoint.
b2bPrice formula.Post-booking operationsCancel, refund, void and exchange: what is self-serve and what is manual.Streaming search resultsThe first offers in about two seconds, supplier by supplier.Endpoints
| Method | Path | Permission | Description |
|---|---|---|---|
POST | / | Read | Search for flights. Add ?stream=true for server-sent events |
POST | / | Read | The ±3-day price matrix |
POST | / | Read | Price an offer: required before booking |
POST | / | Read+Write | Create a booking, instant issue or hold |
POST | / | Read | The current price and state of a held order |
POST | / | Read+Write | Pay a held order and issue the tickets |
POST | / | Read+Write | Cancel a held (unpaid) reservation |
POST | / | Read | Ask what cancelling an issued Duffel order would refund |
POST | / | Read+Write | Confirm that cancellation: irreversible |
POST | / | Read | The booking, with the PDF links |
POST | / | Read | The ticket PDF links |
POST | / | Read | The e-ticket number |
POST | / | Read | The passport documents of an ACD booking: ACD passport uploads |
POST | / | Read+Write | Add or replace those passports (multipart) |
GET | / | Public | Airport autocomplete |
GET | / | Public | The most searched airports |
Every endpoint is described in the API reference.
What every flight endpoint has in common
- Auth.
Authorization: Bearer fxp_test_...(sandbox) orfxp_live_...(live). A read key is enough for the Read endpoints; the Read+Write endpoints answer403 read_write_permission_requiredto a read key. See Authentication. - Sandbox suppliers.
amadeus_aqc_dz_1(Amadeus Algeria: only routes that touch Algeria; supports hold and void) andduffel_1(Duffel: worldwide; instant ticketing only). See Sandbox. - Names. Requests use
snake_case; older spellings still work and are answered with awarningsarray. Responses keep their keys and add snake_case twins. See Conventions and naming. - Your agency. It is always the one of your API key. Every flights endpoint accepts an
agency_id(older spellingagencyId) so that older clients keep working, and ignores it: do not send it. - Identifiers. A booking is found by its PNR, its supplier order id or its FX-Port id (a UUID), depending on the endpoint: each page says which.
- Rate limits. Search and general endpoints 6,000 requests per minute per key; booking endpoints (
book_flight,pay_order,cancel_order,get_order_quote,get_booking) 1,200. See Rate limits. - Size. A search response is 0.7 to 14 MB: send
Accept-Encoding: gzip.
Important notes
Error responses
Every error carries a stable code: branch on errors[0].code, not on the text. The error body is described in Errors.
| Status | Typical codes | Cause |
|---|---|---|
400 | invalid_airport_code, invalid_date, invalid_cabin_class, missing_field, hold_not_supported, invalid_booking_type | The request is wrong; read errors[0].field |
401 | authentication_required, invalid_api_key | Missing, malformed or revoked key |
402 | insufficient_balance | Live only: the balance cannot pay the booking |
403 | read_write_permission_required, agency_not_active | A read key on a write endpoint, or an agency that is not approved. A booking of another agency is never a 403: it is a 404, like an unknown id |
404 | search_not_found, offer_not_found, offer_not_priced, booking_not_found | The id is unknown for your agency and environment |
409 | duplicate_booking, booking_in_progress, invalid_booking_status | The request is valid but not possible in the current state |
410 | offer_expired | The supplier withdrew the offer: search again |
413 | request_too_large | The body is too large |
422 | supplier validation codes | The supplier rejected a passenger detail (a booking only) |
429 | rate_limit_exceeded, concurrency_limit_exceeded | Too many requests, or too many streams open at the same time: wait for Retry-After |
503 | all_suppliers_failed, supplier_busy, service_overloaded, supplier_temporarily_unavailable, balance_lock_timeout | No supplier answered, a supplier lane is full, FX-Port is too busy to prepare a large answer, or another operation holds your balance for a moment: retry with backoff (Retry-After says how long when it is sent) |
The codes of each endpoint are in its page.
Questions?
Write to the FX-Port developer team at [email protected] for integration help, feature requests or to report an API error. For a void, an exchange, a re-issue or a refund of an issued Amadeus ticket, use Request support on the booking page in the FX-Port dashboard or write to the same address.