POST/v1/transfers/reservations/changes/search

Buscar cambios de una reserva de transfer

Busca ofertas de reemplazo para una reserva existente.

Compartir
POST/v1/transfers/reservations/changes/search

Consola API

Pruébalo

Envía una petición real al entorno sandbox e inspecciona la respuesta.

Credenciales

Inicia sesión para elegir entre tus API keys guardadas en vez de pegarlas.

Cuerpo de la petición

Petición cURL

cURL
bash
curl -X POST 'https://api.sandbox.travelandz.com/v1/transfers/reservations/changes/search' \
  -H 'Authorization: Bearer YOUR_SECRET_KEY' \
  -H 'X-Travelandz-Id: YOUR_PUBLIC_KEY:YOUR_PROFILE_CODE' \
  -H 'Content-Type: application/json' \
  -d '{"reservationHashedId":"5c8563a5d31d4c33a3a1eafbbfe59c4b","pickupDatetime":"2026-08-30 22:00","numPassengers":2,"currency":"USD"}'

Añade tus credenciales para enviar una petición.

Esta petición necesita identificadores o tokens de una llamada anterior. Ejecuta primero el paso previo y pega aquí sus valores.

Respuesta

Pulsa «¡Pruébalo!» para enviar una petición y ver la respuesta aquí.

Busca ofertas de reemplazo para una reserva existente.

Autenticación y headers

HeaderDescripción
AuthorizationBearer <secret_key>. Conserva el secret en el servidor y nunca lo escribas en logs del cliente.
X-Travelandz-Id<public_key>:<profile_code>, donde el profile code persistido usa el formato dp_<12 alfanuméricos>.
LANGHeader recomendado para el idioma. También se acepta Accept-Language.
Content-Typeapplication/json para peticiones con body JSON.

Petición

Solo reservationHashedId es obligatorio. Envía únicamente los campos que quieras cambiar: todo lo que omitas se toma de la reserva original.

Este endpoint siempre responde con JSON. Nunca abre un stream.

Schema del body

reservationHashedId
string
Identifier of the reservation you want to replace.
mode
enum
one_wayround_trip
No
numPassengers
numberNo
When sent, an integer of at least 1.
startAddress
stringNo
Optional override of the original location.
startCity
stringNo
Appended to the address to improve resolution.
startZipcode
stringNo
Appended to the address to improve resolution.
startLat
numberNo
Must be sent together with startLng.
startLng
numberNo
Must be sent together with startLat.
startPlaceId
stringNo
Alternative to an address or coordinates.
endAddress
stringNo
Optional override of the original location.
endCity
stringNo
Appended to the address to improve resolution.
endZipcode
stringNo
Appended to the address to improve resolution.
endLat
numberNo
Must be sent together with endLng.
endLng
numberNo
Must be sent together with endLat.
endPlaceId
stringNo
Alternative to an address or coordinates.
pickupDatetime
string
Formato: YYYY-MM-DD HH:mm
No
flightDatetime
stringNo
returnPickupDatetime
stringNo
returnFlightDatetime
stringNo
amenities
array
amenities[]
string[]No
currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
No
Lowercase values are accepted and normalized. Defaults to USD on a new search and is inherited afterwards.
campaign
stringNo
Your own campaign context.
branch
stringNo
Requires campaign when sent.
language
enum
en-USes-ESde-DEfr-FRpt-BRzh-CNit-IT
No
Legacy field. Prefer the LANG or Accept-Language header.

Ejemplo de petición

json
json
{
  "reservationHashedId": "5c8563a5d31d4c33a3a1eafbbfe59c4b",
  "pickupDatetime": "2026-08-30 22:00",
  "numPassengers": 2,
  "currency": "USD"
}

Respuesta exitosa

Devuelve un nuevo searchId de cambio y offers[]. Las ofertas tienen la misma forma que un resultado de búsqueda normal, incluido un bookingToken opaco por oferta.

Schema de respuesta

