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

alibaba.fliggy.flight.list (机票航班列表)

机票航班列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
query_flight_request QueryFlightRequest 可选 请求入参
  • └ child_cnt
  • String
  • 可选
  • 1
  • 儿童人数,「不」要求过滤可携带儿童航班
  • └ adt_cnt
  • String
  • 可选
  • 1
  • 成人人数
  • └ arr_city
  • String
  • 必须
  • HGH
  • 到达城市三字码
  • └ mobile
  • String
  • 可选
  • 134xxxx8978
  • 用户手机号
  • └ dep_city
  • String
  • 必须
  • BJS
  • 出发城市三字码
  • └ cabin
  • String
  • 可选
  • ALL_CABIN(0, "不限"), * Y(1, "经济舱"), * FC(2, "头等舱和商务舱"), * F(4, "头等舱"), * C(5, "商务舱")
  • 仓位类型,「不」要求过滤指定仓位
  • └ dep_date
  • String
  • 必须
  • 2024-01-01
  • 出发日期
  • └ alipay_uid
  • String
  • 可选
  • 2088123423
  • 支付宝账号
  • └ with_qr_code
  • Boolean
  • 可选
  • false
  • 是否需要二维码
  • └ activity_id
  • String
  • 必须
  • sht_flight
  • 四海通推广活动id
  • └ promotion_position_id
  • Number
  • 必须
  • 123456
  • 四海通推广位id
  • └ client
  • String
  • 可选
  • weixin
  • └ app_key
  • Number
  • 必须
  • 123456
  • 四海通媒体id
  • └ infant_cnt
  • String
  • 必须
  • 1
  • 婴儿人数,「不」要求过滤可携带婴儿航班
  • └ top_app_key
  • String
  • 必须
  • 123456
  • 开放平台注册的appkey

响应参数

