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

创建待确认航班取消

启动待确认取消流程,以便在最终取消前查看退款、罚金或供应方确认信息。

分享
POST/v1/flights/order/pending/cancel/:gdsprovider/:orderId

API 控制台

试一试

向沙箱 API 发送真实请求并查看响应。

凭证

登录后即可从已保存的 API 密钥中选择,无需手动粘贴。

路径参数

2 个字段

GDS 提供方

用于获取航班内容的全球分销系统。选择 0 使用默认提供方。

Order ID

创建预订时返回的订单标识符。

cURL 请求

cURL
bash
curl -X POST 'https://api.sandbox.travelandz.com/v1/flights/order/pending/cancel/0/:orderId' \
  -H 'Authorization: Bearer YOUR_SECRET_KEY' \
  -H 'X-Travelandz-Id: YOUR_PUBLIC_KEY:YOUR_PROFILE_CODE'

请填写凭证以发送请求。

响应

点击「试一试!」发送请求,响应将显示在此处。

启动待确认取消流程,以便在最终取消前查看退款、罚金或供应方确认信息。

接口

方法路径认证
POST/v1/flights/order/pending/cancel/:gdsprovider/:orderId需要 API key
必需请求头:
Header说明
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.

请求参数结构

gdsprovider
number
Only gdsprovider "0" supports this flow
orderId
string

请求体

不需要请求体。

成功响应

返回 the pending cancellation id, refund context, dates, airline credits and liveMode.

响应体结构

cancellationId
string
orderId
string
refund
object
refundto
string
refundamount
string
refundcurrency
string
createdAt
string
Format: ISO 8601
expiresAt
string
Format: ISO 8601
confirmedAt
string
Format: ISO 8601
可为空
airlineCredits
array
airlineCredits[]passengerId
string
airlineCredits[]issuedOn
string
Format: ISO 8601
airlineCredits[]id
string
airlineCredits[]creditName
string
airlineCredits[]creditCurrency
string
airlineCredits[]creditCode
string
airlineCredits[]creditAmount
string
liveMode
boolean
True when the request is served by the live Travelandz environment. This value comes from Travelandz, not the provider payload.

集成说明

Only gdsprovider "0" supports this flow. Travelandz returns the adapted public cancellation payload and persists the pending cancellation internally.

示例

bash
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"

响应

状态码说明
200Pending flight cancellation created successfully.
400请求无效:payload 不合法。
401未授权:凭证无效或缺失。
403禁止访问:凭证无效。
500服务器内部错误

200 响应体

媒体类型:application/json

json
json
{
  "cancellationId": "ore_0000B7awtcMBc20FXigs1Z",
  "orderId": "ord_0000B7aw6DtypHDaOdA5hV",
  "refund": {
    "to": "balance",
    "amount": "221.89",
    "currency": "EUR"
  },
  "createdAt": "2026-06-22T15:07:18.622Z",
  "expiresAt": "2026-06-22T16:07:18.000Z",
  "confirmedAt": null,
  "airlineCredits": [],
  "liveMode": false
}