gdsprovider
enum
0
searchId
string
Change search identifier. Send it to pricing and confirmation.
moreComing
boolean
True when more replacement offers may still arrive.
pickupDatetime
string
Formato: ISO 8601
No
numPassengers
numberNo
startLocation
object
startLocationformattedAddress
stringNo
startLocationfullAddress
stringNo
startLocationiataCode
stringNo
Present for airport locations.
startLocationicaoCode
stringNo
startLocationplaceId
stringNo
Reusable place identifier; send it back to skip geocoding.
startLocationlatitude
numberNo
startLocationlongitude
numberNo
startLocationtimezone
stringNo
IANA timezone of the location.
endLocation
object
endLocationformattedAddress
stringNo
endLocationfullAddress
stringNo
endLocationiataCode
stringNo
Present for airport locations.
endLocationicaoCode
stringNo
endLocationplaceId
stringNo
Reusable place identifier; send it back to skip geocoding.
endLocationlatitude
numberNo
endLocationlongitude
numberNo
endLocationtimezone
stringNo
IANA timezone of the location.
offers
array
offers[]searchId
string
Send this value in pricing, booking and reservation reads.
offers[]gdsprovider
enum
0
offers[]resultId
string
Identifies the selected offer.
offers[]bookingToken
string
Opaque value. Copy it into pricing and booking; never decode or modify it.
offers[]expiresAt
string
Formato: ISO 8601
The offer and its token stop being usable after this moment.
offers[]vehicleId
stringNo
offers[]totalAmount
number
Indicative total for the offer in currency.
offers[]currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
offers[]bookable
boolean
False when the offer cannot be booked.
offers[]flightInfoRequired
boolean
When true, airline and flightNumber are required to book.
offers[]extraPaxRequired
boolean
When true, extraPaxInfo is required to book.
offers[]goodToKnowInfo
array
offers[]goodToKnowInfo[]
string[]
Localized operational notes to show the traveller.
offers[]supports
object
offers[]cancellationPolicies
array
offers[]cancellationPolicies[]notice
numberNo
Hours of notice the policy requires.
offers[]cancellationPolicies[]refundPercent
numberNo
offers[]cancellationPolicies[]refundableUntilDatetime
string
Formato: ISO 8601
No
offers[]cancellationPolicies[]refundAmount
numberNo
Refundable amount in the offer currency.
offers[]cancellationPolicies[]currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
No
offers[]steps
array
offers[]steps[]stepType
stringNo
Leg type, for example car.
offers[]steps[]main
booleanNo
True for the primary leg of the transfer.
offers[]steps[]description
stringNo
offers[]steps[]departureDatetime
string
Formato: ISO 8601
No
offers[]steps[]durationMinutes
numberNo
offers[]steps[]durationSeconds
numberNo
offers[]steps[]distanceMeters
numberNo
offers[]steps[]distanceMiles
numberNo
offers[]steps[]lineName
stringNo
Present for scheduled line transport.
offers[]steps[]lineColor
stringNo
offers[]steps[]provider
object
offers[]steps[]providername
stringNo
offers[]steps[]providerrating
numberNo
offers[]steps[]vehicle
object
offers[]steps[]vehicletype
stringNo
Vehicle name, for example Shared Ride Van.
offers[]steps[]vehiclecategory
stringNo
Vehicle grouping, for example Shared or Private.
offers[]steps[]vehiclemaxBags
numberNo
offers[]steps[]vehiclemaxPassengers
numberNo
offers[]steps[]vehiclenumVehicles
numberNo
offers[]steps[]vehicleimageUrl
string
Formato: URL
No
offers[]steps[]waitTime
object
offers[]steps[]waitTimeincluded
booleanNo
offers[]steps[]waitTimeminutesIncluded
numberNo
offers[]steps[]waitTimeextraWaitTimeChargeable
booleanNo
offers[]steps[]amenities
array
offers[]steps[]amenities[]key
string
Value to send in selectedAmenities.
offers[]steps[]amenities[]name
string
Localized name.
offers[]steps[]amenities[]description
stringNo
offers[]steps[]amenities[]imageUrl
string
Formato: URL
No
offers[]steps[]amenities[]pngImageUrl
string
Formato: URL
No
offers[]steps[]amenities[]inputType
enum
booleannumeric
No
offers[]steps[]amenities[]included
boolean
True when the amenity is already part of the offer.
offers[]steps[]amenities[]selectable
boolean
True when the amenity can be added to this offer.
offers[]steps[]amenities[]selected
boolean
True when the amenity is part of the priced selection.
offers[]steps[]startLocation
object
offers[]steps[]startLocationformattedAddress
stringNo
offers[]steps[]startLocationfullAddress
stringNo
offers[]steps[]startLocationiataCode
stringNo
Present for airport locations.
offers[]steps[]startLocationicaoCode
stringNo
offers[]steps[]startLocationplaceId
stringNo
Reusable place identifier; send it back to skip geocoding.
offers[]steps[]startLocationlatitude
numberNo
offers[]steps[]startLocationlongitude
numberNo
offers[]steps[]startLocationtimezone
stringNo
IANA timezone of the location.
offers[]steps[]endLocation
object
offers[]steps[]endLocationformattedAddress
stringNo
offers[]steps[]endLocationfullAddress
stringNo
offers[]steps[]endLocationiataCode
stringNo
Present for airport locations.
offers[]steps[]endLocationicaoCode
stringNo
offers[]steps[]endLocationplaceId
stringNo
Reusable place identifier; send it back to skip geocoding.
offers[]steps[]endLocationlatitude
numberNo
offers[]steps[]endLocationlongitude
numberNo
offers[]steps[]endLocationtimezone
stringNo
IANA timezone of the location.
offers[]ticketTypes
array
offers[]ticketTypes[]id
string
Send this value in ticketTypes[].id when booking.
offers[]ticketTypes[]name
stringNo
offers[]ticketTypes[]departureDatetime
string
Formato: ISO 8601
No
offers[]ticketTypes[]arrivalDatetime
string
Formato: ISO 8601
No
offers[]alternativeTimes
array
offers[]alternativeTimes[]departureDatetime
string
Formato: ISO 8601
No
offers[]alternativeTimes[]arrivalDatetime
string
Formato: ISO 8601
No

