POST/v1/flights/search

Search flight offers

Searches active flight inventory sources and returns normalized offers with final developer pricing, provider metadata and optional booking links.

Searches active flight inventory sources and returns normalized offers with final developer pricing, provider metadata and optional booking links.

Endpoint

MethodPathAuth
POST/v1/flights/searchRequired API key
Required headers:
HeaderDescription
AuthorizationBearer <secret_key>. The secret is shown only once when the credential is created.
X-Travelandz-Id<public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential.
Content-TypeUse application/json for requests with a body.

Request Body Schema

PropertyTypeDetailsRequiredNotes
slicesarrayYes-
slices[]origin
stringYesIATA code of the origin airport or city
slices[]destination
stringYesIATA code of the destination airport or city
slices[]departure_date
string
Format: YYYY-MM-DD
YesMust not be in the past
passengersarrayYes-
passengers[]type
enum
adultchildinfant_without_seat
Yes-
cabin_classenum
economybusinessfirstpremium_economy
Yes-
currencyenum
EURUSDCNY
NoDefault EUR
retrieveBookingLinkbooleanNoWhen true, supported offers can include offerLink
includeOriginalPricebooleanNo-
languageenum
eneszh
NoOptional language for translated metadata when available

Success Response

Returns offers[] with normalized provider metadata, pricing, passenger requirements, slices and segments.

Response Body Schema

