GET/v1/hotels/book/:gdsprovider/:reference

查询酒店预订

通过供应方和预订 reference 读取酒店预订的当前状态。

分享

通过供应方和预订 reference 读取酒店预订的当前状态。

接口

方法路径认证
GET/v1/hotels/book/:gdsprovider/:reference需要 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是
reference
string是

请求体

不需要请求体。

成功响应

返回 booking status

响应体结构

status
enum
confirmedcanceled
是
liveMode
boolean是
True when the request is served by the live Travelandz environment. This value comes from Travelandz, not the provider payload.

示例

bash
bash
curl -X GET https://api.sandbox.travelandz.com/v1/hotels/book/:gdsprovider/:reference \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"