POST/v1/flights/order/cancel/:gdsprovider/:orderId

Cancelar orden de vuelo

Solicita la cancelación de una orden de vuelo existente, usando opcionalmente un cancelId generado por un flujo de cancelación pendiente.

Solicita la cancelación de una orden de vuelo existente, usando opcionalmente un cancelId generado por un flujo de cancelación pendiente.

Endpoint

MétodoRutaAuth
POST/v1/flights/order/cancel/:gdsprovider/:orderIdAPI 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 de parámetros de la petición

PropiedadTipoDetallesRequeridoNotas
gdsprovidernumber-
orderIdstring-

Esquema del cuerpo de la petición

PropiedadTipoDetallesRequeridoNotas
cancelIdstringNo-

Respuesta exitosa

Devuelve message of cancellation

Esquema del cuerpo de la respuesta

PropiedadTipoDetallesRequeridoNotas
messagestring-

Notas operativas

  • Send cancelId when a pending cancellation was already created. If cancelId is omitted, Travelandz creates and confirms the cancellation in one request when supported by the selected flow.
  • Direct cancellation can fail when the booking is already ticketing or no longer cancellable.

Ejemplo

bash
bash
curl -X POST https://api.sandbox.travelandz.com/v1/flights/order/cancel/0/order_123 \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE" \
  -H "Content-Type: application/json" \
  -d '{"cancelId":"ore_123"}'