FX-Port API
Flights

POST /api/v1/flights/flexible_search

Returns a ±3-day price matrix from suppliers that support flexible-date searches.

Returns a date matrix showing the lowest price for each day ±3 days around the requested departure and return dates, alongside regular offers.

Permission: Read

Flexible date search is capability-based. Only suppliers that support flexible-date matrices are queried by this endpoint. Currently Amadeus AQC supplies the matrix; availability can expand as suppliers are added. Always check for flexPrices before reading it.

Request body

Same fields as POST /api/v1/get_flights. Omit supplier_id to use all enabled suppliers that support flexible-date matrices, or target a supplier only after confirming that capability.

Request example

curl --request POST \
  --url https://api.fx-port.com/api/v1/flights/flexible_search \
  --header 'Authorization: Bearer fxp_live_YOUR_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "origin": "ALG",
    "destination": "CDG",
    "departure_date": "2026-09-15",
    "return_date": "2026-09-22",
    "cabin_class": "economy",
    "passengers": {
      "adults": 1
    }
  }'

Response example (abbreviated)

{
    "success": true,
    "searchId": "fs_flex001",
    "flexPrices": {
        "matrix": [
            {
                "departureDate": "2026-09-13",
                "returnDate": "2026-09-20",
                "finalPrice": 27100.00,
                "agencyCurrency": "DZD"
            },
            {
                "departureDate": "2026-09-14",
                "returnDate": "2026-09-21",
                "finalPrice": 26500.00,
                "agencyCurrency": "DZD"
            },
            {
                "departureDate": "2026-09-15",
                "returnDate": "2026-09-22",
                "finalPrice": 28526.17,
                "agencyCurrency": "DZD"
            }
        ]
    },
    "suppliers": [ "...regular offers..." ]
}

On this page