酒店日历房可订检查
接口说明
抖音侧调用第三方进行可订检查。如果不可订需要返回价量信息进行价量更新。
基本信息
Scope | life.capacity.trip_trade_order | |||
权限要求 | 酒店日历房解决方案-日历房正向交易 | |||
回调场景 | 酒店日历房可订检查 |
请求头
- •Content-Type:
application/json
- •X-Bytedance-Logid: 请求 logid, 用于问题排查用。
- •x-life-clientkey: 服务商应用的 client_key。
- •X-life-sign: 请求签名,签名规则。
请求体
参数名称 | 参数类型 | 必须参数 | 备注 | ||
rate_plan_id | string | 必填 | 抖音售卖房型ID | ||
biz_type | int | 必填 | 2011:酒店预售券 2012:酒店预约单 2021:日历房 | ||
check_in_date | string | 必填 | 入住日期 yyyy-MM-dd | ||
check_out_date | string | 必填 | 离店日期 yyyy-MM-dd | ||
daily_rates | list | 选填 | 单日单间价格 | ||
| original_amount | int | 必填 | 原始价格(分),对于非中国大陆商家,代表税后价 支持传0和-1,表示清除价格 | |
| amount_before_tax | int | 选填 | 税前价,非中国大陆商家使用 | |
| currency | string | 选填 | 发单价格币种,CNY,USD国际标准枚举值 非国内大陆商家必填 | |
| period_start_date | string | 必填 | 时间段开始时间yyyy-MM-dd | |
| period_end_date | string | 必填 | 时间段结束时间yyyy-MM-dd | |
| period_start_time | string | 选填 | 开始时间点,新增选择钟点房时为必填,格式 yyyy-MM-dd hh:mm 钟点房第一次可订检查(提单)时无此时间,第二次可订检查(下单)时会传此时间为必填 | |
| period_end_time | string | 选填 | 结束时间点,新增选择钟点房时为必填,格式 yyyy-MM-dd hh:mm 钟点房第一次可订检查(提单)时无此时间,第二次可订检查(下单)时会传此时间为必填 | |
| usage_duration | int | 选填 | 使用时长 选择钟点房时为必填。钟点房第一次可订检查(提单)时无此时间,第二次可订检查(下单)时会传此时间为必填 校验逻辑:
| |
| promotion_info | list<object> | 选填 | 营销信息 | |
| | promotion_type_code | int | 选填 | 营销规则一级类型code (结构见公共结构2.4.1) |
| | promotion_id | int | 选填 | 抖音营销规则ID |
| | promotion_discount | int | 选填 | 营销折扣金额(分) |
| | promotion_template_id | int | 选填 | 营销模版ID |
| after_promotion_amount | int | 选填 | 促后价格 | |
total_after_promotion_amount | int | 选填 | 总房型促后价格(分) | ||
meals | list | 选填 | 餐食信息 | ||
| meal_type | Int | 选填 | 餐食类型 1:早餐 4:无餐食 | |
| meal_num | int | 选填 | 餐食数量 数量必须大于0,如果则不传 | |
number_of_units | int | 必填 | 预定间数 | ||
number_of_guests | int | 必填 | 入住人数 默认2可订时候还没具体入住人 | ||
total_amount | int | 必填 | 总房型原始价格(分),对于非中国大陆商家,代表税后价 | ||
amount_before_tax | int | 选填 | 税前价,非中国大陆商家使用 | ||
currency | string | 选填 | 发单价格币种,CNY,USD国际标准枚举值 非国内大陆商家必填 | ||
occupancies | list<struct> | 选填 | 入住人列表 | ||
| first_name | string | 选填 | 姓 | |
| last_name | string | 选填 | 名 | |
| name | string | 必填 | 姓名 | |
| phone | string | 必填 | 联系电话,加密 (手机号可能为"") | |
| license_type | int | 选填 | 1 -身份证 2-港澳通行证 3-台湾通行证 4-回乡证 5-台胞证 6-护照 7-外籍护照 | |
| license_id | string | 选填 | 证件 ID,加密 | |
| sex | int | 选填 | 1:男,2:女 | |
| birthday | string | 选填 | // 出生日期,格式 yyyy-MM-dd | |
| license_validity | string | 选填 | // 证件有效期,格式 yyyy-MM-dd,当证件类型不为身份证时,该字段必填 | |
cancel_rule | list<object> | 选填 | 取消规则 | ||
| cancel_type | enum | 必填 | 取消订单规则 (结构见公共结构2.2.4) | |
| cancel_time_type | enum | 选填 | 若取消订单规则为限时取消,该字段表示取消订单需要参考的时间点,例如以入住时间为参考,判断用户是否可取消。 目前只支持2, 即只支持以入住时间为参考 (结构见公共结构2.2.2) | |
| cancel_offset_time | object | 选填 | 若取消订单规则为限时取消,该字段表示取消订单需要参考的时间时间长度,例如以入住时间为参考,长度6小时,则用户最晚可在入住前6小时取消。 | |
| | day | int | 选填 | |
| | hour | int | 选填 | 范围[0-24) (超过24应进位至day)
|
| | minute | int | 选填 | |
| cut_type | enum | 选填 | 取消扣费类型(结构见公共结构2.2.3) | |
| cut_value | int | 选填 | 取消扣费数额 。范围 [0,90],即扣款百分比区间为 0%~90% | |
member_info | object | 选填 | 会员信息 | ||
| member_level | int | 必填 | 会员等级 | |
| member_id | string | 选填 | 会员卡号 | |
| member_name | string | 选填 | 会员姓名 | |
| member_phone | string | 选填 | 会员手机号(加密传输) | |
| member_email | string | 选填 | 会员邮箱(加密传输) | |
open_id | string | 选填 | 抖音用户ID | ||
crowd_config | list<enum> | 选填 | 人群配置 | ||
sales_type | int | 选填 | 售卖形式:默认为全日房;
| ||
book_time_rule | object | 选填 | 预定时间规则 | ||
| is_time_nextday | bool | 必填 | 预定时间段是否跨天 | |
| time_span | object | 必填 | 预定时间段 | |
| | from | string | 必填 | 可预定开始时间,格式:HH:mm |
| | to | string | 必填 | 可预定结束时间,格式:HH:mm |
请求示例
{ "rate_plan_id": "1763526448072717", "check_in_date": "2023-04-20", "check_out_date": "2023-04-23", "number_of_units": 1, "number_of_guests": 1, "total_amount": 10000, "amount_before_tax": 10000, "currency":"CNY", "daily_rates": [ { "period_start_date": "2023-04-20", "period_end_date": "2023-04-21", "original_amount": 1000, "amount_before_tax": 1000, "currency":"CNY", "after_promotion_amount":1000, "promotion_info":[ { "promotion_type_code":1, "promotion_id":"222", "promotion_discount":1, "apply_member_level":1 } ] }, { "period_start_date": "2023-04-21", "period_end_date": "2023-04-22", "original_amount": 1000, "amount_before_tax": 1000, "currency":"CNY", "after_promotion_amount":1000, "promotion_info":[ { "promotion_type_code":1, "promotion_id":"222", "promotion_discount":1, "apply_member_level":1 } ] }, { "period_start_date": "2023-04-22", "period_end_date": "2023-04-23", "original_amount": 1000, "amount_before_tax": 1000, "currency":"CNY", "after_promotion_amount":1000, "promotion_info":[ { "promotion_type_code":1, "promotion_id":"222", "promotion_discount":1, "apply_member_level":1 } ] }, ], "total_after_promotion_amount":10000, "biz_type": 2021, "cancel_rules":[ { "cancel_type":2, "cancel_time_type":2, "cancel_offset_time":{ "day":0, "hour":6, "minute":0 }, "cut_type":1, "cut_value":10 } ], "meals": [ { "meal_type": 1, "meal_num": 1 } ], "occupancies": [ { "first_name":"", "last_name":"", "name": "test", "phone": "13111111111", "license_type": 1, "license_id": "422202000000000000" } ], "early_arrival_time": "", "last_arrival_time": "", "create_order_time_unix": 1682006400000, "member_info":{ "member_level":1, "member_id":"", "member_name":"", "member_phone":"", "member_email":"", "open_id": 1 }, "crowd_config":[2] }
响应参数
参数名称 | 参数类型 | 必须参数 | 备注 | ||||
data | struct | 必填 | | ||||
| error_code | int | 必填 | 错误码 | |||
| description | string | 选填 | 描述信息 | |||
| ari | struct | 选填 | 价量信息 同商品价量同步接口结构 (因价量态不一致,导致可订检查失败,需要将价量态信息回传) | |||
| stock_and_amount | list<struct> | 选填 | 商品的日历库存和价格 | |||
| | promotion_amount | int | 选填 | 单间单日促后价格 | ||
| | timerange | string<Struct> | 必填 | 时间范围,[start,end]为闭区间,多段日期之间不能重复 | ||
| | | start | string | 必填 | 开始日期 eg. 2022-01-01,不得小于今日 | |
| | | end | string | 必填 | 结束日期 eg. 2022-01-04,不得超过距今365天 | |
| | price_member_levels | list<object> | 选填 | 营销后价格 | ||
| | | bind_member_level | int | 选填 | 适用的会员等级,如果营销规则设置了会员适用等级,此处必须传入适用的会员等级 | |
| | | price | int | 必填 | 营销后价格 | |
| | promotion_inventory | int | 选填 | 营销库存 | ||
| | promotion_id | string | 选填 | 营销ID | ||
| | original_amount | int | 选填 | 单间单日价格 | ||
| | available | bool | 选填 | 房态开关 | ||
| | inventory | int | 选填 | 房量 | ||
| | amount_before_tax | int | 选填 | 单间单日税前价 | ||
| | currency | string | 选填 | 发单价格币种,CNY,USD国际标准枚举值 非国内大陆商家必填 | ||
| | days_of_week | list<struct> | 选填 | 指定周几设定价格 | ||
| | fplos | string | 选填 | fplos=“0111011”,则表示允许连住2天,3天,4天,6天,7天;但是不允许连住1天,5天;
| ||
| | length_of_stay | int | 选填 | 连住天数。适用于连住(LosRate)场景下,不同连住天数具有单独的连住ARI。
| ||
| | los_rate_break_down | list<object> | 选填 | 连住模式下单日价格明细列表
| ||
| | | day_original_amount | int | 选填 | 单天售卖原价 | |
| | | day_amount_before_tax | int | 选填 | 单天售卖税前价 | |
| | cancel_rules | list<object> | 选填 | 取消规则 | ||
| | | cancel_type | enum | 必填 | 取消订单规则 (结构见公共结构2.2.4) | |
| | | cancel_time_type | enum |