POST/v1/flights/order/pending/cancel/:gdsprovider/:orderId
Créer une annulation de vol en attente
Starts a pending cancellation flow so the integration can review refund data, penalties or provider confirmation before final cancellation.
Starts a pending cancellation flow so the integration can review refund data, penalties or provider confirmation before final cancellation.
Endpoint
| Method | Path | Auth |
|---|---|---|
POST | /v1/flights/order/pending/cancel/:gdsprovider/:orderId | Required API key |
| Header | Description |
|---|---|
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. |
Request Params Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
gdsprovider | number | Yes | Only gdsprovider "0" supports this flow | |
orderId | string | Yes | - |
Success Response
Returns the pending cancellation id and provider state.
Response Body Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
data | object | Yes | - | |
datarefund_to | string | Yes | - | |
datarefund_currency | string | Yes | - | |
datarefund_amount | string | Yes | - | |
dataorder_id | string | Yes | - | |
datalive_mode | boolean | Yes | - | |
dataid | string | Yes | - | |
dataexpires_at | string | Format: ISO 8601 | Yes | - |
datacreated_at | string | Format: ISO 8601 | Yes | - |
dataconfirmed_at | string | Format: ISO 8601 | Yes | - |
dataairline_credits | array | Yes | - | |
dataairline_credits[]passenger_id | string | Yes | - | |
dataairline_credits[]issued_on | string | Format: ISO 8601 | Yes | - |
dataairline_credits[]id | string | Yes | - | |
dataairline_credits[]credit_name | string | Yes | - | |
dataairline_credits[]credit_currency | string | Yes | - | |
dataairline_credits[]credit_code | string | Yes | - | |
dataairline_credits[]credit_amount | string | Yes | - | |
Operational Notes
Only gdsprovider "0" supports this flow. Store the returned cancellation id and confirm details before finalizing.
Example
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"