PropertyTypeDetailsRequiredNotes
offersarrayYes-
offers[]offerId
stringYes-
offers[]offerLink
stringNullable-
offers[]gdsprovider
numberYes-
offers[]expiresAt
string
Format: ISO 8601
Yes-
offers[]totalAmount
numberYes-
offers[]originalTotalAmount
numberYes-
offers[]holdOptions
objectYes-
offers[]holdOptionsavailable
booleanYes-
offers[]holdOptionspaymentRequiredBy
string
Format: ISO 8601
Nullable-
offers[]holdOptionspriceGuarantedUntil
string
Format: ISO 8601
Nullable-
offers[]supportedPassengerIdDocuments
arrayYes-
offers[]supportedPassengerIdDocuments[]
enum[]Yes-
offers[]passengerIdentityDocumentsRequired
booleanYes-
offers[]supportedLoyaltyPrograms
arrayYes-
offers[]supportedLoyaltyPrograms[]
string[]Yes-
offers[]airline
objectYes-
offers[]airlinename
stringYes-
offers[]airlineiataCode
stringYes-
offers[]airlinelogoURL
stringNullable-
offers[]airlineconditionsOfCarriage
stringNo-
offers[]passengers
arrayYes-
offers[]passengers[]id
stringYes-
offers[]passengers[]type
enum
adultchildinfant_without_seat
Yes-
offers[]conditions
objectYes-
offers[]conditionsrefundBeforeDeparture
objectYes-
offers[]conditionsrefundBeforeDeparturecurrency
stringYes-
offers[]conditionsrefundBeforeDeparturepenaltyAmount
stringYes-
offers[]conditionsrefundBeforeDepartureallowed
booleanYes-
offers[]conditionschangeBeforeDeparture
objectYes-
offers[]conditionschangeBeforeDeparturecurrency
stringYes-
offers[]conditionschangeBeforeDeparturepenaltyAmount
stringYes-
offers[]conditionschangeBeforeDepartureallowed
booleanYes-
offers[]slices
arrayYes-
offers[]slices[]fareName
stringYes-
offers[]slices[]departure
objectYes-
offers[]slices[]departureiataCode
stringYes-
offers[]slices[]departurecityName
stringYes-
offers[]slices[]departureairportName
stringNo-
offers[]slices[]departuredepartingAt
string
Format: ISO 8601
Yes-
offers[]slices[]departuretimeZone
stringNo-
offers[]slices[]arrival
objectYes-
offers[]slices[]arrivaliataCode
stringYes-
offers[]slices[]arrivalcityName
stringYes-
offers[]slices[]arrivalairportName
stringNo-
offers[]slices[]arrivalarrivingAt
string
Format: ISO 8601
Yes-
offers[]slices[]arrivaltimeZone
stringNo-
offers[]slices[]durationMinutes
numberYes-
offers[]slices[]conditions
objectYes-
offers[]slices[]conditionspriorityCheckIn
booleanYes-
offers[]slices[]conditionspriorityBoarding
booleanYes-
offers[]slices[]conditionsadvanceSeatSelection
booleanYes-
offers[]slices[]segments
arrayYes-
offers[]slices[]segments[]fareName
stringYes-
offers[]slices[]segments[]departure
objectYes-
offers[]slices[]segments[]departureiataCode
stringYes-
offers[]slices[]segments[]departurecityName
stringYes-
offers[]slices[]segments[]departureairportName
stringNo-
offers[]slices[]segments[]departuredepartingAt
string
Format: ISO 8601
Yes-
offers[]slices[]segments[]departuretimeZone
stringNo-
offers[]slices[]segments[]departureterminal
stringNo-
offers[]slices[]segments[]arrival
objectYes-
offers[]slices[]segments[]arrivaliataCode
stringYes-
offers[]slices[]segments[]arrivalcityName
stringYes-
offers[]slices[]segments[]arrivalairportName
stringNo-
offers[]slices[]segments[]arrivalarrivingAt
string
Format: ISO 8601
Yes-
offers[]slices[]segments[]arrivaltimeZone
stringNo-
offers[]slices[]segments[]arrivalterminal
stringNo-
offers[]slices[]segments[]airline
objectYes-
offers[]slices[]segments[]airlineoperatingCarrier
objectYes-
offers[]slices[]segments[]airlineoperatingCarriername
stringYes-
offers[]slices[]segments[]airlineoperatingCarrieriataCode
stringYes-
offers[]slices[]segments[]airlineoperatingCarrierlogoURL
stringNullable-
offers[]slices[]segments[]airlineoperatingCarrierconditionsOfCarriage
stringNo-
offers[]slices[]segments[]airlinemarketingCarrier
objectYes-
offers[]slices[]segments[]airlinemarketingCarriername
stringYes-
offers[]slices[]segments[]airlinemarketingCarrieriataCode
stringYes-
offers[]slices[]segments[]airlinemarketingCarrierlogoURL
stringNullable-
offers[]slices[]segments[]airlinemarketingCarrierconditionsOfCarriage
stringNo-
offers[]slices[]segments[]flightNumber
stringYes-
offers[]slices[]segments[]durationMinutes
numberYes-
offers[]slices[]segments[]passengers
arrayYes-
offers[]slices[]segments[]passengers[]amenities
objectYes-
offers[]slices[]segments[]passengers[]amenitieswifi
objectYes-
offers[]slices[]segments[]passengers[]amenitieswificost
enum
freefree or paidpaid
Nullable-
offers[]slices[]segments[]passengers[]amenitieswifiavailable
booleanYes-
offers[]slices[]segments[]passengers[]amenitiesseat
objectYes-
offers[]slices[]segments[]passengers[]amenitiesseatpitch
enum
"number"n/a
Yes-
offers[]slices[]segments[]passengers[]amenitiesseatlegroom
enum
lessmorestandardn/a
Yes-
offers[]slices[]segments[]passengers[]amenitiesseattype
enum
standardskycouchreclinerangle_flatfull_flatfull_flat_podprivate_suite
Nullable-
offers[]slices[]segments[]passengers[]amenitiespower
booleanYes-
offers[]slices[]segments[]passengers[]baggages
arrayYes-
offers[]slices[]segments[]passengers[]baggages[]type
enum
checkedcarry_on
Yes-
offers[]slices[]segments[]passengers[]baggages[]quantity
numberYes-
offers[]slices[]segments[]passengers[]baggages[]maxKg
stringNo-
offers[]CO2EmissionsKg
numberNullable-
offers[]holdId
stringNullable-
offers[]originalCurrency
enum
EURUSDCNY
Yes-
offers[]currency
enum
EURUSDCNY
Yes-

