POST/v1/flights/order/cancel/:gdsprovider/:orderId
Annuler une commande de vol
Requests cancellation of an existing flight order, optionally using a cancellation id from a pending cancellation flow.
Requests cancellation of an existing flight order, optionally using a cancellation id from a pending cancellation flow.
Endpoint
| Method | Path | Auth |
|---|---|---|
POST | /v1/flights/order/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 | - | |
orderId | string | Yes | - |
Request Body Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
cancelId | string | No | - |
Success Response
Returns message of cancellation
Response Body Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
message | string | Yes | - |
Operational Notes
- Send
cancelIdwhen a pending cancellation was already created. IfcancelIdis 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.
Example
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"}'