Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Introduction
  • Quickstart
  • Security
  • Authentication
  • Environments and Postman
  • Sandbox
  • Conventions and naming
  • Legacy names and twins
  • Errors
  • Rate limits and fair use
  • Streaming search results

Concepts

  • Overview
  • Booking flows
  • Passengers and ages
  • Pricing
  • Post-booking operations

Search and price

  • Airport autocomplete
  • Search flights
  • Basic routes
  • Passengers and cabins
  • Filters
  • Supplier selection
  • Open-jaw and multi-city
  • Flexible dates
  • Price an offer

Book, pay and cancel

  • Book
  • Quote a held booking
  • Pay a held booking
  • Cancel a held booking
  • Quote a cancellation
  • Confirm a cancellation

After booking

  • Get a booking
  • Get the ticket PDF
  • Get the ticket number
  • ACD passport uploads
  • Use these docs with AI

Flights · Search and price

Open-jaw and multi-city searches

Search open-jaw trips and multi-city itineraries of three to six flights with the segments array.

Send segments instead of origin, destination, departure_date and return_date when the trip is not a plain one-way or return: an open-jaw (you fly back from another airport) or a multi-city trip (three or more flights). The search type comes from the segments you send.

SegmentsRulesearchType
1A single flightONE_WAY
2The second is the exact reverse of the firstROUND_TRIP
2The second is not the reverse of the firstOPEN_JAW
3 to 6Any sequence of flightsMULTI_CITY

Each segment needs:

FieldDescription
originDeparture IATA code (three letters)
destinationArrival IATA code; must differ from origin
departure_dateLocal departure date, YYYY-MM-DD. The dates must not go backwards: each is on or after the one before. Legacy names: date, departureDate, departure

The same limits as a plain search apply to each date (from yesterday up to 365 days ahead).

Multi-city is supported by Duffel only. Amadeus Algeria does not search three or more segments: it fails and appears in failures[] ("cause": "supplier_error"), while Duffel answers. Send "supplier_id": "duffel_1" to skip the failing call. Open-jaw and round-trip searches work on both suppliers.

Open-jaw

The outbound arrives at one airport; the return leaves from another.

curl https://api.fx-port.com/api/v1/get_flights \
  -H "Authorization: Bearer fxp_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "segments": [
    {
      "origin": "ALG",
      "destination": "CDG",
      "departure_date": "2026-12-15"
    },
    {
      "origin": "ORY",
      "destination": "ALG",
      "departure_date": "2026-12-22"
    }
  ],
  "cabin_class": "economy",
  "passengers": {
    "adults": 1
  }
}'

FX-Port recognises an open-jaw because the second segment is not the reverse of the first. Both sandbox suppliers answered (129 offers from Amadeus Algeria and 196 from Duffel in our test).

Response example

searchType is "OPEN_JAW" and each offer has one itinerary entry per direction. The second entry departs from ORY, not from CDG: that is the open-jaw. The example is the Duffel offer, trimmed to the airports:

{
  "success": true,
  "searchType": "OPEN_JAW",
  "suppliers": [
    {
      "success": true,
      "results": {
        "totalOffers": 196,
        "offers": [
          {
            "itinerary": [
              { "direction": "outbound", "segments": [{ "departure": { "airportCode": "ALG" }, "arrival": { "airportCode": "CDG" } }] },
              { "direction": "return", "segments": [{ "departure": { "airportCode": "ORY" }, "arrival": { "airportCode": "ALG" } }] }
            ]
          }
        ]
      }
    }
  ]
}

Multi-city

Three or more flights, in order:

curl https://api.fx-port.com/api/v1/get_flights \
  -H "Authorization: Bearer fxp_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "segments": [
    {
      "origin": "ALG",
      "destination": "CDG",
      "departure_date": "2026-12-15"
    },
    {
      "origin": "CDG",
      "destination": "MAD",
      "departure_date": "2026-12-18"
    },
    {
      "origin": "MAD",
      "destination": "ALG",
      "departure_date": "2026-12-22"
    }
  ],
  "cabin_class": "economy",
  "passengers": {
    "adults": 1
  },
  "supplier_id": "duffel_1"
}'

searchType is "MULTI_CITY". Duffel returned 568 offers in a 4.6 MB response (80 KB with Accept-Encoding: gzip). The legs of an offer are named outbound, return and then segment_3, segment_4 ...: the second leg of a multi-city offer is called return even though it is not a return, so use the order of itinerary, not the name, to follow the trip:

{
  "itinerary": [
    { "direction": "outbound", "duration": "PT2H24M", "stops": 0, "segments": [{ "departure": { "airportCode": "ALG" }, "arrival": { "airportCode": "CDG" } }] },
    { "direction": "return", "duration": "PT1H59M", "stops": 0, "segments": [{ "departure": { "airportCode": "CDG" }, "arrival": { "airportCode": "MAD" } }] },
    { "direction": "segment_3", "duration": "PT1H32M", "stops": 0, "segments": [{ "departure": { "airportCode": "MAD" }, "arrival": { "airportCode": "ALG" } }] }
  ]
}

An offer is one fare for the whole trip: price it and book it as a whole.

Notes

  • A search with segments ignores origin, destination, departure_date and return_date.
  • Each selected supplier receives every segment.
  • To fly two separate one-way trips at two different fares, make two searches.

Related

  • Search flights and Basic routes.
  • Supplier selection.
PreviousSupplier selectionNext Flexible-date search

On this page

  • Open-jaw
  • Response example
  • Multi-city
  • Notes
  • Related

© 2026 FX-Port

TermsPrivacy[email protected]