Ejemplos de respuesta

json
json
{
  "gdsprovider": 0,
  "searchId": "5c8563a5d31d4c33a3a1eafbbfe59c49",
  "moreComing": false,
  "pickupDatetime": "2026-08-30T22:00:00-04:00",
  "numPassengers": 2,
  "startLocation": {
    "formattedAddress": "433 Park Ave, New York, NY 10022, USA",
    "fullAddress": "433 Park Ave, New York",
    "placeId": "EiU0MzMgUGFyayBBdmUsIE5ldyBZb3JrLCBOWSAxMDAyMiwgVVNB",
    "latitude": 40.7607634,
    "longitude": -73.971212,
    "timezone": "America/New_York"
  },
  "endLocation": {
    "formattedAddress": "John F Kennedy International Airport",
    "fullAddress": "John F Kennedy International Airport",
    "iataCode": "JFK",
    "icaoCode": "KJFK",
    "latitude": 40.639751,
    "longitude": -73.778926,
    "timezone": "America/New_York"
  },
  "offers": [
    {
      "searchId": "5c8563a5d31d4c33a3a1eafbbfe59c49",
      "gdsprovider": 0,
      "resultId": "763475651c06f5ac31ea587084dc0640",
      "bookingToken": "opaque_change_offer_token_generated_by_travelandz",
      "expiresAt": "2026-08-30T22:20:00.000Z",
      "totalAmount": 49.84,
      "currency": "USD",
      "bookable": true,
      "flightInfoRequired": true,
      "extraPaxRequired": false,
      "goodToKnowInfo": [],
      "cancellationPolicies": [
        {
          "notice": 48,
          "refundPercent": 100,
          "refundAmount": 49.84,
          "currency": "USD"
        }
      ],
      "supports": {},
      "steps": [
        {
          "stepType": "car",
          "main": true,
          "departureDatetime": "2026-08-30T22:40:00-04:00",
          "provider": {
            "name": "GO Airlink NYC",
            "rating": 5
          },
          "vehicle": {
            "type": "Shared Ride Van",
            "category": "Shared",
            "maxBags": 4,
            "maxPassengers": 11,
            "numVehicles": 1
          },
          "amenities": []
        }
      ],
      "ticketTypes": [],
      "alternativeTimes": [
        {
          "departureDatetime": "2026-08-30T22:40:00-04:00",
          "arrivalDatetime": "2026-08-30T23:06:10-04:00"
        },
        {
          "departureDatetime": "2026-08-30T23:40:00-04:00",
          "arrivalDatetime": "2026-08-31T00:06:10-04:00"
        }
      ]
    }
  ]
}

Errores

HTTPCódigoSignificadoAcción recomendada
400El body, la query o el path son inválidos, o incluyen una propiedad desconocida.Corrige la petición usando el array message.
400transfer_invalid_currencyLa moneda está fuera de la lista soportada.Usa una moneda soportada.
400transfer_invalid_languageEl idioma solicitado no está soportado.Usa uno de los valores de idioma documentados.
429transfer_provider_errorEl servicio está temporalmente limitado por rate limit.Reintenta con backoff exponencial.
502transfer_provider_errorLa petición no pudo completarse.No asumas que tuvo éxito. Conserva tus identificadores y consulta la reserva cuando la operación pudiera haberse creado.
400transfer_location_not_foundNo se pudo resolver el origen o el destino.Añade city o zipcode, o envía un place ID o un par de coordenadas.
503El precio no pudo confirmarse en este momento.Reintenta más tarde. No reserves ni cobres al viajero.

Notas de uso

Después de que el viajero elija una oferta de reemplazo, pide pricing para ella y luego confirma el cambio. La reserva original permanece activa hasta confirmar el cambio.

Ejemplo cURL

bash
bash
curl --request POST \
  --url "https://api.sandbox.travelandz.com/v1/transfers/reservations/changes/search" \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE" \
  -H "Content-Type: application/json" \
  --data '{
  "reservationHashedId": "5c8563a5d31d4c33a3a1eafbbfe59c4b",
  "pickupDatetime": "2026-08-30 22:00",
  "numPassengers": 2,
  "currency": "USD"
}'