Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Overview
  • Error object

API reference

API reference

Every endpoint of the FX-Port API: parameters, request and response objects, examples in nine languages and the errors each can return.

The FX-Port API is a REST API with predictable URLs, JSON request and response bodies, and standard HTTP status codes. Use it from your server to search, price and book flights and hotels, sell eSIMs, and read your balances and bookings. This reference is generated from the OpenAPI document, so it always matches what the API accepts and returns. New here? Start with the Quickstart.

Base URL

https://api.fx-port.com/api/v1

Live and sandbox share the base URL: the key you send decides which environment a request belongs to. Keys start with fxp_test_ for the sandbox and fxp_live_ for live. Every path in this reference is relative to the base URL.

Authentication

Send your key as a bearer token:

Authorization: Bearer fxp_test_YOUR_KEY

Create keys in the dashboard. A Read key can search, price and read; a Read+Write key can also book, pay and cancel. Each endpoint page says which one it needs. See Authentication and Security.

Requests and responses

  • Bodies are JSON (Content-Type: application/json), except the ACD passport upload, which is multipart/form-data.
  • Request fields use snake_case. Older endpoints also accept their legacy camelCase spellings, and the reference marks them as deprecated and names the spelling to use: see Conventions and naming and the list of legacy names. Responses keep their older keys and add snake_case twins; ?naming=snake returns snake_case only.
  • Every JSON response starts with an environment field (sandbox or live), also sent in the X-Environment header, and carries a request_id (also the X-Request-Id header) to quote to support.
  • Prices come back in the currency of the agency that owns the key. You never send a currency.
  • The travel dates in the examples are fixed dates: send a date 30 to 60 days ahead, because a date in the past is refused with date_in_past.
  • A failed call returns the same error body everywhere (errors[].code, errors[].type, errors[].message): see Errors.
  • Keys are limited per minute: see Rate limits. Flight searches can be streamed: see Streaming.

Endpoints

MethodPathPermissionDescription
GET/api/v1/flights/airportsNoneSearch airports
GET/api/v1/flights/top-airportsNoneGet the most searched airports
POST/api/v1/get_flightsReadSearch flights
POST/api/v1/flights/flexible_searchReadSearch flexible dates
POST/api/v1/flights/price_flightReadPrice a flight offer
POST/api/v1/flights/book_flightRead+WriteBook a flight offer
POST/api/v1/flights/get_bookingReadGet a flight booking
POST/api/v1/flights/get_ticketReadGet the ticket PDF of a booking
POST/api/v1/flights/get_ticket_numberReadGet the e-ticket number of a booking
POST/api/v1/flights/get_order_quoteReadGet the current quote of an order
POST/api/v1/flights/pay_orderRead+WritePay a held order and issue the tickets
POST/api/v1/flights/cancel_orderRead+WriteCancel a held reservation
POST/api/v1/flights/cancel_quoteReadQuote the refund of an issued order
POST/api/v1/flights/confirm_cancelRead+WriteConfirm the cancellation of an order
POST/api/v1/flights/get_acd_documentsReadGet the ACD document state of a booking
POST/api/v1/flights/upload_acd_documentsRead+WriteUpload ACD passport documents
GET/api/v1/hotels/locations/searchReadSearch destinations and get coordinates
GET/api/v1/hotels/name-searchReadFind a hotel by name
POST/api/v1/hotels/search-by-nameReadFind a hotel by name (JSON body)
POST/api/v1/hotels/search_advancedReadGeo search: hotels around a point
POST/api/v1/hotels/searchReadRead the content of many hotels by id
POST/api/v1/hotels/detailsReadRead the raw hotel documents by id
POST/api/v1/hotels/get_hotel_infoReadRead one hotel for the hotel page
POST/api/v1/hotels/get_ratesReadGet the rooms and rates of one hotel
POST/api/v1/hotels/pre_bookRead+WriteLock a rate before booking
POST/api/v1/hotels/book_hotelRead+WriteBook a locked rate
POST/api/v1/hotels/cancel_hotelRead+WriteCancel a confirmed hotel booking
GET/api/v1/hotels/get_voucherReadGet the voucher PDF links of a booking
GET/api/v1/esims/packagesReadList eSIM packages
GET/api/v1/esims/compatible-devicesReadList eSIM compatible devices
POST/api/v1/esims/ordersRead+WriteCreate an eSIM order
GET/api/v1/esims/topup-packages/{iccid}ReadList topup packages of an eSIM
POST/api/v1/esims/topupsRead+WriteTop up an eSIM
GET/api/v1/esims/usage/{iccid}ReadGet the usage of an eSIM
GET/api/v1/esims/usage/bulkReadGet the usage of several eSIMs
GET/api/v1/esims/bookingsReadList eSIM bookings
GET/api/v1/esims/bookings/{iccid}/topup-historyReadList the topups of an eSIM
GET/api/v1/esims/bookings/{booking_id}/verifyReadCheck that an eSIM booking is yours
GET/api/v1/esims/bookings/{booking_id}/setup-instructionsReadGet the setup data of a booking
GET/api/v1/esims/instructions/{iccid}ReadGet eSIM installation instructions
GET/api/v1/balancesReadList balances
GET/api/v1/balances/{balance_id}/historyReadGet the history of a balance
GET/api/v1/historyReadList booking history
GET/api/v1/bookings/{booking_id}ReadGet a booking
GET/api/v1/suppliersReadList suppliers

For tools and AI

The whole reference is one file: /openapi.json (OpenAPI 3.1, with an operationId, examples and error codes for every endpoint). Every page of this site is also available as Markdown by adding .md to its address, and /llms.txt indexes them. See Use these docs with AI.

On this page

  • Base URL
  • Authentication
  • Requests and responses
  • Endpoints
  • For tools and AI

© 2026 FX-Port

TermsPrivacy[email protected]