POST/v1/flights/order/pending/cancel/:gdsprovider/:orderId
Crear cancelación pendiente de vuelo
Inicia un flujo de cancelación pendiente para revisar reembolso, penalidades o confirmación del proveedor antes de cancelar definitivamente.
Inicia un flujo de cancelación pendiente para revisar reembolso, penalidades o confirmación del proveedor antes de cancelar definitivamente.
Endpoint
| Método | Ruta | Auth |
|---|---|---|
POST | /v1/flights/order/pending/cancel/:gdsprovider/:orderId | API key requerida |
| Header | Descripción |
|---|---|
Authorization | Bearer <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-Type | Use application/json for requests with a body. |
Esquema de parámetros de la petición
| Propiedad | Tipo | Detalles | Requerido | Notas |
|---|---|---|---|---|
gdsprovider | number | Sí | Only gdsprovider "0" supports this flow | |
orderId | string | Sí | - |
Respuesta exitosa
Devuelve the pending cancellation id and provider state.
Esquema del cuerpo de la respuesta
| Propiedad | Tipo | Detalles | Requerido | Notas |
|---|---|---|---|---|
data | object | Sí | - | |
datarefund_to | string | Sí | - | |
datarefund_currency | string | Sí | - | |
datarefund_amount | string | Sí | - | |
dataorder_id | string | Sí | - | |
datalive_mode | boolean | Sí | - | |
dataid | string | Sí | - | |
dataexpires_at | string | Format: ISO 8601 | Sí | - |
datacreated_at | string | Format: ISO 8601 | Sí | - |
dataconfirmed_at | string | Format: ISO 8601 | Sí | - |
dataairline_credits | array | Sí | - | |
dataairline_credits[]passenger_id | string | Sí | - | |
dataairline_credits[]issued_on | string | Format: ISO 8601 | Sí | - |
dataairline_credits[]id | string | Sí | - | |
dataairline_credits[]credit_name | string | Sí | - | |
dataairline_credits[]credit_currency | string | Sí | - | |
dataairline_credits[]credit_code | string | Sí | - | |
dataairline_credits[]credit_amount | string | Sí | - | |
Notas operativas
Only gdsprovider "0" supports this flow. Store the returned cancellation id and confirm details before finalizing.
Ejemplo
bash
curl -X POST https://api.sandbox.travelandz.com/v1/flights/order/pending/cancel/0/order_123 \
-H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
-H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"