Operational Notes

  • Send one slices[] item for one-way trips and two items for round trips.
  • passengers[] must include at least one adult.
  • retrieveBookingLink=true can add offerLink when the provider supports it.
  • Store the selected offer payload. Some booking flows require totalSegments built from offer.slices[].segments[].

Example

bash
bash
curl -X POST https://api.sandbox.travelandz.com/v1/flights/search \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE" \
  -H "Content-Type: application/json" \
  -d '{"slices":[{"origin":"MAD","destination":"BCN","departure_date":"2026-08-20"}],"passengers":[{"type":"adult"}],"cabin_class":"economy","currency":"EUR","retrieveBookingLink":false,"includeOriginalPrice":false,"language":"es"}'

Request Body - Example Value

json
json
{
  "slices": [
    {
      "origin": "MAD",
      "destination": "BCN",
      "departure_date": "2026-08-20"
    }
  ],
  "passengers": [
    {
      "type": "adult"
    }
  ],
  "cabin_class": "economy",
  "currency": "EUR",
  "retrieveBookingLink": false,
  "includeOriginalPrice": false,
  "language": "es"
}

Responses

CodeDescription
200Flight offers retrieved successfully.
400Bad request – invalid payload.
401Unauthorized – invalid or missing credentials.
403Forbidden – invalid credentials.
500Internal server error

200 Response Body

Media type: application/json

json
json
{
  "offers": [
    {
      "offerId": "string",
      "offerLink": "string",
      "gdsprovider": 0,
      "expiresAt": "2026-06-05T00:06:29.070Z",
      "totalAmount": 0,
      "originalTotalAmount": 0,
      "holdOptions": {
        "available": true,
        "paymentRequiredBy": "2026-06-05T00:06:29.070Z",
        "priceGuarantedUntil": "2026-06-05T00:06:29.070Z"
      },
      "supportedPassengerIdDocuments": "passport",
      "passengerIdentityDocumentsRequired": true,
      "supportedLoyaltyPrograms": [
        null
      ],
      "airline": {
        "name": "string",
        "iataCode": "string",
        "logoURL": {},
        "conditionsOfCarriage": "string"
      },
      "passengers": [
        {
          "id": "string",
          "type": "adult"
        }
      ],
      "conditions": {
        "refundBeforeDeparture": {
          "currency": "string",
          "penaltyAmount": "string",
          "allowed": true
        },
        "changeBeforeDeparture": {
          "currency": "string",
          "penaltyAmount": "string",
          "allowed": true
        }
      },
      "slices": [
        {
          "fareName": "string",
          "departure": {
            "iataCode": "string",
            "cityName": "string",
            "airportName": "string",
            "departingAt": "string",
            "timeZone": "string"
          },
          "arrival": {
            "iataCode": "string",
            "cityName": "string",
            "airportName": "string",
            "arrivingAt": "string",
            "timeZone": "string"
          },
          "durationMinutes": 0,
          "conditions": {
            "priorityCheckIn": true,
            "priorityBoarding": true,
            "advanceSeatSelection": true
          },
          "segments": [
            {
              "fareName": "string",
              "departure": {
                "iataCode": "string",
                "cityName": "string",
                "airportName": "string",
                "departingAt": "string",
                "timeZone": "string",
                "terminal": "string"
              },
              "arrival": {
                "iataCode": "string",
                "cityName": "string",
                "airportName": "string",
                "arrivingAt": "string",
                "timeZone": "string",
                "terminal": "string"
              },
              "airline": {},
              "flightNumber": "string",
              "durationMinutes": 0,
              "passengers": [
                {
                  "amenities": {
                    "wifi": {
                      "cost": {},
                      "available": true
                    },
                    "seat": {
                      "pitch": "string",
                      "legroom": "string",
                      "type": {}
                    },
                    "power": true
                  },
                  "baggages": [
                    {
                      "type": "checked",
                      "quantity": 0,
                      "maxKg": "string"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "CO2EmissionsKg": 0,
      "holdId": "string",
      "originalCurrency": {},
      "currency": "EUR"
    }
  ]
}