POST /api/v1/get_flights
Search for flights across one, several, or every enabled supplier. Start here, then expand the examples by route, passenger, filter, supplier, or itinerary type.
Search available flight offers across one, several, or every enabled supplier. Results are grouped
under suppliers[]; each supplier has its own searchId and offer list.
Permission: Read
Save the supplier-level searchId. Pass suppliers[n].searchId to price_flight and
book_flight — never the top-level requestId.
Request fields
Route
| Field | Type | Required | Description |
|---|---|---|---|
origin | string | Yes¹ | Departure IATA code (ALG, CAI, LHR) |
destination | string | Yes¹ | Arrival IATA code |
departure_date | string | Yes¹ | YYYY-MM-DD |
return_date | string | No | Add for a round trip |
segments | array | No² | Exactly two open-jaw legs: { origin, destination, date } |
segments for open-jaw.
Passengers and cabin
| Field | Type | Required | Description |
|---|---|---|---|
passengers | object | Yes | Counts and age arrays; see Flight passengers & ages |
cabin_class | string | No | economy (default), premium_economy, business, first, any |
Filters
| Field | Type | Description |
|---|---|---|
direct | boolean | true → non-stop offers only (alias: nonstop) |
refundable | boolean | true → refundable offers only when supported |
checked_bags | boolean | true → offers that include checked baggage |
max_price | number | Maximum total price in the agency currency |
included_airlines | string[] | Strict airline allow-list |
excluded_airlines | string[] | Strict airline block-list |
preferred_airlines | string[] | Prioritise these carriers without a strict allow-list |
from_cc | string | Origin market, ISO 3166-1 alpha-2 |
to_cc | string | Destination market, ISO 3166-1 alpha-2 |
flexible | boolean | Request flexible dates from capable suppliers; regular offers still return |
Supplier selection
| Field | Type | Behaviour |
|---|---|---|
| (omit selectors) | — | Recommended. FX-Port selects compatible enabled suppliers automatically. |
supplier_id | string | Advanced: restrict the search to one exact supplier ID. |
supplier_ids | string[] | Advanced: restrict the search to an exact supplier set. |
Usually, omit all supplier fields and let FX-Port manage selection. For the special case “use
exactly 2 of our 5 suppliers”, send supplier_ids: ["supplier_a", "supplier_b"].
The backend calls enabled suppliers in parallel. Unknown, disabled, or flexible-incompatible
strict selections return HTTP 400. Traveler-incompatible suppliers are skipped silently; HTTP 400
is returned only when no selected supplier remains compatible.
Examples by category
Basic routes
One-way, round-trip, direct-only, and all suppliers.
Passengers & cabins
Family mix, lap/seated infants, senior/young adult, business, premium economy, all cabins.
Filters
Refundable, checked bags, price cap, market hints, include/exclude/preferred airlines, flexible dates.
Supplier selection
Automatic selection (recommended) or exact supplier IDs for special cases.
Open-jaw
Search two non-reversed flight segments.
Minimal request
curl --request POST \
--url https://api.fx-port.com/api/v1/get_flights \
--header 'Authorization: Bearer fxp_live_YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '{
"origin": "ALG",
"destination": "CDG",
"departure_date": "2026-09-15",
"cabin_class": "economy",
"passengers": { "adults": 1 }
}'Response essentials
{
"success": true,
"suppliers": [
{
"success": true,
"searchId": "fs_9fa52bad-a7be-42aa-9ad6-d3f9fa642dc3",
"supportHold": true,
"results": {
"totalOffers": 12,
"offers": [
{
"id": "fx_offer_a1b2c3d4",
"pricing": {
"supplierCurrency": "DZD",
"agencyCurrency": "DZD",
"basePrice": 18800.0,
"taxesAndFees": 9726.17,
"agencyCommission": 0.0,
"finalPrice": 28526.17,
"b2bPrice": 28526.17
}
}
]
},
"meta": {
"supplierId": "amadeus_aqc_dz_1",
"supplierName": "Amadeus Algeria",
"processingTime": 1.32
}
}
]
}Save these values
| Value | Location | Used by |
|---|---|---|
searchId | suppliers[n].searchId | Required price_flight.search_id, then booking |
offer id | suppliers[n].results.offers[m].id | Required price_flight.offer_id, then booking |
supportHold | Supplier and priced offer | Use hold only when still true after pricing |