文档中心 > API类目 > 飞猪推广平台

alibaba.fliggy.xhotel.distribution.price (飞猪四海通分销通用酒店报价接口)

飞猪分销通用酒店报价接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
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
  • 是否日历报价计算,false只用填入离日期,true只用填日历开始结束日期
    promote_app_key Number 必须 1001 媒体id
    promotion_position_id Number 必须 1001 推广位id
    activity_id String 必须 1002 活动id

    响应参数

    名称 类型 示例值 描述
    result Result 酒店报价查询结果
    • └ msg_code
    • String
    • 0
    • 错误码
    • └ msg_info
    • String
    • 当前请求已被限流
    • 错误信息
    • model
    • DistributionHotelPricesResp
    • 酒店报价信息
    • └ search_id
    • String
    • searchId
    • 用于请求复现
    • hotel_prices
    • ShotelPrice []
    • 酒店报价列表
    • └ shid
    • Number
    • 123456
    • 酒店id
    • └ name
    • String
    • 万豪行政公寓
    • 酒店名称
    • room_prices
    • SroomPrice []
    • 房型报价列表
    • └ srid
    • Number
    • 456789
    • 房型id
    • └ name
    • String
    • 豪华大床房
    • 房型名称
    • └ bed_json
    • String
    • 床型信息json
    • 床型信息json
    • └ window_json
    • String
    • 窗型信息json
    • 窗型信息json 0无窗 1有窗 2部分有窗 3暗窗 4部分有窗 5落地窗
    • rate_prices
    • RatePrice []
    • 报价列表
    • └ rate_id
    • Number
    • 123456789
    • rateId
    • └ rateplan_id
    • Number
    • 123456789
    • rpId
    • └ item_id
    • Number
    • 123456789
    • iid
    • └ currency_code
    • String
    • CNY
    • 币种
    • └ attribute
    • String []
    • 商品属性,INSTANT_CONFIRM("及时确认"),MORNING_ORDER("支持凌晨入住"),
    • └ invoice_provider
    • Number
    • 1
    • 开票类型,0、不开票;1、门店开票;2、商家开票
    • └ max_stay_days
    • Number
    • 10
    • 最大入住天数
    • └ min_stay_days
    • Number
    • 1
    • 最小入住天数
    • └ max_occupancy
    • Number
    • 2
    • 最大入住人数
    • └ min_advance_hour
    • Number
    • 6
    • 最小提前预定小时数
    • └ max_advance_hour
    • Number
    • 1440
    • 最大提前预定小时数
    • └ effective_daily_start_time
    • String
    • 00:00:00
    • 每天可售起始时间,HH:mm:ss
    • └ effective_daily_end_time
    • String
    • 23:59:59
    • 每天可售结束时间,HH:mm:ss
    • └ effective_start_time
    • String
    • 2023-01-01 00:00:00
    • 可售开始时间,yyyy-MM-dd HH:mm:ss
    • └ effective_end_time
    • String
    • 2023-01-11 23:59:59
    • 可售结束时间,yyyy-MM-dd HH:mm:ss
    • checkin_checkout_prices
    • CheckInCheckOutPrice []
    • 日历报价列表
    • └ checkin_date
    • String
    • 2023-01-01
    • 入住日期 yyyy-MM-dd
    • └ checkout_date
    • String
    • 2023-01-02
    • 离店日期 yyyy-MM-dd
    • └ stay_days
    • Number
    • 1
    • 入住天数
    • └ price
    • Number
    • 10000
    • 商品营销后报价,精度(分)
    • └ breakfast_count
    • Number
    • 1
    • 早餐数,-1代表早餐数和入住人数一致
    • promotions
    • PromotionPrice []
    • 飞猪营销优惠列表
    • └ name
    • String
    • 商家立减
    • 营销活动名称
    • └ amount
    • Number
    • 1000
    • 营销优惠金额
    • └ promotion_types
    • String []
    • 营销类型
    • └ ump_id
    • String
    • 123123
    • 营销活动id
    • └ original_price
    • Number
    • 15000
    • 商品营销前报价,精度(分)
    • └ cancel_policy_json
    • String
    • 退改政策json
    • 退改政策json
    • └ cancel_policy_desc
    • String
    • 在今天下午6点前可免费取消
    • 退改政策描述信息
    • └ success
    • Boolean
    • true
    • 返回响应

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaFliggyXhotelDistributionPriceRequest req = new AlibabaFliggyXhotelDistributionPriceRequest();
    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);
    req.setPromoteAppKey(1001L);
    req.setPromotionPositionId(1001L);
    req.setActivityId("1002");
    AlibabaFliggyXhotelDistributionPriceResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_fliggy_xhotel_distribution_price_response>
        <result>
            <msg_code>0</msg_code>
            <msg_info>当前请求已被限流</msg_info>
            <model>
                <search_id>searchId</search_id>
                <hotel_prices>
                    <shotel_price>
                        <shid>123456</shid>
                        <name>万豪行政公寓</name>
                        <room_prices>
                            <sroom_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>
                                    </rate_price>
                                </rate_prices>
                            </sroom_price>
                        </room_prices>
                    </shotel_price>
                </hotel_prices>
            </model>
            <success>true</success>
        </result>
    </alibaba_fliggy_xhotel_distribution_price_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

    返回
    顶部