名称 类型 示例值 描述
result ResultDO 返回响应
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ result_code
  • String
  • 200
  • 结果码
  • model
  • FlightResponse
  • 航班列表
  • flight_item_vo_list
  • FlightItemVO []
  • 航班列表
  • └ dep_time
  • Number
  • 1721883000000
  • 出发时间时间戳
  • └ adult_price
  • String
  • 230
  • 成人价格,精确到元
  • └ arr_terminal_name
  • String
  • T1
  • 到达航站楼
  • └ dep_airport
  • String
  • BJS
  • 出发机场三字码
  • └ infant_price
  • String
  • 120
  • 婴儿价格,精确到元
  • └ share_material
  • String
  • {"alipayLink":"xxxxx"}
  • 推广链接
  • └ dep_airport_name
  • String
  • 萧山国际机场
  • 出发机场名称
  • airlines
  • AirlineVO []
  • 航班、航司信息
  • └ cabin_class
  • String
  • 经济舱
  • 舱位等级
  • └ code
  • String
  • AB
  • 航司二字码
  • └ quantity
  • String
  • 0~9: 剩余0~9个座位; A: 大于9个座位 个别航司大于4是A
  • 舱位所剩余座位数量
  • └ transfer_time
  • Number
  • 100
  • 中转时间(该航段是中转才会有)
  • └ aircraft
  • String
  • 大型
  • 机型
  • └ transit_city_name
  • String
  • 杭州
  • 中转城市名称 (该航段是中转才会有
  • └ meal
  • String
  • 面包
  • 当前仓等下的餐食信息
  • └ flight_no
  • String
  • H1234
  • 航班号
  • stop_infos
  • FlightItemStopInfoVO []
  • 经停信息
  • └ stop_city_code
  • String
  • HGH
  • 经停城市码
  • └ stop_city_name
  • String
  • 杭州
  • 经停城市名称
  • └ stop_airport
  • String
  • 萧山国际机场
  • 经停机场
  • └ shop_time
  • Number
  • 2000
  • 经停时间s
  • └ aircraft_size
  • String
  • LARGE
  • 机型大小:Y ● LARGE-大机型 ● MEDIUM-中机型 ● SMALL-小机型
  • └ name
  • String
  • 东方航空
  • 航司名称
  • └ is_share
  • Boolean
  • true
  • 是否是共享
  • └ cabin_class_name
  • String
  • 经济舱
  • 舱位等级名称如果存在自定义则展示自定义名称,否则展示通用名称
  • └ short_name
  • String
  • 东航
  • 航司简称
  • └ transit_city
  • String
  • HGH
  • 中转城市code (该航段是中转才会有
  • └ icon_url
  • String
  • http://xxxx
  • 航司logo
  • └ operating_airline
  • String
  • AB
  • 共享航班-承运航司二字码
  • └ operating_flight_no
  • String
  • H1234
  • 共享航班-承运航班号
  • └ arr_airport
  • String
  • HGH
  • 到达机场三字码
  • └ arr_airport_name
  • String
  • 萧山国际机票
  • 到达机场名称
  • └ child_price
  • String
  • 130
  • 儿童价格,精确到元
  • └ dep_terminal_name
  • String
  • T2
  • 出发航站楼
  • └ arr_time
  • Number
  • 1721883000000
  • 到达时间时间戳
  • └ discount
  • String
  • 经济舱3.5折
  • 优惠信息描述
  • └ dep_airport_short_name
  • String
  • 浦东
  • 出发机场简称
  • └ arr_airport_short_name
  • String
  • 浦东
  • 到达机场简称
  • └ adult_sell_price
  • String
  • 260
  • 成人价格,销售价,精确到元
  • └ adult_after_promotion_price
  • String
  • 200
  • 成人价格,优惠后价,精确到
  • └ child_sell_price
  • String
  • 130
  • 儿童价格,销售价,精确到元
  • └ child_after_promotion_price
  • String
  • 110
  • 儿童价格,优惠后价,精确到元
  • └ infant_sell_price
  • String
  • 100
  • 婴儿价格,销售价,精确到元
  • └ infant_after_promotion_price
  • String
  • 80
  • 婴儿价格,优惠后价,精确到元
  • └ result_message
  • String
  • 参数异常
  • 异常信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaFliggyFlightListRequest req = new AlibabaFliggyFlightListRequest();
AlibabaFliggyFlightListRequest.QueryFlightRequest obj1 = new AlibabaFliggyFlightListRequest.QueryFlightRequest();
obj1.setChildCnt("1");
obj1.setAdtCnt("1");
obj1.setArrCity("HGH");
obj1.setMobile("134xxxx8978");
obj1.setDepCity("BJS");
obj1.setCabin("ALL_CABIN(0, \"不限\"),      * Y(1, \"经济舱\"),      * FC(2, \"头等舱和商务舱\"),      * F(4, \"头等舱\"),      * C(5, \"商务舱\")");
obj1.setDepDate("2024-01-01");
obj1.setAlipayUid("2088123423");
obj1.setWithQrCode(false);
obj1.setActivityId("sht_flight");
obj1.setPromotionPositionId(123456L);
obj1.setClient("weixin");
obj1.setAppKey(123456L);
obj1.setInfantCnt("1");
obj1.setTopAppKey("123456");
req.setQueryFlightRequest(obj1);
AlibabaFliggyFlightListResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_fliggy_flight_list_response>
    <result>
        <success>true</success>
        <result_code>200</result_code>
        <model>
            <flight_item_vo_list>
                <flight_item_v_o>
                    <dep_time>1721883000000</dep_time>
                    <adult_price>230</adult_price>
                    <arr_terminal_name>T1</arr_terminal_name>
                    <dep_airport>BJS</dep_airport>
                    <infant_price>120</infant_price>
                    <share_material>{&quot;alipayLink&quot;:&quot;xxxxx&quot;}</share_material>
                    <dep_airport_name>萧山国际机场</dep_airport_name>
                    <airlines>
                        <airline_v_o>
                            <cabin_class>经济舱</cabin_class>
                            <code>AB</code>
                            <quantity>0~9: 剩余0~9个座位; A: 大于9个座位 个别航司大于4是A</quantity>
                            <transfer_time>100</transfer_time>
                            <aircraft>大型</aircraft>
                            <transit_city_name>杭州</transit_city_name>
                            <meal>面包</meal>
                            <flight_no>H1234</flight_no>
                            <stop_infos>
                                <flight_item_stop_info_v_o>
                                    <stop_city_code>HGH</stop_city_code>
                                    <stop_city_name>杭州</stop_city_name>
                                    <stop_airport>萧山国际机场</stop_airport>
                                    <shop_time>2000</shop_time>
                                </flight_item_stop_info_v_o>
                            </stop_infos>
                            <aircraft_size>LARGE</aircraft_size>
                            <name>东方航空</name>
                            <is_share>true</is_share>
                            <cabin_class_name>经济舱</cabin_class_name>
                            <short_name>东航</short_name>
                            <transit_city>HGH</transit_city>
                            <icon_url>http://xxxx</icon_url>
                            <operating_airline>AB</operating_airline>
                            <operating_flight_no>H1234</operating_flight_no>
                        </airline_v_o>
                    </airlines>
                    <arr_airport>HGH</arr_airport>
                    <arr_airport_name>萧山国际机票</arr_airport_name>
                    <child_price>130</child_price>
                    <dep_terminal_name>T2</dep_terminal_name>
                    <arr_time>1721883000000</arr_time>
                    <discount>经济舱3.5折</discount>
                    <dep_airport_short_name>浦东</dep_airport_short_name>
                    <arr_airport_short_name>浦东</arr_airport_short_name>
                    <adult_sell_price>260</adult_sell_price>
                    <adult_after_promotion_price>200</adult_after_promotion_price>
                    <child_sell_price>130</child_sell_price>
                    <child_after_promotion_price>110</child_after_promotion_price>
                    <infant_sell_price>100</infant_sell_price>
                    <infant_after_promotion_price>80</infant_after_promotion_price>
                </flight_item_v_o>
            </flight_item_vo_list>
        </model>
        <result_message>参数异常</result_message>
    </result>
</alibaba_fliggy_flight_list_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

返回
顶部