直连推送报价等数据接口
一、接口名称:
batchPushRoomData
调用频次:1次/s 如需提高频次,请联系代理通业务人员
测试环境 http://m.fat.ctripqa.com/restapi/soa2/13353/batchPushRoomData
生产环境 http://m.ctrip.com/restapi/soa2/13353/batchPushRoomData
二、说明:
(异步处理,不能马上返回错误) 此接口为直连供应商推送房型数据提供,请求返回参数均为json格式内容,房价、采购价、房量、房态和动态售卖规则数据均使用同一接口。 多个房型涉及的天数不能大于200(房型个数*天数)。 多个房型涉及的天数如果超过或者等于150(房型个数*天数),数据会直接进入慢队列,处理速度会低于正常推送数据,可能导致结果延时。 推送的数据均为异步处理,处理结果不会马上返回。 新建的房型请延迟6分钟以上推送数据,否则数据可能会有问题(系统有缓存,会有一定延迟导致)。 接口有重复性检验,开始日期+结束日期+渠道+具体的数据,如果和上次一样,会报重复的错。 注意:房态房价房量可以单独推送,并且不要重复推送相同的值房价推送渠道包括: Ctrip,Qunar, QunarB,QunarD,QunarY,QunarT ,B2B ,ChannelA,B2BOffline;不再支持Share,Elong 房量推送渠道包括: ctrip,qunar , b2b, channela,share;不再支持Elong 房态推送渠道包括 Ctrip,Qunar ,B2B,ChannelA,Share;不再支持Elong 动态售卖规则渠道包括:Qunar ,ChannelA,B2B和携程渠道(Ctrip);不再支持Elong
三、输入参数:
| 父节点 | 名称 | 编码 | 类型 | 必填 | 描述 |
|---|---|---|---|---|---|
| 供应商ID | supplierId | int | 是 | ||
| 酒店Id | hotelId | int | 是 | ||
| pushQunatityType | int | 否 | 房量推送类型 | ||
| 房型推送数据实体 | roomDataEntitys | List |
是 | ||
| roomDataEntitys | 房型Id | roomId | long | 是 | |
| roomDataEntitys | 开始日期 | startDate | datetime | 是 | |
| roomDataEntitys | 结束日期 | endDate | datetime | 是 | |
| roomDataEntitys | week day生效标识,第几个字符为1表示周几生效,例如周一二三生效为1110000 | weekDayIndex | string | 否 | 若不传,则默认为“1111111” |
| roomDataEntitys | 房价推送实体 | roomPriceModel | RoomPriceModel | 否 | |
| roomPriceModel | 房价 | roomPrice | decimal | 是 | |
| roomPriceModel | 币种 | currency | string | 否 | (不传则默认使用提前设置的币种,若传,则币种需与设置的房型币种一致) |
| roomPriceModel | 早餐数量 | breakfast | int | 否 | 不传则取与房型关联的早餐数量,下同 |
| roomPriceModel | 税费 | tax | decimal | 否 | |
| roomPriceModel | 渠道 | channel | string | 是 | |
| roomDataEntitys | 采购价推送实体 | purchasePriceModel | PurchasePriceModel | 否 | |
| purchasePriceModel | 房价 | purchasePrice | decimal | 是 | |
| purchasePriceModel | 币种 | currency | string | 否 | (不传则默认使用提前设置的币种,若传,则币种需与设置的房型币种一致) |
| purchasePriceModel | 早餐数量 | breakfast | Int | 否 | 不传则取与房型关联的早餐数量,下同 |
| purchasePriceModel | 税费 | tax | decimal | 否 | |
| roomDataEntitys | 房态推送实体 | roomStatusModel | RoomStatusModel | 否 | |
| roomStatusModel | 房态 | saleStatus | byte | 否 | 房态:0满房1销售2限量 |
| roomStatusModel | 渠道 | channel | string | 否 | |
| roomDataEntitys | 房量推送实体 | roomInventoryModel | roomInventoryModel | 否 | |
| roomInventoryModel | 保留房房量 | preservedQuantity | int | 否 | |
| roomInventoryModel | 非保留房房量 | unPreservedQuantity | int | 否 | |
| roomInventoryModel | 自动关房 | autoCloseRoom | int | 否 | 0不变,1是,2否,不传默认为0 |
| roomInventoryModel | 渠道 | channel | string | 是 | 全小写 |
| roomInventoryModel | 保留房推送类型 | pushPreservedType | Int | 否 | 0(不变), 1(增加房量), 2(减少房量), 3(总量等于), 4(余量等于),不设值默认为3总量等于 |
| roomInventoryModel | 非保留房推送类型 | pushUnPreservedType | Int | 否 | 0(不变), 1(增加房量), 2(减少房量), 3(总量等于), 4(余量等于),不设值默认为3总量等于 |
| roomDataEntitys | 动态售卖规则 | saleRuleModel | SaleRuleModel | 建议: 房态关房,动态售卖规则建议不要再推过来了 |
|
| SaleRuleModel | 礼盒实体 | roomGiftRule | RoomGiftRuleEntity | ||
| SaleRuleModel | 非携程售卖规则 | sellingRule | SellingRuleEntity | ||
| SaleRuleModel | 携程售卖规则 | ctripSellRule | CtripSellRuleEntity | ||
| RoomGiftRuleEntity | 礼盒id | giftId | Int | ||
| 生效类型 | takeEffectType | int | 1:入住生效 2:离店生效 3:在店生效 | ||
| 礼盒描述 | giftDesc | string | 携程渠道可选,其他渠道不填 | ||
| SellingRule | 最晚立即确认时间 | latestconfirmDate | Calendar | 可不填 | |
| 最晚立即确认时间天 | latestconfirmTimeOfDays | Short | 非携程渠道选填(如果传了,请不要超过 180,超过180当做180设置) | ||
| 最晚立即确认时间小时 | latestconfirmTimeOfHours | short | 非携程渠道选填 | ||
| CtripSellRule | 最晚立即确认时间 | latestconfirmDate | Calendar | 非必填 | |
| 最晚立即确认时间天 | latestconfirmTimeOfDays | Short | 携程选填(如果传了,请不要超过 180,超过180当做180设置) | ||
| 最晚立即确认时间小时 | latestconfirmTimeOfHours | Short | 携程选填;(范围1~24) | ||
| 最晚预定时间天 | latestBookingTimeOfDays | Short | 携程选填(传入-1,表示设置Ctrip凌晨可售昨日房;如果传了,请不要超过 180,超过180当做180设置) | ||
| 最晚预定时间小时 | latestBookingTimeOfHours | Short | 携程选填;(范围1~24。注:当要设置Ctrip凌晨可售昨日房时(latestBookingTimeOfDays=-1),只能传1~7) | ||
| 取消类型 | cancelType | string | 携程选填 0不变 1 不可取消 2 可取消 |
||
| 最晚取消时间天 | latestCancelTimeOfDays | Short | 携程选填且取消类型为2时必填 | ||
| 最晚取消时间小时 | latestCancelTimeOfHours | Short | 携程选填且取消类型为2时必填;(范围1~23) | ||
| 逾期扣款类型 | overduePaymentType | String | 携程选填F:扣首日 C:扣全款,默认为C且取消类型为2时必填 |
示例:
{
"requestor":{
"invoker":"string",
"operatorName":"string",
"opClientIP":"string",
"userId":0,
"languageType":"string"
},
"supplierId":0,
"hotelId":0,
"roomDataEntitys":[
{
"roomId":0,
"startDate":"2017-04-20 00:00:00",
"endDate":"2017-04-20 00:00:00",
"weekDayIndex":"string",
"roomPriceModel":{
"roomPrice":0,
"tax":0,
"currency":"string",
"breakfast":0,
"channel":"string"
},
"purchasePriceModel":{
"purchasePrice":0,
"tax":0,
"currency":"string",
"breakfast":0
},
"roomStatusModel":{
"saleStatus":0,
"channel":"string"
},
"roomInventoryModel":{
"preservedQuantity":0,
"pushPreservedType":0,
"pushUnPreservedType":0,
"unPreservedQuantity":0,
"autoCloseRoom":0,
"channel":"string"
},
"saleRuleModel":{
"channel":"string",
"roomGiftRule":{ //节点不再支持,礼盒相关到可视化后台操作
"giftId":0,
"takeEffectType":0,
"giftDesc":"string"
},
"sellingRule":{
"latestconfirmDate":"2017-04-20 00:00:00", // 用下面两个字段,此字段置空
"latestconfirmTimeOfDays":0,
"latestconfirmTimeOfHours":0
},
"ctripSellRule":{ // 请使用6.9 实时接口, 注意有频率限制
"latestconfirmDate":"2017-04-20 00:00:00",
"latestconfirmTimeOfDays":0,
"latestconfirmTimeOfHours":0,
"latestBookingTimeOfDays":0,
"latestBookingTimeOfHours":0,
"cancelType":0,
"latestCancelTimeOfDays":0,
"latestCancelTimeOfHours":0,
"overduePaymentType":"string"
}
}
}
]
}
四、输出参数:
{
"BatchPushRoomDataResponseType":{
"resultStatus":{
"resultCode":0,
"resultMsg":"success"
},
//此logkey为当次推送唯一key,请自行记录,后续如果有问题,可根据此key查问题,此key也是6.4接口中的rowKey
"logKey":"ea4a2d85699e470b97b4d98bbfd855be_17399_11814788"
}
}