FX-Port API
FlightsFlight Search

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

FieldTypeRequiredDescription
originstringYes¹Departure IATA code (ALG, CAI, LHR)
destinationstringYes¹Arrival IATA code
departure_datestringYes¹YYYY-MM-DD
return_datestringNoAdd for a round trip
segmentsarrayNo²Exactly two open-jaw legs: { origin, destination, date }
¹ Simple one-way/round-trip only. ² Use exactly two segments for open-jaw.

Passengers and cabin

FieldTypeRequiredDescription
passengersobjectYesCounts and age arrays; see Flight passengers & ages
cabin_classstringNoeconomy (default), premium_economy, business, first, any

Filters

FieldTypeDescription
directbooleantrue → non-stop offers only (alias: nonstop)
refundablebooleantrue → prefer refundable offers; not enforced by every supplier, always confirm on the offer
checked_bagsbooleantrue → offers that include checked baggage
max_pricenumberMaximum total price in the agency currency; not enforced by every supplier yet — see Filter examples
included_airlinesstring[]Restrict results to these IATA carrier codes
excluded_airlinesstring[]Remove these IATA carrier codes from the results
preferred_airlinesstring[]Alias of included_airlines — currently the same strict allow-list behavior, not a soft ranking
flexiblebooleanRequest flexible dates from capable suppliers; regular offers still return

See Filter examples for the full behavior, caveats, and example responses for each filter.

Supplier selection

FieldTypeBehaviour
(omit selectors)—Recommended. FX-Port selects compatible enabled suppliers automatically.
supplier_idstringAdvanced: restrict the search to one exact supplier ID.
supplier_idsstring[]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

Minimal request

curl --request POST \
  --url https://api.fx-port.com/api/v1/get_flights \
  --header 'Authorization: Bearer fxp_test_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

The example below is a trimmed real sandbox response for the request above (fields present on every offer are kept; repeated/optional fields are trimmed for length — see the field reference tables underneath for everything not shown).

{
  "success": true,
  "requestId": "255cfb4d",
  "searchType": "ONE_WAY",
  "flexible": false,
  "processingTime": 4.282,
  "suppliers": [
    {
      "success": true,
      "searchId": "fs_dfx_4a861fcd-c5d6-4a1e-a471-97db7a9f9982",
      "supportHold": false,
      "supportVoid": false,
      "voidDeadline": null,
      "meta": {
        "supplierId": "duffel_1",
        "technologyType": "duffel",
        "supplierName": "Duffel",
        "processingTime": 1.792,
        "supplierCurrency": "USD",
        "agencyCurrency": "DZD"
      },
      "results": {
        "totalOffers": 115,
        "supplierCurrency": "USD",
        "agencyCurrency": "DZD",
        "offers": [
          {
            "id": "fx_offer_860f61e3",
            "type": "flight_offer",
            "supplier": { "id": "duffel_1", "name": "Duffel", "originalId": "off_0000B9nxOvvmY4qNUnYSFL" },
            "bookableSeats": null,
            "supportHold": false,
            "supportVoid": false,
            "instantTicketingRequired": false,
            "lastTicketingDate": "2026-08-27",
            "lastTicketingDateTime": "2026-08-27T17:58:25.166703Z",
            "pricing": {
              "supplierCurrency": "USD",
              "agencyCurrency": "DZD",
              "basePrice": 16270.0,
              "taxesAndFees": 5198.2,
              "agencyCommission": 21.47,
              "finalPrice": 21489.67,
              "b2bPrice": 21468.2,
              "additionalServices": []
            },
            "itinerary": [
              {
                "direction": "outbound",
                "duration": "PT2H24M",
                "stops": 0,
                "segments": [
                  {
                    "id": "seg_0000B9nxOvvmY4qNUnYSFA",
                    "departure": {
                      "airportCode": "ALG",
                      "airportName": "Houari Boumediene Airport",
                      "cityName": "Algiers",
                      "countryCode": "DZ",
                      "terminal": "2",
                      "datetime": "2026-09-15T10:50:00",
                      "timeZone": "Africa/Algiers"
                    },
                    "arrival": {
                      "airportCode": "CDG",
                      "airportName": "Paris Charles de Gaulle Airport",
                      "cityName": "Paris",
                      "countryCode": "FR",
                      "terminal": "1",
                      "datetime": "2026-09-15T14:14:00",
                      "timeZone": "Europe/Paris"
                    },
                    "flight": {
                      "carrierCode": "IB",
                      "carrierName": "Iberia",
                      "flightNumber": "3177",
                      "operatingCarrier": "IB",
                      "operatingCarrierName": "Iberia"
                    },
                    "duration": "PT2H24M",
                    "cabin": "ECONOMY",
                    "fareBasis": "Y20LGTN2",
                    "brandedFare": "BASIC",
                    "brandedFareLabel": "Basic"
                  }
                ],
                "conditions": {
                  "changeBeforeDeparture": { "allowed": true },
                  "refundBeforeDeparture": { "allowed": false }
                }
              }
            ],
            "travelerPricing": [
              {
                "travelerId": "pas_0000B9nxOvjNICv2sJkXtl",
                "travelerType": "ADULT",
                "fareOption": "STANDARD",
                "price": {
                  "supplierCurrency": "USD",
                  "agencyCurrency": "DZD",
                  "base": 16270.0,
                  "total": 21489.67,
                  "b2bPrice": 21468.2
                },
                "fareDetailsBySegment": [
                  {
                    "segmentId": "seg_0000B9nxOvvmY4qNUnYSFA",
                    "cabin": "ECONOMY",
                    "fareBasis": "Y20LGTN2",
                    "brandedFare": "BASIC",
                    "brandedFareLabel": "Basic",
                    "includedCheckedBags": { "quantity": 1 },
                    "includedCabinBags": { "quantity": 1 },
                    "amenities": [
                      { "description": "WIFI", "isChargeable": true, "amenityType": "WIFI" }
                    ]
                  }
                ]
              }
            ],
            "conditions": {
              "refundBeforeDeparture": { "allowed": false },
              "changeBeforeDeparture": { "allowed": true }
            },
            "fareRules": {
              "exchange": { "allowed": true },
              "refund": { "allowed": false },
              "revalidation": { "allowed": false }
            },
            "validatingAirline": [{ "code": "IB", "name": "Iberia" }]
          }
        ]
      }
    }
  ]
}

