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

alibaba.fliggy.cps.hotel.full.sync (四海通代订中心安全备案关键酒店信息同步)

四海通代订中心酒店同步

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
query_hotel_page_request QueryHotelPageRequest 必须 请求入参
  • └ activity_id
  • String
  • 必须
  • test_huodong
  • 活动id
  • └ promotion_position_id
  • Number
  • 必须
  • 123412341234
  • 推广位id
  • └ page_no
  • Number
  • 可选
  • 1
  • 页码(分页模式必传,和游标模式二选一)
  • └ page_size
  • Number
  • 必须
  • 20
  • 页大小
  • └ fliggy_app_key
  • Number
  • 必须
  • 87654321
  • 媒体app_key
  • └ check_in
  • String
  • 必须
  • 2023-06-01
  • 酒店入住日期
  • └ check_out
  • String
  • 必须
  • 2023-06-02
  • 酒店离店日期(不能和入住同一天)
  • └ user_id
  • Number
  • 必须
  • 123
  • 获取价格时候用来匹配优惠的用户id
  • └ sh_id
  • String
  • 可选
  • sdjiasdjiqjid
  • 酒店id,传递该参数,结果基于酒店id过滤,精准匹配,至多返回1条数据
  • └ next_index
  • Number
  • 可选
  • 23123123123
  • 游标模式必传,第一次传0,后续每次传上次结果返回的游标

响应参数

名称 类型 示例值 描述
is_success Boolean true 是否请求成功
result_code String 200 状态码
model QueryHotelPageResponse 数据体
  • hotel_list
  • HotelVO []
  • 酒店列表
  • └ sh_id
  • String
  • dwqdqwdqwdqwdqw
  • 酒店id
  • └ hotel_name
  • String
  • 某某酒店
  • 酒店名称
  • hotel_room_type_list
  • HotelRoomTypeVO []
  • 房型列表
  • └ sr_id
  • String
  • dqwdqwdqwd
  • 房型id
  • └ sr_name
  • String
  • 大床房
  • 房型名称
  • └ price
  • Number
  • 888
  • 最低价格
  • └ breakfast_quantity
  • Number
  • 2
  • 最低价格早餐份数
  • breakfast_dict
  • BreakfastVO
  • {"ZERO_BREAKFAST":100,"ONE_BREAKFAST":200}
  • 含早价格表
  • └ zero_breakfast
  • Number
  • 100
  • 无早价格
  • └ one_breakfast
  • Number
  • 200
  • 单早价格
  • └ two_breakfast
  • Number
  • 300
  • 双早价格
  • └ three_breakfast
  • Number
  • 400
  • 三早价格
  • └ four_breakfast
  • Number
  • 500
  • 四早价格
  • └ five_breakfast
  • Number
  • 600
  • 五早价格
  • └ country
  • String
  • China
  • 酒店所在国家
  • └ province
  • Number
  • 110000
  • 省份编码
  • └ city
  • Number
  • 110100
  • 城市编码
  • └ address
  • String
  • 详细地址
  • 地址
  • └ tel
  • String
  • 400823823
  • 联系电话
  • └ star
  • String
  • 0
  • 星级,0-暂无,1-经济连锁,2-二星及以下,3-舒适,4-高档,5-豪华
  • └ longitude
  • String
  • 111.111
  • 经度
  • └ latitude
  • String
  • 111.111
  • 纬度
  • └ total_count
  • Number
  • 1000
  • 数据总条数(提示调用方分页使用)
  • └ next_index
  • Number
  • 1231231213
  • 当前搜索结果的最大索引值,若返回0则相当于游标回到了数据的起点
result_message String 提示

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaFliggyCpsHotelFullSyncRequest req = new AlibabaFliggyCpsHotelFullSyncRequest();
AlibabaFliggyCpsHotelFullSyncRequest.QueryHotelPageRequest obj1 = new AlibabaFliggyCpsHotelFullSyncRequest.QueryHotelPageRequest();
obj1.setActivityId("test_huodong");
obj1.setPromotionPositionId(123412341234L);
obj1.setPageNo(1L);
obj1.setPageSize(20L);
obj1.setFliggyAppKey(87654321L);
obj1.setCheckIn("2023-06-01");
obj1.setCheckOut("2023-06-02");
obj1.setUserId(123L);
obj1.setShId("sdjiasdjiqjid");
obj1.setNextIndex(23123123123L);
req.setQueryHotelPageRequest(obj1);
AlibabaFliggyCpsHotelFullSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_fliggy_cps_hotel_full_sync_response>
    <is_success>true</is_success>
    <result_code>200</result_code>
    <model>
        <hotel_list>
            <hotel_v_o>
                <sh_id>dwqdqwdqwdqwdqw</sh_id>
                <hotel_name>某某酒店</hotel_name>
                <hotel_room_type_list>
                    <hotel_room_type_v_o>
                        <sr_id>dqwdqwdqwd</sr_id>
                        <sr_name>大床房</sr_name>
                        <price>888</price>
                        <breakfast_quantity>2</breakfast_quantity>
                        <breakfast_dict>
                            <zero_breakfast>100</zero_breakfast>
                            <one_breakfast>200</one_breakfast>
                            <two_breakfast>300</two_breakfast>
                            <three_breakfast>400</three_breakfast>
                            <four_breakfast>500</four_breakfast>
                            <five_breakfast>600</five_breakfast>
                        </breakfast_dict>
                    </hotel_room_type_v_o>
                </hotel_room_type_list>
                <country>China</country>
                <province>110000</province>
                <city>110100</city>
                <address>详细地址</address>
                <tel>400823823</tel>
                <star>0</star>
                <longitude>111.111</longitude>
                <latitude>111.111</latitude>
            </hotel_v_o>
        </hotel_list>
        <total_count>1000</total_count>
        <next_index>1231231213</next_index>
    </model>
    <result_message>无</result_message>
</alibaba_fliggy_cps_hotel_full_sync_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

返回
顶部