AvailabilityPeer(推模式)
修改于: 2023-07-04 16:53
旧版文档将于2025年11月30日下线,您可以查看新版或了解更新日志。
TABLE OF CONTENTS
介绍
AvailabilityPeer 是由渠道实现,供 GO 从渠道系统同步酒店列表、产品列表以及推送房价、房态及库存数据到其系统的一组接口。
AvailabilityPeer 支持两种类型的价格模型:Daily 和 LOS,并根据酒店房价模型推送相应 ARI 数据到渠道
- ping(/ping)- 用于GO调用此接口来验证渠道系统是否正常工作。
- 酒店API - 用于渠道返回最新的上线酒店列表以及售卖产品列表。GO 定时调用此接口从渠道同步这些信息,并作为 ARI 推送的依据之一。
- 酒店列表(/hotels/{supplierId})- 渠道返回最新的酒店列表
- 酒店产品(/Hotel/{supplierId}/{hotelId}) - 渠道返回已激活(已上线)的产品列表
- ARI推送API - 用于渠道接收 GO 推送的 ARI 数据,并缓存到系统。
- Daily ARI 推送(/ari/daily/push)- 渠道接收 GO 推送的 Daily ARI 数据
- LOS ARI 推送(/ari/LOS/push)- 渠道接收 GO 推送的 LOS ARI 数据
Ping
用于GO调用此接口来验证渠道系统是否正常工作。
GET /ping HTTP/1.1
URL: {{endpoint}}/ping
Authorization:Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8响应示例
成功响应(HTTP状态200)
"ok"
错误响应(HTTP状态401)
{
"error": "Key not authorised"
}错误响应(HTTP状态500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}酒店列表
渠道通过此接口返回最新的酒店列表,GO 将定时同步此列表,并根据酒店状态判定是否推送其酒店的 ARI 数据。
GET /hotels/{supplierId} HTTP/1.1
URL: {{endpoint}}/hotels/{supplierId}
Authorization:Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8请求参数
名称 | 描述 | 必传字段? | 类型 | 示例 |
|---|---|---|---|---|
supplierId | 酒店集团 ID | Yes | string | HILTON |
响应示例
成功响应(HTTP状态200)
[
{
"supplierId": "HILTON",
"hotelId": "GATHI",
"status": "Actived"
}
]错误响应(HTTP状态401)
{
"error": "Key not authorised"
}错误响应(HTTP状态500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}响应规范
属性 | 类型 | 必传字段? | 描述 | 示例 |
|---|---|---|---|---|
supplierId | string | Yes | 酒店集团 ID | HILTON |
hotelId | string | Yes | 酒店代码 | GATHI |
status | enum | Yes | 枚举:[Activted,Deactived] 酒店激活/停用状态 | Actived |
酒店产品
渠道返回已激活(已上线)的产品列表,GO 将定时调用此接口从渠道同步。当 ARI Push 当并根据产品列表及状态来推送 ARI 数据。
GET /hotel/{supplierId}/{hotelId} HTTP/1.1
URL: {{endpoint}}/hotel/{supplierId}/{hotelId}
Authorization:Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8请求参数
名称 | 描述 | 必传字段? | 类型 | 示例 |
|---|---|---|---|---|
supplierId | 酒店集团 ID | Yes | string | HILTON |
hotelId | 酒店代码 | Yes | string | GATHI |
响应示例
成功响应(HTTP状态200)
{
"supplierId": "HILTON",
"hotelId": "GATHI",
"status": "Actived",
"settings": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ariType": "Daily",
"rateType": "AmountBeforeTax",
"products": [
{
"roomId": "K1",
"rateId": "CBAR",
"status": "Actived",
"roomName": "Double Room",
"rateName": "Bar Rate",
"occupancy": {
"maxAdult": 3,
"maxChild": 2,
"maxOccupancy": 3
}
}
]
}错误响应(HTTP状态401)
{
"error": "Key not authorised"
}错误响应(HTTP状态500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}响应规范
属性 | 类型 | 必传字段? | 描述 | 示例 |
|---|---|---|---|---|
supplierId | string | Yes | 酒店集团 ID | HILTON |
hotelId | string | Yes | 酒店代码 | GATHI |
status | enum | Yes | 枚举:[Actived, Deactived] 酒店状态 | Actived |
settings | object | Yes | 用于传输扩展字段或额外属性等 | "settings": { |
ariType | enum | Yes | 枚举:[ Daily, LOS ] 指示 ARI API 推送时的 ARI 类型。 | Daily |
rateType | enum | Yes | 枚举:[AmountBeforeTax、AmountAfterTax、Both] 标示 ARI 和预订中使用的价格类型。 AmountBeforeTax:GO 推送税前价给渠道,并且渠道发送预订请求时传送税前价给 GO AmountAfterTax:GO 推送税后价给渠道,并且渠道发送预订请求时传送税后价给 GO Both:GO 推送税前价和税后价给渠道,并且渠道发送预订请求时传送税前价和税后价给 GO | AmountBeforeTax |
products | array | Yes | / | / |
@roomId | string | Yes | 房型代码 | King |
@rateId | string | Yes | 价格计划代码 | BAR |
@status | enum | Yes | 枚举: [ Actived, Deactived] | Actived |
@roomName | string | No | 房间类型名称 | King Room |
@rateName | string | No | 价格计划名称 | Best Available Rate |
products/occupancy | object | Yes | / | / |
@maxAdult | integer | Yes | 最大成人数 | 3 |
@maxChild | integer | Yes | 最大小孩数 | 2 |
@maxOccupancy | integer | Yes | 最大入住人数 | 3 |
Daily ARI 推送
GO 调用此接口推送 Dialy ARI 到渠道系统
POST /ari/daily/push HTTP/1.1
URL: {{endpoint}}/ari/daily/push
Authorization:Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8请求示例
Occupancy Rate
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"messageType": "Delta",
"hotelId": "GATHI",
"dateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
},
"currency": "USD",
"dailyAris": [
{
"roomId": "K1",
"rateId": "BARB",
"mealPlans": [
"BB",
"BB",
"BB",
"BB"
],
"inventories": [
9,
0,
9,
9
],
"rates": {
"type": "OccupancyRate",
"rates": [
{
"adultCount": 2,
"childCount": 1,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
623.23,
623.23,
623.23,
623.23
]
}
]
},
"availStatuses": {
"close": [
false,
false,
false,
false
],
"minStayArrival": [
0,
2,
0,
0
],
"maxStayArrival": [
0,
2,
0,
0
],
"minStayThrough": [
0,
2,
0,
0
],
"maxStayThrough": [
0,
2,
0,
0
],
"minAdvanceDay": [
0,
2,
0,
0
],
"maxAdvanceDay": [
365,
365,
365,
365
],
"cta": [
false,
false,
false,
true
],
"ctd": [
false,
false,
false,
true
],
"fplos": [
"1111111",
"1001111",
"1000001",
"0000000"
]
},
"rateChangeIndicators": [
true,
false,
true,
false
]
}
]
}带小孩价的Occupancy Rate模型
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"messageType": "Delta",
"hotelId": "GATHI",
"dateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
},
"currency": "USD",
"dailyAris": [
{
"roomId": "K1",
"rateId": "BARB",
"mealPlans": [
"BB",
"BB",
"BB",
"BB"
],
"inventories": [
9,
0,
9,
9
],
"rates": {
"extraChildRates": [
{
"amountAfterTax": [
50.00,
50.00,
50.00,
50.00
],
"amountBeforeTax": [
40.00,
40.00,
40.00,
40.00
],
"maxAge": 2,
"minAge": 0
},
{
"amountAfterTax": [
60.00,
60.00,
60.00,
60.00
],
"amountBeforeTax": [
50.00,
50.00,
50.00,
50.00
],
"maxAge": 8,
"minAge": 3
},
{
"amountAfterTax": [
70.00,
70.00,
70.00,
70.00
],
"amountBeforeTax": [
60.00,
60.00,
60.00,
60.00
],
"maxAge": 17,
"minAge": 9
}
],
"type": "OccupancyRate",
"rates": [
{
"adultCount": 1,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
623.23,
623.23,
623.23,
623.23
]
},
{
"adultCount": 2,
"amountBeforeTax": [
520.19,
520.19,
520.19,
520.19
],
"amountAfterTax": [
641.23,
641.23,
641.23,
641.23
]
}
]
},
"availStatuses": {
"close": [
false,
false,
false,
false
],
"minStayArrival": [
0,
2,
0,
0
],
"maxStayArrival": [
0,
2,
0,
0
],
"minStayThrough": [
0,
2,
0,
0
],
"maxStayThrough": [
0,
2,
0,
0
],
"minAdvanceDay": [
0,
2,
0,
0
],
"maxAdvanceDay": [
365,
365,
365,
365
],
"cta": [
false,
false,
false,
true
],
"ctd": [
false,
false,
false,
true
],
"fplos": [
"1111111",
"1001111",
"1000001",
"0000000"
]
},
"rateChangeIndicators": [
true,
false,
true,
false
]
}
]
}- 补全成人与儿童组合价
Notes: 如果酒店集团的小孩入住政策为免费,但是酒店并没有提供完整的成人与儿童组合价。此时GO支持补全这些组合价。例如:酒店的最大入住人数为4,最大入住成人数为3,最大入住儿童数为2,儿童入住免费。但是酒店只提供了成人价,并没有提供完整的成人与儿童组合价,此时GO支持补全组合价如:3A1C、3A0C、2A2C、2A1C、2A0C、1A1C、1A0C *** 该功能会增加 ARI 推送流量,默认关闭。如果您想启用它,请联系您的客户经理了解更多详细信息。
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"messageType": "Delta",
"hotelId": "GATHI",
"dateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
},
"currency": "USD",
"dailyAris": [
{
"roomId": "K1",
"rateId": "BARB",
"mealPlans": [
"BB",
"BB",
"BB",
"BB"
],
"inventories": [
9,
0,
9,
9
],
"rates": {
"type": "OccupancyRate",
"rates": [
{
"adultCount": 1,
"childCount": 0,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
},
{
"adultCount": 1,
"childCount": 1,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
},
{
"adultCount": 2,
"childCount": 0,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
},
{
"adultCount": 2,
"childCount": 1,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
},
{
"adultCount": 2,
"childCount": 2,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
},
{
"adultCount": 3,
"childCount": 0,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
},
{
"adultCount": 3,
"childCount": 1,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
523.23,
523.23,
523.23,
523.23
]
}
]
},
"availStatuses": {
"close": [
false,
false,
false,
false
],
"minStayArrival": [
0,
2,
0,
0
],
"maxStayArrival": [
0,
2,
0,
0
],
"minStayThrough": [
0,
2,
0,
0
],
"maxStayThrough": [
0,
2,
0,
0
],
"minAdvanceDay": [
0,
2,
0,
0
],
"maxAdvanceDay": [
365,
365,
365,
365
],
"cta": [
false,
false,
false,
true
],
"ctd": [
false,
false,
false,
true
],
"fplos": [
"1111111",
"1001111",
"1000001",
"0000000"
]
},
"rateChangeIndicators": [
true,
false,
true,
false
]
}
]
}请求规范
属性 | 类型 | 必传字段? | 描述 | 示例 |
|---|---|---|---|---|
header | object | Yes | / | / |
@supplierId | string | Yes | 最大长度:32 酒店集团 ID | HILTON |
@distributorId | string | Yes | 最大长度:32 渠道 ID | GTA |
@version | string | Yes | 最大长度:20 API版本 | v4 |
@token | string | Yes | 最大长度:64 用于标识请求和响应的唯一ID,通常应为UUID | 18393849028490234 |
| messageType | enum | No | 枚举:[Delta(增量),Overlay(全量)] 默认类型为全量推送 | Delta |
hotelId | string | Yes | 酒店代码 | GATHI |
dateRange | object | Yes | 日期范围 | / |
@startDate | string | Yes | 开始日期,格式为yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | 结束日期,格式为yyyy-MM-dd | 2018-01-04 |
currency | string | Yes | 币种代码[ISO-4217] | USD |
dailyAris | array | Yes | 日期范围内的每日价和房间库存 | / |
@roomId | string | Yes | 房型代码 | 10000101 |
@rateId | string | Yes | 价格计划代码 | 123456 |
@mealPlans | array[string] | No | 餐食计划 | [ "BB", "BB", "BB", "BB" ] |
@inventories | array[integer] | Yes | 房量/库存 | [ 9, 0, 9, 9 ] |
dailyAris / rates | / | Yes | / | / |
@type | enum | Yes | 枚举:[OccupancyRate,CommonRate] 指示要使用的费率模型 | / |
rates / rates | array[object] | Yes | 如果是“CommonRate”,则不会显示该节点 | / |
@adultCount | integer | No | 如果是“CommonRate ”,则不会显示该节点 | / |
@childCount | integer | No | CommonRate,则不会显示该节点 | / |
@amountBeforeTax | array[number] | No | / | [ 502.19, 502.19, 502.19, 502.19 ] |
@amountAfterTax | array[number] | No | / | [ 623.23, 623.23, 623.23, 623.23 ] |
dailyAris / availStatuses | / | / | / | / |
@close | array[boolean] | Yes | 是否关房 true 表示房态为关房 false 表示房态为可住 | [ false, false, false, false ] |
@minStayArrival | array[integer] | No | 最少入住天数,0 值表示无限制 | [ 0, 2, 0, 0 ] |
@maxStayArrival | array[integer] | No | 最大入住天数,0 值表示无限制 | [ 0, 2, 0, 0 ] |
@minStayThrough | array[integer] | No | 如果入住跨越此天,最少入住天数,0 值表示无限制 | [ 0, 2, 0, 0 ] |
@maxStayThrough | array[integer] | No | 如果入住跨越此天,最大入住天数,0 值表示无限制 | [ 0, 2, 0, 0 ] |
@minAdvanceDay | array[integer] | No | 最少提前几天预订,0 值表示无限制 | [ 0, 2, 0, 0 ] |
@maxAdvanceDay | array[integer] | No | 最大提前几天预订,0 值表示无限制 | [ 365, 365, 365, 365 ] |
@cta | array[boolean] | No | Closed to Arrival, 如果为true, 表示当天不可预订 | [ false, false, false, true ] |
@ctd | array[boolean] | No | 如果为true, 表示当天不可离店 | [ false, false, false, true ] |
@fplos | array[string] | No | Full Pattern Length of Stay, 表示连住几晚是否可住 0值 表示不可住 | [ "1111111", "1001111", "1000001", "0000000" ] |
dailyAris / rateChangeIndicators | array[boolean] | No | 房价变化标识 | [ true, false, true, false ] |
响应示例
成功响应(HTTP状态200)
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"hotelId": "GATHI",
"updateDateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
}
}错误响应(HTTP状态403)
{
"errorCode": "InvalidField",
"errorMessage": " Unauthorized token"
}错误响应(HTTP状态500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}响应规范
属性 | 类型 | 必传字段? | 描述 | 示例 |
|---|---|---|---|---|
header | object | Yes | / | / |
@supplierId | string | Yes | 最大长度:32 酒店集团 ID | HILTON |
@distributorId | string | Yes | 最大长度:32 渠道 ID | GTA |
@version | string | Yes | 最大长度:20 API版本 | v4 |
@token | string | Yes | 最大长度:64 用于标识请求和响应的唯一ID,通常应为UUID | 18393849028490234 |
hotelId | string | Yes | 酒店代码 | GATHI |
updateDateRange | object | Yes | 日期范围 | / |
@startDate | string | Yes | 开始日期,格式为yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | 结束日期,格式为yyyy-MM-dd | 2018-01-04 |
LOS 价格推送
GO 调用此接口推送 LOS ARI 到渠道系统
POST /ari/los/push HTTP/1.1
URL: {{endpoint}}/ari/los/push
Authorization:Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8请求示例
- Occupancy Rate
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"messageType": "Delta",
"hotelId": "GATHI",
"dateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
},
"currency": "USD",
"losAris": [
{
"roomId": "K1",
"rateId": "BARB",
"los": 1,
"mealPlans": [
"BB",
"BB",
"RO",
"BB"
],
"inventories": [
9,
0,
9,
9
],
"rates": {
"type": "OccupancyRate",
"rates": [
{
"adultCount": 2,
"childCount": 1,
"amountBeforeTax": [
502.19,
502.19,
502.19,
502.19
],
"amountAfterTax": [
623.23,
623.23,
623.23,
623.23
]
}
]
}
}
]
}- 带小孩价的Occupancy Rate模型
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"messageType": "Delta",
"hotelId": "GATHI",
"dateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
},
"currency": "USD",
"losAris": [
{
"roomId": "K1",
"rateId": "BARB",
"los": 1,
"mealPlans": [
"BB",
"BB",
"RO",
"BB"
],
"inventories": [
9,
0,
9,
9
],
"rates": {
"extraChildRates": [
{
"minAge": 0,
"maxAge": 2,
"amountAfterTax": [
50.00,
50.00,
50.00,
50.00
],
"amountBeforeTax": [
40.00,
40.00,
40.00,
40.00
]
},
{
"minAge": 3,
"maxAge": 8,
"amountAfterTax": [
60.00,
60.00,
60.00,
60.00
],
"amountBeforeTax": [
50.00,
50.00,
50.00,
50.00
]
},
{
"minAge": 9,
"maxAge": 17,
"amountAfterTax": [
70.00,
70.00,
70.00,
70.00
],
"amountBeforeTax": [
60.00,
60.00,
60.00,
60.00
]
}
],
"type": "OccupancyRate",
"rates": [
{
"adultCount": 2,
"childCount": 0,
"amountBeforeTax": [
200.00,
200.00,
200.00,
200.00
],
"amountAfterTax": [
220.00,
220.00,
220.00,
220.00
]
},
{
"adultCount": 1,
"childCount": 0,
"amountBeforeTax": [
160.00,
160.00,
160.00,
160.00
],
"amountAfterTax": [
192.00,
192.00,
192.00,
192.00
]
}
]
}
},
{
"roomId": "K1",
"rateId": "BARB",
"los": 2,
"mealPlans": [
"BB",
"BB",
"RO",
"BB"
],
"inventories": [
9,
0,
9,
9
],
"rates": {
"extraChildRates": [
{
"minAge": 0,
"maxAge": 2,
"amountAfterTax": [
100.00,
100.00,
100.00,
100.00
],
"amountBeforeTax": [
80.00,
80.00,
80.00,
80.00
]
},
{
"minAge": 3,
"maxAge": 8,
"amountAfterTax": [
120.00,
120.00,
120.00,
120.00
],
"amountBeforeTax": [
100.00,
100.00,
100.00,
100.00
]
},
{
"minAge": 9,
"maxAge": 17,
"amountAfterTax": [
140.00,
140.00,
140.00,
140.00
],
"amountBeforeTax": [
120.00,
120.00,
120.00,
120.00
]
}
],
"type": "OccupancyRate",
"rates": [
{
"adultCount": 2,
"childCount": 0,
"amountBeforeTax": [
400.00,
400.00,
400.00,
400.00
],
"amountAfterTax": [
440.00,
440.00,
440.00,
440.00
]
},
{
"adultCount": 1,
"childCount": 0,
"amountBeforeTax": [
320.00,
320.00,
320.00,
320.00
],
"amountAfterTax": [
384.00,
384.00,
384.00,
384.00
]
}
]
}
}
]
}- All possible occupancy combination补全成人与儿童组合价
Notes: 如果酒店集团的小孩入住政策为免费,但是酒店并没有提供完整的成人与儿童组合价。此时GO支持补全这些组合价。例如:酒店的最大入住人数为4,最大入住成人数为3,最大入住儿童数为2,儿童入住免费。但是酒店只提供了成人价,并没有提供完整的成人与儿童组合价,此时GO支持补全组合价如:3A1C、3A0C、2A2C、2A1C、2A0C、1A1C、1A0C *** 该功能会增加 ARI 推送流量,默认关闭。如果您想启用它,请联系您的客户经理了解更多详细信息。
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"messageType": "Delta",
"hotelId": "GATHI",
"dateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-07"
},
"currency": "USD",
"losAris": [
{
"roomId": "NCAA",
"rateId": "LHGKX",
"los": 1,
"mealPlans": [
"BB",
"BB",
"BB",
"BB",
"BB",
"BB",
"BB"
],
"inventories": [
0,
0,
0,
0,
1,
1,
1
],
"rates": {
"rates": [
{
"adultCount": 1,
"childCount": 0,
"amountBeforeTax": [
183.01,
141,
166,
176,
176,
158,
182
]
},
{
"adultCount": 1,
"childCount": 1,
"amountBeforeTax": [
183.01,
141,
166,
176,
176,
158,
182
]
},
{
"adultCount": 2,
"childCount": 0,
"amountBeforeTax": [
183.01,
141,
166,
176,
176,
158,
182
]
},
{
"adultCount": 2,
"childCount": 1,
"amountBeforeTax": [
183.01,
141,
166,
176,
176,
158,
182
]
},
{
"adultCount": 2,
"childCount": 2,
"amountBeforeTax": [
183.01,
141,
166,
176,
176,
158,
182
]
},
{
"adultCount": 3,
"childCount": 0,
"amountBeforeTax": [
191.85,
149.87,
175.07,
184.84,
184.84,
166.83,
190.84
]
},
{
"adultCount": 3,
"childCount": 1,
"amountBeforeTax": [
191.85,
149.87,
175.07,
184.84,
184.84,
166.83,
190.84
]
}
],
"type": "OccupancyRate"
}
}
]
}请求规范
属性 | 类型 | 必传字段? | 描述 | 示例 |
|---|---|---|---|---|
header | object | Yes | / | / |
@supplierId | string | Yes | 最大长度:32 酒店集团 ID | HILTON |
@distributorId | string | Yes | 最大长度:32 渠道 ID | GTA |
@version | string | Yes | 最大长度:20 API版本 | v4 |
@token | string | Yes | 最大长度:64 用于标识请求和响应的唯一ID,通常应为UUID | 18393849028490234 |
| messageType | enum | No | 枚举:[Delta(增量),Overlay(全量)] 省略属性表示消息类型为全量推送 | Delta |
hotelId | string | Yes | 酒店代码 | GATHI |
dateRange | object | Yes | 日期范围 | / |
@startDate | string | Yes | 开始日期,格式为yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | 结束日期,格式为yyyy-MM-dd | 2018-01-04 |
currency | string | Yes | 币种代码[ISO-4217] | USD |
losAris | array | Yes | 表示连住几晚的价格和房量。如果没有可用的价格,则表示酒店已关闭。如果可用房价仅适用于某些房型,则意味着其他房型已关闭。 | / |
@roomId | string | Yes | 房型代码 | 10000101 |
@rateId | string | Yes | 价格计划代码 | 123456 |
@los | integer | Yes | 表示连住 | 1 |
@mealPlans | array[string] | No | 每日期餐食计划 | [ "BB", "BB", "BB", "BB" ] |
@inventories | array[integer] | Yes | 每日房量/库存 | [ 9, 0, 9, 9 ] |
losAris / rates | / | Yes | / | / |
@type | enum | Yes | 枚举:[OccupancyRate,CommonRate] 指示要使用的价格模型:OccupancyRate或CommonRate。 | / |
rates / rates | array[object] | Yes | 如果该节点是“CommonRate”,则不会显示该节点。 | / |
@adultCount | integer | No | 如果该节点是“CommonRate”,则不会显示该节点。 | / |
@childCount | integer | No | 如果该节点是“CommonRate”,则不会显示该节点。 | / |
@amountBeforeTax | array[number] | No | / | [ 502.19, 502.19, 502.19, 502.19 ] |
@amountAfterTax | array[number] | No | / | [ 623.23, 623.23, 623.23, 623.23 ] |
rates / extraChildRates | object | No | byAge 类型的儿童价是由 OccupancyRate的子节点 extraChildRates 来提供。且酒店必须提供最大儿童年龄信息(maxChildAge) | / |
@minAge | integer | Yes | 最小儿童年龄,值大于或等于零 | 0 |
@maxAge | integer | Yes | 最大儿童年龄,值小于或等于maxChildAge | 2 |
@amountBeforeTax | array[number] | No | / | [ 40, 40 ] |
@amountAfterTax | array[number] | No | / | [ 40, 40 ] |
extensions | object | No | 用于额外属性或设置等 | / |
响应示例
成功响应(HTTP状态200)
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v4",
"token": "18393849028490234"
},
"hotelId": "GATHI",
"updateDateRange": {
"startDate": "2018-01-01",
"endDate": "2018-01-04"
}
}错误响应(HTTP状态403)
{
"errorCode": "InvalidField",
"errorMessage": " Unauthorized token"
}错误响应(HTTP状态500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}响应规范
属性 | 类型 | 必传字段? | 描述 | 示例 |
|---|---|---|---|---|
header | object | Yes | / | / |
@supplierId | string | Yes | 最大长度:32 酒店集团 ID | HILTON |
@distributorId | string | Yes | 最大长度:32 渠道 ID | GTA |
@version | string | Yes | 最大长度:20 API版本 | v4 |
@token | string | Yes | 最大长度:64 用于标识请求和响应的唯一ID,通常应为UUI。 | 18393849028490234 |
hotelId | string | Yes | 酒店代码 | GATHI |
updateDateRange | object | Yes | 日期范围 | / |
@startDate | string | Yes | 开始日期,格式为yyyy-MM-dd | 2018-01-01 |
@endDate | string | Yes | 结束日期,格式为yyyy-MM-dd | 2018-01-04 |
此回答是否有所帮助? 是 否
Send feedback