获取动态售卖规则接口
一、接口名称:
getSaleRuleDirect
二、接口说明:
获取售卖规则和礼盒信息,渠道:None/Ctrip/Qunar /ChannelA/B2B
携程和非携程渠道的分开处理。目前仅返回售卖规则,暂不返回礼盒信息。
三、示例:
1、非携程渠道:
请求:
{
"supplierId":2274,
"hotelId":4870027,
"roomTypeList":[96817687,96820315], //一次不能超过30个房型
"startDate":"/Date(1517241600000+0800)/",
"endDate":"/Date(1517760000000+0800)/",
"channel":"B2B",
"requestor":{
"operatorName":"超级帐号test",
"opClientIP":"10.32.103.11",
userId":2099410
}
}
返回:
{
"ResponseStatus": {
"Timestamp": "/Date(1517398862437+0800)/",
"Ack": "Success",
"Errors": [],
"Build": null,
"Version": "v1",
"Extension": null
},
"resultStatus": {
"resultCode": 0, //响应码0:成功
"resultMsg": "success" //响应码非0时返回错误提示信息
},
"roomSaleRuleList": [
{
"supplierId": 2274,
"effectDate": "/Date(1517241600000+0800)/", //生效时间
"hotelId": 4870027,
"roomId": 96817687,
"roomGiftRule": { //非携程渠道的礼盒规则
"giftId": null, //礼盒Id
"takeEffectType": 1, //1:入住生效 2:离店生效 3:在店生效 "giftDesc": null //礼盒描述
},
"sellingRule": { //非携程渠道售卖规则
"latestconfirmTimeOfDays": 15, //最晚立即确认时间-天
"latestconfirmTimeOfHours": 14//最晚立即确认时间-小数
},
"ctripSellRule": null,//携程售卖规则,非携程渠道时为空
"ctripGiftRule": null//携程礼盒规则,非携程渠道时为空
},
……
]
}
2、 携程渠道:
请求:
{
"supplierId":2274,
"hotelId":4870027,
"roomTypeList":[96825475],
"startDate":""2018-01-31",
"endDate":""2018-01-31",
"channel":"Ctrip",
"requestor":{"
operatorName":"超级帐号test",
"opClientIP":"10.32.103.11",
"userId":2099410
}
}
返回:
{
"ResponseStatus": {
"Timestamp": "/Date(1517450467724+0800)/",
"Ack": "Success",
"Errors": [],
"Build": null,
"Version": "v1",
"Extension": null
},
"resultStatus": {
"resultCode": 0,
"resultMsg": "success"
},
"roomSaleRuleList": [
{
"supplierId": 2274,
"effectDate": "/Date(1517328000000+0800)/",
"hotelId": 4870027,
"roomId": 96825475,
"roomGiftRule": null,// 非携程渠道的礼盒规则,携程渠道时为空
"sellingRule": null,//非携程渠道售卖规则,携程渠道时为空
"ctripSellRule": { //携程渠道售卖规则
"latestconfirmTime": 203, //最晚立即确认时间,转化为小时数
//转化规则 days*24+24-hours = time
"latestBookingTime": 25, //最晚预定时间,转化为小时数
"cancelType": null,//保留字段,目前默认返回null
"cancelDetails": [ //列表中overduePaymentType为字母,则仅有一条记录,为数值则可能有多条,按照latestCancelTime倒序排列
{
"latestCancelTime": 23988, //最晚取消时间,转化为小时数,入住当天24点30个小时前取消扣款10%,30个小时后扣全款
"overduePaymentType": "0.1" //逾期扣款类型 F:扣首日 C:扣全款 数值:扣款百分比,1表示扣全款
},
{
"latestCancelTime": 30,
"overduePaymentType": "1.0"
}
]
},
"ctripGiftRule": {//携程礼盒规则
"96825475,2018-01-31": ",2407489," //key:Roomid,effectDate value:giftId
}
}
]
}