推送信号量

房价或房量发生变化时会推送对应酒店的通知信号。对接方在收到信号后,需根据消息内容调用房价和销售条款接口房量接口获取实时房价房量,拉取条件参考消息类型枚举

推送协议#

https POST

华住侧请求超时时间 request.timeout = 3s


说明#

1、正价房量变化时候,促销房量一定发生变化,因此对接方需要再拉取酒店对应的促销房量
2、正价房价发生变化时,促销价格一定发生变化,因此对接方需要再拉取酒店对应的促销房价
3、GDS初期会存在冗余房量变化推送的情况正价房量变为0时,需拉取时租房量

推送参数#

参数类型是否必填最大长度示例描述
hotelIdStringY3212**567华住酒店ID
startDateY-开始日期,格式:yyyy-MM-dd HH: mm: ss
endDateY-开始日期,格式:yyyy-MM-dd HH: mm: ss,变化时间不包含end这一天(start end如果同一天,需取start)
typeStringY20推送数据类型,参考枚举
roomTypeIdStringN20房型Id
activityIdStringN9促销id,正价商品变化该字段为空
timestampDateY-变化时间戳,格式:yyyy-MM-dd HH: mm: ss.fff
echoTokenStringY20UUID 用于双方定位问题

响应参数#

参数类型是否必填最大长度示例描述
statusStringY101状态码,1成功,-1失败
errorcodestringN50对接方自行定义
errormsgstringN500对接方自行定义,需描述清楚问题原因

报文示例#

Case1:指定房型正价房量变化#

请求示例#

{
"hotelId":"2011032",
"start":"2019-10-01 00:00:00",
"end":"2019-10-10 00:00:00",
"type":"Inventory",
"roomTypeId":"TR",
"activityId":"",
"timestamp":"2019-09-20 18:35:32.489",
"echoToken":"0525082e5fe04938ac688167ac4b9d2c"
}

Case2:所有房型、正价房价发生变化#

请求示例#

{
"hotelId":"2011032",
"start":"2019-10-01 00:00:00",
"end":"2019-10-10 00:00:00",
"type":"price",
"roomTypeId":"",
"activityId":"",
"timestamp":"2019-09-20 18:35:32.283",
"echoToken":"0525082e5fe04938ac688167ac4b9d2c"
}

Case3:指定房型、指定活动、促销房量发生变化#

请求示例#

{
"hotelId":"2011032",
"start":"2019-10-01 00:00:00",
"end":"2019-10-10 00:00:00",
"type":"promotionInventory",
"roomTypeId":"TR",
"activityId":"30300001",
"timestamp":"2019-09-20 18:35:32.230",
"echoToken":"0525082e5fe04938ac688167ac4b9d2c"
}

Case4:所有房型、所有活动、促销房价发生变化#

请求示例#

{
"hotelId":"2000505",
"start":"2019-10-01 00:00:00",
"end":"2019-10-10 00:00:00",
"type":"promotionprice",
"roomTypeId":"",
"activityId":"",
"timestamp":"2019-09-20 18:35:32.324",
"echoToken":"0525082e5fe04938ac688167ac4b9d2c"
}

Case5:指定房型、时租房房量发生变化#

请求示例#

{
"hotelId": "2000014",
"start": "2021-04-19 00:00:00",
"end": "2021-04-19 00:00:00",
"type": "hourRentRoomInventory",
"roomTypeId": "FR1",
"timestamp": "2021-04-19 17:53:50.585",
"echoToken": "hgds_2000014_1618826030585"
}

接收结果示例#

接收推送成功示例#

{
"status":1,
"errorcode":"",
"errormsg":""
}

结束推送失败示例#

{
"status":-1,
"errorcode":"12",
"errormsg":"酒店不可用"
}