2.2.3 推送价格数据
约 1695 字大约 6 分钟
2025-04-24
提示
- 必须。
- 全量最新数据更新
- 所有的".*List"节点都支持多个
- 请注意
Restriction节点是全量数据更新,不是增量,若需要清空全部的Restriction,请传入{}即可 - 请注意
MealInfo节点是全量数据更新,不是增量
URL
/supplier/openapi/{supplierCode}/push/rates
入参
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
hotelId | String | true | 酒店 id 与idType 有关,klookHotelId或supplierHotelId 暂时先只支持 klookHotelId |
dailyRateDataList | list<DailyRateData> | true | 每日价列表 |
DailyRateData 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
roomId | String | true | 房型 id 与idType 有关,klookRoomId或supplierRoomId |
ratePlanId | String | true | 价格计划 id 与idType 有关 。"klookRatePlanId"或"supplierRatePlanId" |
dateRangeList | list<DateRange> | true | 时间范围列表 |
currency | String | false | 币种 标准币种 3 字码 |
inventory | Integer | false | 库存 |
mealInfo | MealInfo | false | 餐食信息 若不存在,则代表没有餐食 |
close | string | false | 是否关房处理 枚举: open,close ,等于null代表代表open,不限制 |
cta | string | false | 到达关闭 枚举: open,close ,等于null代表open,不限制 |
ctd | string | false | 离店关闭 枚举: open,close ,等于null代表open,不限制 |
restriction | Restriction | false | 限制条件 |
rateData | RateData | false | 价格数据 |
DateRange 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
start | String | true | 开始时间 YYYY-MM-DD 包含 start 和 end 最大间隔为 180 |
end | String | true | 截止时间 YYYY-MM-DD 包含 start 和 end 最大间隔为 180 |
MealInfo 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
meal | integer | true | 餐食类型 0:不含餐 1:早,2:午,3:早午,4:晚 5:早晚,6:午晚,7:早午晚 |
mealCount | integer | false | 餐食份数 -1:未给定 -100:按人数 大于 0:实际餐食份数 为空或者 -1 或者 -100 klook 侧目前会全部处理成餐食份数=人数 |
Restriction 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
minStayThrough | Integer | false | 全程最小连住天数 |
maxStayThrough | Integer | false | 全程最大连住天数 |
minStayArrival | Integer | false | 首日最小连住天数 |
maxStayArrival | Integer | false | 首日最大连住天数 |
minAdvanceDay | Integer | false | 最小提前预订天数 |
maxAdvanceDay | Integer | false | 最大提前预订天数 |
fpLos | String | false | FullPatten 模式连住限制 详细见 4.2.Restriction说明 |
RateData 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
type | integer | true | 1 :roomRate2:personRate |
roomRate | OpenApiBaseRate | false | 通用价格。房间价,与人数无关 roomRate 和 personRate 二选一 |
personRate | OpenApiPersonRate | false | 人数价格。roomRate 和 personRate 二选一 |
OpenApiBaseRate 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
amountBeforeTax | String | false | 税前价 |
amountAfterTax | String | true | 税后价 |
OpenApiPersonRate 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
basePersonRateList | list<BasePersonAmount> | false | 基础人数价格数据 |
extraAdultRate | BaseAmount | false | 额外成人价格数据 |
extraChildRate | ExtraChildRate | false | 额外小孩价格数据 详细见 4.3 Ajp价格说明 |
ExtraChildRate 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
childType | int | true | 0-Normal 成人数-儿童数 枚举列表1.ByAge 儿童年龄分段收费2.Free 儿童免费3.AsAdult 儿童算作成人a: 当 childType = 0(Normal),使用 childNormal 计算b: 当 childType = 1(ByAge),使用 childByAgeList 计算c: 当 childType = 2(Free)或者 3(AsAdult),忽略 childByAgeList 和 childNormal,进行人数转换后使用 basePersonRateList 计算最终价格 |
childByAgeList | list<ChildAgeRate> | false | 额外单个小孩价格数据- 儿童年龄分段 childType= 1 |
childNormal | BaseAmount | false | 额外单个小孩价格数据 childType= 0 |
ChildAgeRate 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
minAge | Integer | true | 最小年龄 |
maxAge | Integer | true | 最大年龄 |
amountBeforeTax | String | false | 税前价 |
amountAfterTax | String | true | 税后价 |
BasePersonAmount 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
childCount | Integer | true | 儿童数 |
adultCount | Integer | true | 成人数 |
amountBeforeTax | String | false | 税前价 |
amountAfterTax | String | true | 税后价 |
BaseAmount 说明
| 字段 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
amountBeforeTax | String | false | 税前价 |
amountAfterTax | String | true | 税后价 |
入参示例-全量数据(所有的list节点都支持多个)
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-07-03",
"end": "2025-07-03"
},
{
"start": "2025-07-05",
"end": "2025-07-07"
}
],
"currency": "SGD",
"inventory": 3,
"mealInfo": {
"meal": 1,
"mealCount": 2
},
"close": "open",
"cta": "close",
"ctd": "close",
"restriction": {
"maxStayArrival": 0,
"minAdvanceDay": 0,
"maxAdvanceDay": 0,
"fplos": "1111111"
},
"rateData": {
"type": 1,
"roomRate": {
"amountBeforeTax": "190",
"amountAfterTax": "200"
}
}
},
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-07-08",
"end": "2025-07-10"
}
],
"currency": "SGD",
"inventory": 10,
"mealInfo": {
"meal": 1,
"mealCount": 4
},
"close": "open",
"cta": "open",
"ctd": "open",
"restriction": {
"minStayThrough": 1,
"maxStayThrough": 1,
"minStayArrival": 1,
"maxStayArrival": 1,
"minAdvanceDay": 1,
"maxAdvanceDay": 1,
"fplos": "1111111"
},
"rateData": {
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountBeforeTax": "1191",
"amountAfterTax": "1100"
},
{
"childCount": 1,
"adultCount": 2,
"amountBeforeTax": "1192",
"amountAfterTax": "1110"
}
],
"extraAdultRate": {
"amountBeforeTax": "140",
"amountAfterTax": "150"
},
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "110",
"amountAfterTax": "110"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "120",
"amountAfterTax": "120"
}
]
}
}
}
},
{
"roomId": "4991",
"ratePlanId": "10482885",
"dateRangeList": [
{
"start": "2025-07-03",
"end": "2025-07-03"
}
],
"currency": "SGD",
"inventory": 3,
"mealInfo": {
"meal": 1,
"mealCount": 2
},
"close": "open",
"cta": "close",
"ctd": "close",
"restriction": null,
"rateData": {
"type": 1,
"roomRate": {
"amountBeforeTax": "190",
"amountAfterTax": "200"
},
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountBeforeTax": "91",
"amountAfterTax": "100"
},
{
"childCount": 1,
"adultCount": 2,
"amountBeforeTax": "92",
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountBeforeTax": "40",
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 0,
"childNormal": {
"amountBeforeTax": "8",
"amountAfterTax": "10"
}
}
}
}
},
{
"roomId": "4993",
"ratePlanId": "10482942",
"dateRangeList": [
{
"start": "2025-07-03",
"end": "2025-07-03"
}
],
"currency": "SGD",
"inventory": 3,
"mealInfo": {
"meal": 1,
"mealCount": 2
},
"close": "open",
"cta": "close",
"ctd": "close",
"restriction": {
"maxStayArrival": 0,
"minAdvanceDay": 0,
"maxAdvanceDay": 0,
"fplos": "1111111"
},
"rateData": {
"type": 1,
"roomRate": {
"amountBeforeTax": "190",
"amountAfterTax": "200"
},
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountBeforeTax": "91",
"amountAfterTax": "100"
},
{
"childCount": 1,
"adultCount": 2,
"amountBeforeTax": "92",
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountBeforeTax": "40",
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
}
}
}
}
],
"losRateDataList": []
}
}入参示例-增量数据(所有的list节点都支持多个)
增量数据-价格更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
}
],
"currency": "HKD",
"rateData": {
"type": 1,
"roomRate": {
"amountBeforeTax": "90",
"amountAfterTax": "100"
},
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountBeforeTax": "91",
"amountAfterTax": "100"
},
{
"childCount": 1,
"adultCount": 2,
"amountBeforeTax": "92",
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountBeforeTax": "40",
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
}
}
}
}
]
}
}增量数据-限制政策更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
}
],
"restriction": {
"minStayThrough": 1,
"maxStayThrough": 10,
"minStayArrival": 5,
"maxStayArrival": 10,
"minAdvanceDay": 0,
"maxAdvanceDay": 10,
"fplos": "1111111"
}
}
]
}
}增量数据-餐食更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
}
],
"mealInfo": {
"meal": 1,
"mealCount": 2
}
}
]
}
}增量数据-库存更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
},
{
"start": "2025-06-01",
"end": "2025-06-30"
}
],
"inventory": 10
}
]
}
}增量数据-关房更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
}
],
"close": "open"
}
]
}
}增量数据-到达关闭更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
}
],
"cta": "close"
}
]
}
}增量数据-离店关闭更新
{
"base": {
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId": "3850",
"dailyRateDataList": [
{
"roomId": "4991",
"ratePlanId": "10482884",
"dateRangeList": [
{
"start": "2025-05-01",
"end": "2025-05-30"
}
],
"ctd": "close"
}
]
}
}出参
标准空返回
出参示例
{
"success": true,
"error": {
"code": "",
"message": ""
}
}