文档中心 > API类目 > 酒店导购API

taobao.fliggy.hotelprice.get (飞猪酒店报价接口)

提供菲住酒店报价的接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_top_hotel_price_param TopHotelPriceParam 可选 入参
  • └ check_in
  • String
  • 必须
  • 2021-10-01
  • 入住日期
  • └ check_out
  • String
  • 必须
  • 2021-10-02
  • 离店日期
  • └ feizhu_new
  • Boolean
  • 可选
  • false
  • 菲住首住优惠
  • └ open_id
  • String
  • 可选
  • -1
  • 用户id
  • └ rate_key
  • String
  • 可选
  • 0
  • 查询单个rate
  • └ shids
  • String
  • 必须
  • 10003206,50192691
  • 标准酒店shid
  • └ source
  • String
  • 必须
  • 1
  • 来源,由提供方分配
  • └ type
  • Number
  • 可选
  • 1
  • 实时
  • └ version
  • Number
  • 可选
  • 0
  • 版本控制

响应参数

名称 类型 示例值 描述
result TopHotelPriceResult 结果
  • └ error_message
  • String
  • npe
  • 错误信息
  • top_hotel_prices
  • TopHotelPrice []
  • 酒店报价
  • └ check_in
  • Date
  • 2021-10-01
  • 入住日期
  • └ check_out
  • Date
  • 2021-10-02
  • 离店日期
  • └ eagle_trace_id
  • String
  • 11
  • traceId
  • └ search_id
  • String
  • 111
  • searchId
  • └ shid
  • Number
  • 111
  • 标准酒店shid
  • sroom_type_prices
  • TopSroomTypePrice []
  • 房型报价
  • └ bed_type_string
  • String
  • 大床
  • 床型
  • └ name
  • String
  • 标准大床房
  • 房型
  • rate_prices
  • TopRatePrice []
  • 商品报价
  • └ board_nums
  • String []
  • [1]
  • 餐食
  • └ board_types
  • String []
  • [1]
  • 餐食类型
  • └ breakfast
  • String
  • 含早
  • 早餐描述
  • └ can_dawn_book
  • Boolean
  • false
  • 是否可凌晨预订
  • └ cancel_policy_desc
  • String
  • 免费取消
  • 取消政策描述
  • └ cancel_policy_hours
  • String []
  • [6]
  • 取消政策提前小时数
  • └ cancel_policy_type
  • Number
  • [1]
  • 取消政策类型
  • └ cancel_policy_values
  • String []
  • [1]
  • 取消政策值
  • └ credit_pay
  • Boolean
  • false
  • 是否可信用支付
  • └ currency_code
  • String
  • CNY
  • 币种
  • └ dawn_book_end_time
  • String
  • 06:00
  • 凌晨预订截止时间
  • └ dawn_book_start_time
  • String
  • 00:00
  • 凌晨预订开始时间
  • └ end_time_daily
  • String
  • 16:00
  • 每日截止时间
  • └ first_stay
  • Boolean
  • false
  • 是否是首住
  • └ guarantee_start_time
  • String
  • 00:00
  • 担保开始时间
  • └ guarantee_type
  • Number
  • 1
  • 担保类型
  • └ h5_buy_url
  • String
  • https://h5...
  • h5下单页链接
  • └ instant_confirm
  • Boolean
  • false
  • 是否即时确认
  • └ inventory_price
  • String
  • {"price":110}
  • 库存价格
  • └ item_id
  • Number
  • 111
  • 商品id
  • └ member_level
  • Number
  • 2
  • 商品需要的会员等级
  • └ member_price
  • Boolean
  • true
  • 是否是会员价
  • └ member_rights_types
  • Number []
  • [1]
  • 会员权益
  • └ min_adv_hours
  • Number
  • 5
  • 最小提前小时数
  • └ min_days
  • Number
  • 1
  • 最小间隔天数
  • └ nod
  • Number
  • 1
  • 间隔天数
  • └ nop
  • Number
  • 2
  • 人数
  • └ partner_member
  • Boolean
  • true
  • 用户是否是会员
  • └ payment_type_byte
  • byte
  • 1
  • 支付类型
  • └ promotion_info
  • String
  • [{"umpId":111,"type":1,"amount":100,"toolCode":1}]
  • 营销信息
  • └ rate_id
  • Number
  • 111
  • rateId
  • └ rate_plan_name
  • String
  • 含早可取消
  • rp名称
  • └ rp_id
  • Number
  • 111
  • rpId
  • └ start_time_daily
  • String
  • 00:00
  • 每日开始时间
  • └ tail_room
  • Boolean
  • false
  • 是否是尾房
  • └ tail_start_time
  • String
  • 18:00
  • 尾房开始时间
  • └ user_member_level
  • Number
  • 2
  • 用户的会员等级
  • └ srid
  • Number
  • 222
  • 标准房型id
  • └ window_type
  • String
  • 有窗
  • 窗型

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
FliggyHotelpriceGetRequest req = new FliggyHotelpriceGetRequest();
FliggyHotelpriceGetRequest.TopHotelPriceParam obj1 = new FliggyHotelpriceGetRequest.TopHotelPriceParam();
obj1.setCheckIn("2021-10-01");
obj1.setCheckOut("2021-10-02");
obj1.setFeizhuNew(false);
obj1.setOpenId("-1");
obj1.setRateKey("0");
obj1.setShids("10003206,50192691");
obj1.setSource("1");
obj1.setType(1L);
obj1.setVersion(0L);
req.setParamTopHotelPriceParam(obj1);
FliggyHotelpriceGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<fliggy_hotelprice_get_response>
    <result>
        <error_message>npe</error_message>
        <top_hotel_prices>
            <top_hotel_price>
                <check_in>2021-10-01</check_in>
                <check_out>2021-10-02</check_out>
                <eagle_trace_id>11</eagle_trace_id>
                <search_id>111</search_id>
                <shid>111</shid>
                <sroom_type_prices>
                    <top_sroom_type_price>
                        <bed_type_string>大床</bed_type_string>
                        <name>标准大床房</name>
                        <rate_prices>
                            <top_rate_price>
                                <board_nums>
                                    <string>[1]</string>
                                </board_nums>
                                <board_types>
                                    <string>[1]</string>
                                </board_types>
                                <breakfast>含早</breakfast>
                                <can_dawn_book>false</can_dawn_book>
                                <cancel_policy_desc>免费取消</cancel_policy_desc>
                                <cancel_policy_hours>
                                    <string>[6]</string>
                                </cancel_policy_hours>
                                <cancel_policy_type>[1]</cancel_policy_type>
                                <cancel_policy_values>
                                    <string>[1]</string>
                                </cancel_policy_values>
                                <credit_pay>false</credit_pay>
                                <currency_code>CNY</currency_code>
                                <dawn_book_end_time>06:00</dawn_book_end_time>
                                <dawn_book_start_time>00:00</dawn_book_start_time>
                                <end_time_daily>16:00</end_time_daily>
                                <first_stay>false</first_stay>
                                <guarantee_start_time>00:00</guarantee_start_time>
                                <guarantee_type>1</guarantee_type>
                                <h5_buy_url>https://h5...</h5_buy_url>
                                <instant_confirm>false</instant_confirm>
                                <inventory_price>{&quot;price&quot;:110}</inventory_price>
                                <item_id>111</item_id>
                                <member_level>2</member_level>
                                <member_price>true</member_price>
                                <member_rights_types>
                                    <number>[1]</number>
                                </member_rights_types>
                                <min_adv_hours>5</min_adv_hours>
                                <min_days>1</min_days>
                                <nod>1</nod>
                                <nop>2</nop>
                                <partner_member>true</partner_member>
                                <payment_type_byte>1</payment_type_byte>
                                <promotion_info>[{&quot;umpId&quot;:111,&quot;type&quot;:1,&quot;amount&quot;:100,&quot;toolCode&quot;:1}]</promotion_info>
                                <rate_id>111</rate_id>
                                <rate_plan_name>含早可取消</rate_plan_name>
                                <rp_id>111</rp_id>
                                <start_time_daily>00:00</start_time_daily>
                                <tail_room>false</tail_room>
                                <tail_start_time>18:00</tail_start_time>
                                <user_member_level>2</user_member_level>
                            </top_rate_price>
                        </rate_prices>
                        <srid>222</srid>
                        <window_type>有窗</window_type>
                    </top_sroom_type_price>
                </sroom_type_prices>
            </top_hotel_price>
        </top_hotel_prices>
    </result>
</fliggy_hotelprice_get_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

返回
顶部