POST/v1/flights/search

Buscar ofertas de vuelo

Busca inventario de vuelo en las fuentes activas y devuelve ofertas normalizadas con precio final para el developer, metadata de proveedor y links de reserva opcionales.

Busca inventario de vuelo en las fuentes activas y devuelve ofertas normalizadas con precio final para el developer, metadata de proveedor y links de reserva opcionales.

Endpoint

MétodoRutaAuth
POST/v1/flights/searchAPI key requerida
Headers obligatorios:
HeaderDescripción
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.

Esquema del cuerpo de la petición

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

Respuesta exitosa

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

Esquema del cuerpo de la respuesta

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

Notas operativas

  • 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[].

Ejemplo

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"}'

Cuerpo de la petición - Ejemplo

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"
}

Respuestas

CódigoDescripción
200Flight offers retrieved successfully.
400Solicitud inválida: payload no válido.
401No autorizado: credenciales inválidas o ausentes.
403Prohibido: credenciales inválidas.
500Error interno del servidor

200 Cuerpo de la respuesta

Tipo de contenido: 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"
    }
  ]
}