POST/v1/hotels/offers

获取酒店房型报价

返回所选酒店和入住日期的房型、价格、膳食类型和取消政策。

分享

返回所选酒店和入住日期的房型、价格、膳食类型和取消政策。

接口

方法路径认证
POST/v1/hotels/offers需要 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.

Request Parameters

不需要路径参数或查询参数。

请求体

字段类型必填
languageenum
gdsprovider1 or 3
hotelCodestring
checkInYYYY-MM-DD
checkOutYYYY-MM-DD
countryCodestring
guestNationalitystring
minRatePricenumber
maxRatePricenumber
roomsroom[]

请求体结构

language
enum
eneszh
Default en
gdsprovider
number
hotelCode
string
checkIn
string
Format: YYYY-MM-DD
checkOut
string
Format: YYYY-MM-DD
countryCode
string
Format: 2 digits
guestNationality
string
Format: 2 digits
minRatePrice
number
maxRatePrice
number
rooms
array
rooms[]adults
number
Minimum value: 1, Maximum value: 4
rooms[]children
number
Minimum value: 0, Maximum value: 4
rooms[]childrenAges
array
rooms[]childrenAges[]
number[]
currency
enum
EURUSDCNY
Default EUR

成功响应

返回 hotel rooms, rates, cancellation policies and provider offer identifiers.

响应体结构

offers
array
offers[]roomNames
array
offers[]roomNames[]
string[]
offers[]minPrice
number
offers[]rates
array
offers[]rates[]gdsprovider
number
offers[]rates[]hotelCode
string
offers[]rates[]rateKey
string
offers[]rates[]adults
number
offers[]rates[]children
number
offers[]rates[]name
string
offers[]rates[]nameKey
string
offers[]rates[]board
string
offers[]rates[]boardKey
string
offers[]rates[]totalPrice
number
offers[]rates[]netPrice
number
offers[]rates[]originalPrice
number
offers[]rates[]currency
enum
EURUSDCNY
offers[]rates[]originalCurrency
enum
EURUSDCNY
offers[]rates[]supplements
array
offers[]rates[]supplements[]description
string
offers[]rates[]supplements[]price
number
offers[]rates[]supplements[]currency
string
offers[]rates[]cancellationPolicies
array
offers[]rates[]cancellationPolicies[]amount
number
offers[]rates[]cancellationPolicies[]fromDate
string
Format: ISO 8601
offers[]rates[]isRefundable
boolean
offers[]rates[]numberOfRooms
number
offers[]rates[]adultsPerRoom
array
offers[]rates[]adultsPerRoom[]
number[]
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 POST https://api.sandbox.travelandz.com/v1/hotels/offers \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE" \
  -H "Content-Type: application/json" \
  -d '<request_body_json>'