文档中心 > API类目 > 酒店交易API

taobao.xhotel.order.international.distribution.validate (飞猪国际酒店分销验价接口)

飞猪酒店分销验价接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
validate_req ValidateReq 必须 验价接口请求参数
  • └ ext_params
  • String
  • 可选
  • {}
  • 扩展字段
  • └ number_of_rooms
  • Number
  • 必须
  • 2
  • 房间数
  • └ distributor
  • String
  • 必须
  • hello
  • 分销渠道
  • └ intention
  • String
  • 可选
  • render/create/change
  • 请求用途
  • └ search_promotion_amount
  • Number
  • 可选
  • 1000
  • 报价接口的优惠金额(单位分)
  • └ check_in
  • Date
  • 必须
  • 2022-11-15 15:00:00
  • 入住日期
  • └ check_out
  • Date
  • 必须
  • 2022-11-16 14:00:00
  • 离店日期
  • └ search_room_price
  • Number
  • 可选
  • 10000
  • 报价接口的优惠前价格
  • └ rate_key
  • String
  • 必须
  • 8695272292|27052026292:yuyanitem8|bd76c29ed6c0fa79412687f375455abb|27052026292:yuyanitem8
  • 不落库商品唯一标识
  • occupancies
  • OccupancyDO []
  • 必须
  • [{"roomNo":1,"adultNum":1,"childrenNum":1,"childrenAges":[7]}]
  • 每间房人数信息
  • └ room_no
  • Number
  • 可选
  • 1
  • 房间编号
  • └ adult_num
  • Number
  • 可选
  • 1
  • 该房间成人数
  • └ children_num
  • Number
  • 可选
  • 1
  • 该房间儿童数
  • └ children_ages
  • String []
  • 可选
  • [7,5]
  • 儿童年龄列表
  • └ request_trace_id
  • String
  • 可选
  • "1111111"
  • rateRelationKey

响应参数

名称 类型 示例值 描述
error_msg String 系统异常,请稍后重试 错误信息
result ValidateResp 结果体,范型对象
  • └ create_key
  • String
  • 1668515755548_210451ea16685157543063960e2d5f_109eca19d39e4caa8464d2792e7d0cb8
  • 创单需要传入的参数
  • └ seller_id
  • Number
  • 2204103009000
  • 卖家id
  • └ hid
  • Number
  • 306424009000
  • 卖家酒店id
  • rate_plan_info
  • RatePlanInfo
  • 售卖政策具体信息
  • └ display_name
  • String
  • 无早-任意退【测试测试】
  • rp展示名称
  • └ total_room_price
  • Number
  • 10000
  • 总房价(单位:分)
  • rate_units
  • RateUnit []
  • 每间房rate信息
  • └ rate_key
  • String
  • dfer34234234232
  • 最小售卖单元唯一key
  • daily_price_info_list
  • DailyPriceInfo []
  • 每日价格信息
  • └ date
  • String
  • 2022-11-15
  • 入住日期
  • board_do
  • BoardDO
  • 餐食信息
  • └ board_type
  • Number
  • 0
  • 早餐种类:0 无早;1 早餐;2 三餐
  • └ board_num
  • Number
  • 2
  • 餐食数量
  • └ price
  • Number
  • 10000
  • 价格,不区分币种
  • └ max_booking_num
  • Number
  • 2
  • 最大可预订房间数
  • └ max_occupancy_num
  • Number
  • 2
  • 每间房最大可入住人数
  • └ max_inventory
  • Number
  • 15
  • 最大库存量
  • └ earliest_check_in_time
  • String
  • 12:00
  • 最早可以办理入住时间
  • └ latest_check_out_time
  • String
  • 14:00
  • 最晚离店时间
  • cancel_policy_do
  • CancelPolicyDO
  • 取消政策
  • └ cancel_policy_type
  • Number
  • 1
  • 取消政策类型:1.免费取消; 2.不可取消; 5.限时免费取消(从入住时间前推); 6.提前多少小时退款扣取几晚房费; 9.阶梯收费取消(从入住时间前推小时前退订扣款金额)
  • policy_info
  • CancelPolicyInfoDO []
  • 取消政策规则
  • └ hour
  • Number
  • 48
  • 提前x小时
  • └ value
  • Number
  • 1
  • 规则对应的值,可能是百分比、数值等
  • └ bed_desc
  • String
  • 双床
  • 床型描述
  • └ base_price_rate
  • Boolean
  • true
  • 是否底价商品
  • └ currency_code
  • String
  • USD
  • 报价币种
  • └ currency_rate
  • String
  • 0.752
  • 报价对人民币汇率
  • invoice_config_do
  • InvoiceConfigDO
  • 发票规则
  • └ can_invoice
  • Number
  • 1
  • 能否开发票,1:能、0:不能
  • └ invoice_provider
  • Number
  • 1
  • 发票提供方,1:酒店前台,2:卖家
  • └ postage_provider
  • Number
  • 0
  • 邮费提供方,0:未设置 1:卖家承担,2:买家承担(邮费到付),3:卖家承担(邮费¥XX)
  • └ invoice_type
  • String
  • 旅游费
  • 开票用途分类,中间用逗号分隔,代订房费,旅游费,差旅费,其他
  • └ invoice_other_desc
  • String
  • 其他类型
  • 发票描述,可开票类型选择"其他"时填写的内容
  • └ memo
  • String
  • 需发票的客户请联系客服告之开票信息。发票由杭州诗遥开具的代订房费增值税发票
  • 发票规则的补充说明
