报价接口
请求方式:http,返回json格式。
接口地址
| 名称 | 请求格式 | 测试地址 |
|---|---|---|
| 报价接口 | GET | http://58.250.56.211:8081/api/hotel/queryRatePlan.json?reqData=xxx |
系统输入参数
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 客户编号 | appKey | String | SZ28276 | 捷旅提供 |
| 时间戳 | timestamp | String | 1516816895000 | Unix时间戳 |
| 数字签名 | sign | String | 063cae11a00896187f80eecbf922364a | 签名方法:md5(md5(secretKey+appKey)+timestamp)md5采用32位小写。 |
| 版本 | version | String | 3.0.1 | 版本信息,请参考版本说明 |
系统输出参数
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 结果代码 | code | Integer | 0 | 0表示请求成功;非0表示存在业务异常。 |
| 结果描述 | errorMsg | String | 错误描述 | |
| 版本 | version | String | 3.0.1 | |
| 结果对象 | result | String | 不同的请求是不同的对象,错误的请求一般返回为空 | |
| 响应码 | respId | String | 单次响应的唯一编码,业务问题排查请提供编码 |
报价查询:输入参数
| 名称 | 编码 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|---|
| 酒店编号 | hotelId | Integer | 是 | 无 | |
| 入住日期 | checkInDate | String | 是 | yyyy-MM-dd | |
| 离店日期 | checkOutDate | String | 是 | yyyy-MM-dd最大入离日期不能超过90天 | |
| 房间信息 | roomGroups | RoomGroup[] | 否 | 2成人 | 常用设置为1个房间2个成人 |
| 数据类型 | queryType | Integer | 否 | 0 | 请求数据类型默认值为1落地,0:全部,1:落地,2.实时 |
RoomGroup
对象包括房间入住信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 成人数 | adults | Integer | 默认2 | |
| 儿童数 | children | Integer | ||
| 儿童年龄 | childAges | String | 儿童年龄(多个时用逗号分割)。年龄的个数需要和儿童数保持一致 |
输入示例
{"head":{"appKey":"SZ28276","timestamp":"1516816895000","sign":"063cae11a00896187f80eecbf922364a","version":"3.0.1"},"data":{"hotelId":1,"checkInDate":"2018-01-10","checkOutDate":"2018-01-20"}}
返回参数
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 酒店产品数组 | hotelRatePlanList | HotelRatePlan[] | 无 | hotelRatePlanList定义见下表 |
HotelRatePlan
酒店报价对象包括报价、条款信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 酒店编号 | hotelId | Integer | 无 | |
| 房型数组 | rooms | Room[] | 无 | rooms定义见下表 |
| 预订条款数组 | bookingRules | BookingRule[] | 无 | bookingRules定义见下表 |
| 取消条款数组 | refundRules | refundRule[] | 无 | refundRules定义见下表 |
Room
对象包括房型的产品列表信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 房型编号 | roomTypeId | String | 无 | 无 |
| 产品数组 | ratePlans | RatePlan[] | 无 |
RatePlan
RatePlan对象包括产品信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 产品编号 | keyId | String | 无 | 唯一产品编号 |
| 供应商ID | supplierId | Integer | 无 | 区分价格 |
| 实名信息标识 | idcardflag | Integer | -1 | 代表酒店是否需要在下单时上传身份证信息。 1.默认为-1,即不需要上传身份证信息; 2.若为0,则在创建订单时会校验入住人的身份、电话信息。 |
| 房型名称 | keyName | String | 标准房 | |
| 床型名称 | bedName | String | 大床 | |
| 最大入住人数 | maxOccupancy | Integer | 2 | 房间最大入住人数 |
| 币种 | currency | String | CNY | |
| 价格类型编号 | rateTypeId | String | 无 | |
| 付款类型 | paymentType | Integer | 无 | 0预付 |
| 早餐 | breakfast | Integer | 无 | 0:无早、1:一份、2:两份...99:床位早、-1:含早(不确定早餐份数) |
| 是否开票 | ifInvoice | Integer | 无 | 1:可开票 2:不可开票 |
| 间夜价格数组 | nightlyRates | NightlyRate[] | 无 | |
| 预订条款编号 | bookingRuleId | String | 无 | |
| 取消条款编号 | refundRuleId | String | 无 | 为空默认是为1不可退。 |
| 适用市场 | market | String | ALL|HKG | 分隔符:| 适用市场|不适用市场,为-1,则表示未设置 BGM表示本国市场 示例1:ALL|HKG(适用所有|但不适用于香港) 示例2:CHN|-1(仅适用于中国大陆|没有其他不适用市场) 开发指南中第5项包含了国家代码对照表,可自行下载。 |
| 禁售渠道 | banota | string | 0 | 默认值-1表示不禁售,0全部,1携程,2艺龙,3美团,4飞猪,5去哪儿 |
| 礼包信息 | promotions | Promotion[] | 无 | |
| 小时房钟点房信息 | HourRpPolicy | HourRpPolicy | 无 |
NightlyRate
NightlyRate对象包括间夜价格、房态、库存信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 配额类型 | formulaType | String | 如:配额房、包房等,字段对应的code含义只对深捷旅有意义 | |
| 日期 | date | String | 无 | yyyy-MM-dd |
| 价格 | cose | Double | 无 | |
| 房态 | status | Integer | 无 | 1:保留房、2:待查、3:满房、4:限时确认 |
| 库存 | currentAlloment | Integer | 无 | 库存数量 |
| 早餐 | breakfast | Integer | 无 | 此处日历早餐,需要优先获取、无节点则拿上一级节点早餐 |
| 预订条款编号 | bookingRuleId | String | 无 | 优先获取、无节点或无条款则拿上一级节点条款 |
| 取消条款编号 | refundRuleId | String | 无 | 优先获取、无节点或无条款则拿上一级节点条款 |
| 长隆酒店门票的场次列表 | chimelongTicketShows | ChimelongTicketShows[] | 无 | 长隆酒店专用,只订单报价接口有返回 |
BookingRule
对象包括预订条款信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 预订条款编号 | bookingRuleId | String | 无 | |
| 开始日期 | startDate | String | 无 | 报价生效时间yyyy-MM-dd HH:mm:ss 为空表示无限制 |
| 结束日期 | endDate | String | 无 | 报价结束时间yyyy-MM-dd HH:mm:ss 为空表示无限制 |
| 预订最少数量 | minAmount | Integer | 1 | 最少预定房间数量 |
| 预订最多数量 | maxAmount | Integer | 7 | 最大预定房间数量 |
| 最少入住天数 | minDays | Integer | 1 | 最少入住天数 |
| 最多入住天数 | maxDays | Integer | 30 | 最多入住天数 |
| 最少提前预订时间 | minAdvHours | Integer | 0 | 最少提前预订时间(以用户选择的入住日期的23:59:59计算) |
| 最大提前预订时间 | maxAdvHours | Integer | -1 | 最大提前预定时间(以用户选择的入住日期的23:59:59计算)-1表示为无限制 |
| 有效星期 | weekSet | String | 1,2,3,4,5,6,7 | 有效星期。7表示星期日,1表示星期一,剩余的以此类推。当天不在星期范围内则无法下单 |
| 每日开始销售时间 | startTime | String | HH:mm | 销售起始小时数,默认值00:00 |
| 每日结束销售时间 | endTime | String | HH:mm | 销售结束小时,默认值30:00,代表第二天早上6点前还可以进行预定 |
| 预订说明 | bookingNotices | String | 无 | 预定说明,没有强校验。请注意合理使用。 |
refundRule
对象包括取消条款信息,为空默认是为1不可退。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 取消条款编号 | refundRuleId | String | 无 | |
| 取消条款规则 | refundRuleType | Integer | 无 | 当返回数据为空时,默认不可取消;1:不可退、2:限时取消、20:支持确认后30分钟免费取消(从下单时间开始计算) |
| 支持30分钟免费取消 | thirtyMinFreeCancelPolicy | boolean | 无 | 是否支持确认后30分钟免费取消。True表示支持,False表示不支持(不填默认为不支持30分钟免费取消) |
| 入住前n小时 | refundRuleHours | Integer | 无 | 30 |
| 取消客人罚金 | deductType | Integer | 无 | 1扣全额、0扣首晚房费 |
Promotion
对象包括礼包信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 促销名称 | marketingName | String | 无 | |
| 礼包开始时间 | startDate | String | yyyy-MM-dd | 在店时间生效 |
| 礼包结束时间 | endDate | String | yyyy-MM-dd | |
| 礼包描述 | description | String | 无 | 礼包描述 |
| 礼包价值 | marketingPrice | Double | 无 | |
| 时段类型 | timeLimitType | Integer | 无 | 0:预订限定 1:入住限定 2:时段限定 |
| 周有效期 | weekEffectiveDate | String | 1,2,3,4,5,6,7 | |
| 促销方式 | promotionMethod | Integer | 无 | 0:每间房包含一次 1:每间房每日包含 2:其他 |
| 促销类型 | promotionType | Integer | 无 | 1:含礼包 2:延迟退房 3:含餐饮 4:含旅游门票 5:含折扣/抵扣券 6:含交通 7:其他 |
HourRpPolicy
对象包括小时房(钟点房)规则。小时默认节点为00和30分钟,示例入住时间:11:00-15:00,12:30-16:30
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 最早到店时间 | earliestArrivalTime | String | HH:mm | 小时房规则-最早到店时间 |
| 最晚到店时间 | latestArrivalTime | String | HH:mm | 小时房规则-最晚到店时间 |
| 入住时长 | stayHour | Integer | 4 | 表示小时房需入住的小时数 |
ChimelongTicketShows
NightlyRate对象包括间夜价格、房态、库存信息。
属性
| 名称 | 编码 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| 门票场次code | seasonCode | String | 无 | 场次code,订单报价和下单接口使用 |
| 场次开始时间 | seasonBegTime | String | 无 | yyyy-MM-dd HH:mmss |
| 场次结束时间 | seasonEndTime | String | 无 | yyyy-MM-dd HH:mmss |
| 参考价格 | settlePrice | Double | 无 | 仅供参考 |
| 剩余库存 | stock | Integer | 无 | 库存数量 |
返回示例
{"code":0,"errorMsg":"","result":{"hotelRatePlanList":[{"hotelId":1,"rooms":[{"roomTypeId":"17","ratePlans":[{"keyId":"S#S#SG#2SF6#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"2156","paymentType":0,"breakfast":2,"bookingRuleId":"","refundRuleId":"1","nightlyRates":[{"date":"2018-01-10","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":250,"status":0,"currentAlloment":2}]},{"keyId":"S#S#SG#S#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"1","paymentType":0,"breakfast":0,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-10","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-10","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-10","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-11","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-11","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-12","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-12","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-13","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-13","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-14","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-14","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-15","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-15","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-16","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":160,"status":2,"currentAlloment":0},{"date":"2018-01-16","cose":250,"status":2,"currentAlloment":0},{"date":"2018-01-17","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":160,"status":0,"currentAlloment":0},{"date":"2018-01-17","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":160,"status":0,"currentAlloment":0},{"date":"2018-01-18","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":270,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":250,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":160,"status":0,"currentAlloment":0},{"date":"2018-01-19","cose":250,"status":0,"currentAlloment":2}]},{"keyId":"S#D9D#SG#S#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"1","paymentType":0,"breakfast":0,"bookingRuleId":"##W#7#W#9Q#Q#PW#WOEORO4O5OTO7","refundRuleId":"1","nightlyRates":[{"date":"2018-01-10","cose":200,"status":0,"currentAlloment":10},{"date":"2018-01-11","cose":200,"status":0,"currentAlloment":10},{"date":"2018-01-12","cose":200,"status":0,"currentAlloment":10},{"date":"2018-01-13","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-14","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-15","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-16","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-17","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-18","cose":100,"status":0,"currentAlloment":10},{"date":"2018-01-19","cose":100,"status":0,"currentAlloment":10}]},{"keyId":"S#S#SG#4#A","keyName":"豪华房(大床/双床)","bedName":"大床/双床","currency":"CNY","rateTypeId":"4","paymentType":0,"breakfast":99,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-11","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-12","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-13","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-14","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-15","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-16","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-17","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-18","cose":260,"status":0,"currentAlloment":2},{"date":"2018-01-19","cose":260,"status":0,"currentAlloment":2}]}]},{"roomTypeId":"22","ratePlans":[{"keyId":"S#S#22#4#A","keyName":"标准房(大床)(大床)","bedName":"大床","currency":"CNY","rateTypeId":"4","paymentType":0,"breakfast":99,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-11","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-12","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-13","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-14","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-15","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-16","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-17","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-18","cose":277,"status":0,"currentAlloment":3},{"date":"2018-01-19","cose":277,"status":0,"currentAlloment":3}]},{"keyId":"S#S#22#S#A","keyName":"标准房(大床)(大床)","bedName":"大床","currency":"CNY","rateTypeId":"1","paymentType":0,"breakfast":0,"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","refundRuleId":"2350","nightlyRates":[{"date":"2018-01-10","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-11","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-12","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-13","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-14","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-15","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-16","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-17","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-18","cose":281,"status":0,"currentAlloment":3},{"date":"2018-01-19","cose":281,"status":0,"currentAlloment":3}]}]}],"bookingRules":[{"bookingRuleId":"##W#7#W#9Q#R4#PW#WOEORO4O5OTO7","minAmount":1,"maxAmount":7,"minDays":1,"maxDays":90,"minAdvHours":34,"maxAdvHours":-1,"weekSet":"1,2,3,4,5,6,7","bookingNotices":""},{"bookingRuleId":"##W#7#W#9Q#Q#PW#WOEORO4O5OTO7","minAmount":1,"maxAmount":7,"minDays":1,"maxDays":90,"minAdvHours":0,"maxAdvHours":-1,"weekSet":"1,2,3,4,5,6,7","bookingNotices":""}],"refundRules":[{"refundRuleId":"1","refundRuleType":1},{"refundRuleId":"2350","refundRuleType":2,"refundRuleHours":35,"deductType":0}]}]},"respId":"c98d5fb5-6295-4c32-b87b-85e27d4e0618"}