GET/v1/transfers/reservations/by-search/:searchId

Obtener reserva por search ID

Consulta una reserva que incluye amenities seleccionadas.

Compartir
GET/v1/transfers/reservations/by-search/:searchId

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.

Parámetros de ruta

1 campo

ID de búsqueda

Identificador de búsqueda usado para crear el booking. Obligatorio para reservas que incluyen amenities. En el endpoint de detalles unificados, envía solo uno entre reservationId, confirmationNumber o searchId.

Parámetros de consulta

3 campos

Proveedor GDS

Selector de contenido de transfers. Actualmente solo 0.

Moneda

Moneda de los importes devueltos. Debe coincidir con la oferta o la reserva cuando ya existe una.

Idioma

Campo de idioma legacy. Es preferible usar el header LANG o Accept-Language.

Petición cURL

cURL
bash
curl -X GET 'https://api.sandbox.travelandz.com/v1/transfers/reservations/by-search/:searchId?gdsprovider=0&currency=USD' \
  -H 'Authorization: Bearer YOUR_SECRET_KEY' \
  -H 'X-Travelandz-Id: YOUR_PUBLIC_KEY:YOUR_PROFILE_CODE'

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í.

Consulta una reserva que incluye amenities seleccionadas.

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

Este endpoint no recibe body. searchId va en el path y gdsprovider en la query.

Schema de parámetros

searchId
string
Search identifier used to create the booking.

Schema de query params

gdsprovider
enum
0
Transfer content selector. Currently 0.
currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
No
Lowercase values are accepted and normalized. Defaults to USD on a new search and is inherited afterwards.
language
enum
en-USes-ESde-DEfr-FRpt-BRzh-CNit-IT
No
Legacy field. Prefer the LANG or Accept-Language header.

Respuesta exitosa

Devuelve el envelope de reserva con selectedAmenities completo.

Schema de respuesta

status
enum
completedpendingfailed
completed
boolean
Treat the operation as confirmed only when this is true and reservations is not empty.
timedOut
boolean
True when a final state was not reached in time.
reservations
array
reservations[]gdsprovider
enum
0
reservations[]reservationId
string
Persist this value; reservation reads and cancellation need it.
reservations[]confirmationNumber
stringNo
Traveller-facing confirmation code.
reservations[]status
enum
completedpendingfailed
reservations[]cancelled
boolean
reservations[]totalAmount
number
Total charged for the reservation.
reservations[]currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
reservations[]pickupInstructions
stringNo
reservations[]ticketUrl
string
Formato: URL
No
reservations[]selectedScheduleIndex
numberNo
reservations[]departureDatetime
string
Formato: ISO 8601
No
reservations[]arrivalDatetime
string
Formato: ISO 8601
No
reservations[]selectedAmenities
array
reservations[]selectedAmenities[]key
string
Value to send in selectedAmenities.
reservations[]selectedAmenities[]name
string
Localized name.
reservations[]selectedAmenities[]description
stringNo
reservations[]selectedAmenities[]imageUrl
string
Formato: URL
No
reservations[]selectedAmenities[]pngImageUrl
string
Formato: URL
No
reservations[]selectedAmenities[]inputType
enum
booleannumeric
No
reservations[]selectedAmenities[]included
boolean
True when the amenity is already part of the offer.
reservations[]selectedAmenities[]selectable
boolean
True when the amenity can be added to this offer.
reservations[]selectedAmenities[]selected
boolean
True when the amenity is part of the priced selection.
error
stringNo
Present when status is failed.
metadata
object
metadatauseSearchIdForDetails
boolean
True when reservation details must be read with searchId instead of reservationId.
metadatadetailsIdentifier
enum
reservationIdsearchId
Identifier to use when reading the reservation.
metadatadetailsSearchId
stringNo
Present when detailsIdentifier is searchId.
metadatamessage
stringNo

Ejemplos de respuesta

json
json
{
  "status": "completed",
  "completed": true,
  "timedOut": false,
  "reservations": [
    {
      "gdsprovider": 0,
      "reservationId": "f390daff1fdf4cccb19b7abd825dc011",
      "confirmationNumber": "TZ-6202191",
      "status": "completed",
      "cancelled": false,
      "totalAmount": 181.97,
      "currency": "USD",
      "pickupInstructions": "The driver will call you when he arrives.",
      "selectedScheduleIndex": 0,
      "departureDatetime": "2026-08-16T14:40:00-04:00",
      "arrivalDatetime": "2026-08-16T15:06:00-04:00",
      "selectedAmenities": [
        {
          "key": "baby_seats",
          "name": "Baby seats",
          "description": "Your vehicle will have a child safety seat to keep children under age 4 safe.",
          "imageUrl": "https://api.sandbox.travelandz.com/v1/assets/transfers/images/0/amenities/baby-seats.svg",
          "pngImageUrl": "https://api.sandbox.travelandz.com/v1/assets/transfers/images/0/amenities/baby-seats.png",
          "inputType": "numeric",
          "included": false,
          "selected": true,
          "selectable": true
        },
        {
          "key": "child_booster",
          "name": "Child booster",
          "description": "Your vehicle will have a child booster seat to keep children from age 4-8 safe.",
          "imageUrl": "https://api.sandbox.travelandz.com/v1/assets/transfers/images/0/amenities/child-booster.svg",
          "pngImageUrl": "https://api.sandbox.travelandz.com/v1/assets/transfers/images/0/amenities/child-booster.png",
          "inputType": "numeric",
          "included": false,
          "selected": true,
          "selectable": true
        }
      ]
    }
  ]
}

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_currency_mismatchLa moneda no coincide con la oferta, la cotización o la reserva.Reutiliza la moneda devuelta por el paso anterior, u omite el campo para heredarla.
503El precio no pudo confirmarse en este momento.Reintenta más tarde. No reserves ni cobres al viajero.

Notas de uso

Este es el endpoint recomendado para cualquier reserva creada con amenities. Conserva el searchId que usaste al reservar para poder consultarla más adelante.

Ejemplo cURL

bash
bash
curl --request GET \
  --url "https://api.sandbox.travelandz.com/v1/transfers/reservations/by-search/73a5670b476649a985f0535db1077c05?gdsprovider=0&currency=USD" \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"