飞猪分销通用酒店报价接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
shids | Number | 必须 | 123123,321321 | 查询报价的酒店列表 | |
checkin_date | String | 可选 | 2023-01-01 | 入住日期 yyyy-MM-dd | |
checkout_date | String | 可选 | 2023-01-02 | 离店日期 yyyy-MM-dd | |
calendar_checkin_start_date | String | 可选 | 2023-01-01 | 日历报价入住开始日期 yyyy-MM-dd | |
calendar_checkin_end_date | String | 可选 | 2023-02-01 | 日历报价入住结束日期 yyyy-MM-dd | |
is_calendar | Boolean | 必须 | true |
|
是否日历报价计算,false只用填入离日期,true只用填日历开始结束日期 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
hotel_prices_result | HotelPricesResult | 酒店报价查询结果 | |
|
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); XhotelDistributionPriceRequest req = new XhotelDistributionPriceRequest(); req.setShids(123123,321321L); req.setCheckinDate("2023-01-01"); req.setCheckoutDate("2023-01-02"); req.setCalendarCheckinStartDate("2023-01-01"); req.setCalendarCheckinEndDate("2023-02-01"); req.setIsCalendar(true); XhotelDistributionPriceResponse rsp = client.execute(req); System.out.println(rsp.getBody());
<xhotel_distribution_price_response> <hotel_prices_result> <error_code>0</error_code> <error_message>当前请求已被限流</error_message> <module> <search_id>searchId</search_id> <hotel_prices> <hotel_price> <shid>123456</shid> <name>万豪行政公寓</name> <room_prices> <room_price> <srid>456789</srid> <name>豪华大床房</name> <bed_json>床型信息json</bed_json> <window_json>窗型信息json</window_json> <rate_prices> <rate_price> <rate_id>123456789</rate_id> <rateplan_id>123456789</rateplan_id> <item_id>123456789</item_id> <currency_code>CNY</currency_code> <invoice_provider>1</invoice_provider> <max_stay_days>10</max_stay_days> <min_stay_days>1</min_stay_days> <max_occupancy>2</max_occupancy> <min_advance_hour>6</min_advance_hour> <max_advance_hour>1440</max_advance_hour> <effective_daily_start_time>00:00:00</effective_daily_start_time> <effective_daily_end_time>23:59:59</effective_daily_end_time> <effective_start_time>2023-01-01 00:00:00</effective_start_time> <effective_end_time>2023-01-11 23:59:59</effective_end_time> <checkin_checkout_prices> <check_in_check_out_price> <checkin_date>2023-01-01</checkin_date> <checkout_date>2023-01-02</checkout_date> <stay_days>1</stay_days> <price>10000</price> <breakfast_count>1</breakfast_count> <promotions> <promotion_price> <name>商家立减</name> <amount>1000</amount> <ump_id>123123</ump_id> </promotion_price> </promotions> <original_price>15000</original_price> </check_in_check_out_price> </checkin_checkout_prices> <cancel_policy_json>退改政策json</cancel_policy_json> <cancel_policy_desc>在今天下午6点前可免费取消</cancel_policy_desc> <time_range> <start_time>00:00</start_time> <end_time>23:59</end_time> </time_range> <next_date_service_time> <start_time>00:00</start_time> <end_time>23:59</end_time> </next_date_service_time> <x_items>酒+X元素</x_items> <commercialization_id>100010101</commercialization_id> <merge_occupancy>2</merge_occupancy> </rate_price> </rate_prices> </room_price> </room_prices> </hotel_price> </hotel_prices> <client_type_id>0</client_type_id> <trace_id>traceId</trace_id> </module> </hotel_prices_result> </xhotel_distribution_price_response>
<error_response> <code>50</code> <msg>Remote service error</msg> <sub_code>isv.invalid-parameter</sub_code> <sub_msg>非法参数</sub_msg> </error_response>
错误码 | 错误描述 | 解决方案 |
---|