error_resp_code Number 105 错误码
msg_for_dev String 奥创解析错误 开发查看的错误信息
is_success Boolean true 请求是否成功
attribute Json {} 用于获取trace,排查问题使用

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderInternationalDistributionValidateRequest req = new XhotelOrderInternationalDistributionValidateRequest();
XhotelOrderInternationalDistributionValidateRequest.ValidateReq obj1 = new XhotelOrderInternationalDistributionValidateRequest.ValidateReq();
obj1.setExtParams("{}");
obj1.setNumberOfRooms(2L);
obj1.setDistributor("hello");
obj1.setIntention("render/create/change");
obj1.setSearchPromotionAmount(1000L);
obj1.setCheckIn(StringUtils.parseDateTime("2022-11-15 15:00:00"));
obj1.setCheckOut(StringUtils.parseDateTime("2022-11-16 14:00:00"));
obj1.setSearchRoomPrice(10000L);
obj1.setRateKey("8695272292|27052026292:yuyanitem8|bd76c29ed6c0fa79412687f375455abb|27052026292:yuyanitem8");
List<XhotelOrderInternationalDistributionValidateRequest.OccupancyDO> list3 = new ArrayList<XhotelOrderInternationalDistributionValidateRequest.OccupancyDO>();
XhotelOrderInternationalDistributionValidateRequest.OccupancyDO obj4 = new XhotelOrderInternationalDistributionValidateRequest.OccupancyDO();
list3.add(obj4);
obj4.setRoomNo(1L);
obj4.setAdultNum(1L);
obj4.setChildrenNum(1L);
obj4.setChildrenAges("7,5");
obj1.setOccupancies(list3);
obj1.setRequestTraceId("\"1111111\"");
req.setValidateReq(obj1);
XhotelOrderInternationalDistributionValidateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_order_international_distribution_validate_response>
    <error_msg>系统异常,请稍后重试</error_msg>
    <result>
        <create_key>1668515755548_210451ea16685157543063960e2d5f_109eca19d39e4caa8464d2792e7d0cb8</create_key>
        <seller_id>2204103009000</seller_id>
        <hid>306424009000</hid>
        <rate_plan_info>
            <display_name>无早-任意退【测试测试】</display_name>
            <total_room_price>10000</total_room_price>
            <rate_units>
                <rate_unit>
                    <rate_key>dfer34234234232</rate_key>
                    <daily_price_info_list>
                        <daily_price_info>
                            <date>2022-11-15</date>
                            <board_do>
                                <board_type>0</board_type>
                                <board_num>2</board_num>
                            </board_do>
                            <price>10000</price>
                        </daily_price_info>
                    </daily_price_info_list>
                </rate_unit>
            </rate_units>
            <max_booking_num>2</max_booking_num>
            <max_occupancy_num>2</max_occupancy_num>
            <max_inventory>15</max_inventory>
            <earliest_check_in_time>12:00</earliest_check_in_time>
            <latest_check_out_time>14:00</latest_check_out_time>
            <cancel_policy_do>
                <cancel_policy_type>1</cancel_policy_type>
                <policy_info>
                    <cancel_policy_info_d_o>
                        <hour>48</hour>
                        <value>1</value>
                    </cancel_policy_info_d_o>
                </policy_info>
            </cancel_policy_do>
            <bed_desc>双床</bed_desc>
            <base_price_rate>true</base_price_rate>
            <currency_code>USD</currency_code>
            <currency_rate>0.752</currency_rate>
        </rate_plan_info>
        <invoice_config_do>
            <can_invoice>1</can_invoice>
            <invoice_provider>1</invoice_provider>
            <postage_provider>0</postage_provider>
            <invoice_type>旅游费</invoice_type>
            <invoice_other_desc>其他类型</invoice_other_desc>
            <memo>需发票的客户请联系客服告之开票信息。发票由杭州诗遥开具的代订房费增值税发票</memo>
        </invoice_config_do>
    </result>
    <error_resp_code>105</error_resp_code>
    <msg_for_dev>奥创解析错误</msg_for_dev>
    <is_success>true</is_success>
    <attribute>{}</attribute>
</xhotel_order_international_distribution_validate_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部