机票航班列表
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
query_flight_request | QueryFlightRequest | 可选 | 请求入参 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | ResultDO | 返回响应 | |
|
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());
<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>{"alipayLink":"xxxxx"}</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>
<error_response> <code>50</code> <msg>Remote service error</msg> <sub_code>isv.invalid-parameter</sub_code> <sub_msg>非法参数</sub_msg> </error_response>
错误码 | 错误描述 | 解决方案 |
---|