API console
Try it
Send a real request to the sandbox API and inspect the response.
Credentials
Log in to pick from your saved API keys instead of pasting them.
Path parameters
2 fieldsGDS provider
Global Distribution System used to source flight content. Select 0 for the default provider.
Order ID
Identifier of the order returned when the booking was created.
Request body
cURL request
curl -X POST 'https://api.sandbox.travelandz.com/v1/flights/order/cancel/0/:orderId' \
-H 'Authorization: Bearer YOUR_SECRET_KEY' \
-H 'X-Travelandz-Id: YOUR_PUBLIC_KEY:YOUR_PROFILE_CODE' \
-H 'Content-Type: application/json' \
-d '{"cancelId":"ore_0000B7awtcMBc20FXigs1Z","renewIfExpired":true}'Add your credentials to send a request.
Response
Click "Try it!" to send a request and see the response here.
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
gdsproviderorderIdRequest Body Schema
cancelIdrenewIfExpiredcancelId is expired, set to true to create and confirm a new pending cancellation automatically.Success Response
Returns the final public cancellation confirmation. Duffel responses include cancellation id, refund summary, confirmation date and liveMode.
Response Body Schema
messageorderIdcancellationIdrefundrefundtorefundamountrefundcurrencyconfirmedAtliveModeOperational Notes
cancelIdis optional. When provided for Duffel, Travelandz fetches and validates that cancellation before confirming it.- If the supplied
cancelIddoes not belong to the providedorderId, the API returns400. - If the supplied
cancelIdis expired andrenewIfExpiredis nottrue, the API returns400. - If the supplied
cancelIdis expired andrenewIfExpired=true, Travelandz creates a new pending cancellation, persists it internally and confirms the new cancellation instead. - If
cancelIdis omitted for Duffel, Travelandz creates, persists and confirms a new pending cancellation automatically. - Direct cancellation can fail when the booking is already ticketing or no longer cancellable.
Example
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","renewIfExpired":true}'Request Body - Example Value
{
"cancelId": "ore_0000B7awtcMBc20FXigs1Z",
"renewIfExpired": true
}Responses
| Code | Description |
|---|---|
200 | Flight order canceled successfully. |
400 | Bad request – invalid payload. |
401 | Unauthorized – invalid or missing credentials. |
403 | Forbidden – invalid credentials. |
500 | Internal server error |
200 Response Body
Media type: application/json
{
"message": "Order canceled successfully",
"orderId": "ord_0000B7aw6DtypHDaOdA5hV",
"cancellationId": "ore_0000B7awtcMBc20FXigs1Z",
"refund": {
"to": "balance",
"amount": "221.89",
"currency": "EUR"
},
"confirmedAt": "2026-06-22T15:50:48.458Z",
"liveMode": false
}