Top-level response fields

FieldTypeMeaning
successbooleantrue if the search executed (individual suppliers can still fail independently — see suppliers[n].success)
requestIdstringFX-Port's internal ID for this search call — include it when contacting support
searchTypestringONE_WAY, ROUND_TRIP, or OPEN_JAW (two non-reversed segments), derived from your request. Multi-city (3+ segments) is not supported — do not send more than two segments
flexiblebooleanWhether this search requested the flexible-date matrix (flexible: true in the request)
processingTimenumberTotal time in seconds FX-Port spent calling all suppliers for this request
suppliersarrayOne entry per supplier that was called — see below

suppliers[n] fields

FieldTypeMeaning
successbooleanWhether this specific supplier returned usable results
searchIdstringSave this. Required as search_id on price_flight and, indirectly, on booking
supportHoldbooleanWhether this supplier can create a hold (pay-later) reservation for these offers
supportVoidbooleanWhether this supplier supports same-day void of an issued ticket
voidDeadlinestring | nullNext void cutoff (UTC), if supportVoid is true
meta.supplierIdstringSupplier identifier, e.g. duffel_1 — matches suppliers
meta.technologyTypestringUnderlying integration technology (duffel, amadeus_aqc, ndc, …)
meta.supplierNamestringHuman-readable supplier name
meta.processingTimenumberTime in seconds this individual supplier took to respond
meta.supplierCurrency / meta.agencyCurrencystringCurrencies used for conversion — see Flight pricing
results.totalOffersnumberTotal offers this supplier returned (may exceed what's shown if paginated internally)
results.offersarrayThe offers themselves — see below

offers[n] fields

FieldTypeMeaning
idstringSave this. Required as offer_id on price_flight
typestringAlways flight_offer
supplier.id / supplier.namestringWhich supplier this specific offer came from
supplier.originalIdstringThe supplier's own internal offer ID (opaque, for support/debugging only)
bookableSeatsnumber | nullRemaining bookable seats at this fare, when the supplier reports it
supportHold / supportVoid / voidDeadline—Same meaning as at the supplier level, but specific to this offer
instantTicketingRequiredbooleantrue means this fare cannot be held — must book with booking_type: "issue"
lastTicketingDate / lastTicketingDateTimestringDeadline to issue a ticket for this specific offer
pricingobjectSee Flight pricing for every field's meaning
itineraryarrayOne entry per direction (outbound, and return for round trips) — see below
travelerPricingarrayPer-traveler price breakdown — one entry per passenger, see below
conditionsobjectOffer-level refund/change eligibility (allowed: true/false); indicative, not a guarantee
fareRulesobjectSame refund/exchange eligibility, plus revalidation
validatingAirlinearrayThe airline whose fare rules and ticket stock govern this booking

itinerary[n] and segments[n] fields

FieldTypeMeaning
directionstringoutbound or return
durationstringISO-8601 duration for this direction, e.g. PT2H24M = 2h24m
stopsnumberNumber of stops in this direction (0 = non-stop)
segments[n].departure / .arrivalobjectairportCode, airportName, cityName, countryCode, terminal, datetime (local), timeZone
segments[n].flight.carrierCode / .carrierNamestringMarketing carrier
segments[n].flight.operatingCarrier / .operatingCarrierNamestringOperating carrier — differs from marketing carrier on codeshares
segments[n].flight.flightNumberstringFlight number as filed by the carrier
segments[n].cabinstringCabin for this specific segment (can differ from the requested cabin_class on mixed-cabin itineraries)
segments[n].fareBasisstringFare basis code — supplier/GDS-specific
segments[n].brandedFare / .brandedFareLabelstringFare family code and its display label, when the supplier exposes branded fares
conditions.changeBeforeDeparture.allowedbooleanWhether a change is generally permitted before departure for this direction
conditions.refundBeforeDeparture.allowedbooleanWhether a refund is generally permitted before departure for this direction

travelerPricing[n] fields

FieldTypeMeaning
travelerIdstringIdentifies which passenger (by search order) this price applies to
travelerTypestringADULT, SENIOR, YOUNG_ADULT, CHILD, INFANT, or SEATED_INFANT
fareOptionstringFare option selected for this traveler, e.g. STANDARD
priceobjectThis traveler's own share of base/total/b2bPrice — see Flight pricing
fareDetailsBySegment[n].includedCheckedBags.quantitynumberChecked bags included for this traveler on this segment
fareDetailsBySegment[n].includedCabinBags.quantitynumberCabin bags included for this traveler on this segment
fareDetailsBySegment[n].amenitiesarrayOptional amenity list (Wi-Fi, seat pitch, entertainment, …); isChargeable marks paid extras

Save these values

ValueLocationUsed by
searchIdsuppliers[n].searchIdRequired price_flight.search_id, then booking
offer idsuppliers[n].results.offers[m].idRequired price_flight.offer_id, then booking
supportHoldSupplier and priced offerUse hold only when still true after pricing

On this page