【商旅】火车票行业搜索接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
rq | TrainSearchRq | 可选 | 入参 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | HisvResult | module | 出参 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlitripBtripSupplychainTrainIndustrySearchRequest req = new AlitripBtripSupplychainTrainIndustrySearchRequest(); AlitripBtripSupplychainTrainIndustrySearchRequest.TrainSearchRq obj1 = new AlitripBtripSupplychainTrainIndustrySearchRequest.TrainSearchRq(); obj1.setArrAreaCode( "203223" ); obj1.setArrAreaName( "上海" ); obj1.setArrLocation( "上海虹桥" ); obj1.setArrLocationCode( "123" ); obj1.setDepAreaCode( "2334334" ); obj1.setDepAreaName( "北京" ); obj1.setDepDate( "2020-03-08" ); obj1.setDepLocation( "北京西" ); obj1.setDepLocationCode( "123" ); obj1.setPassengerType(0L); obj1.setSortType(0L); obj1.setCorpId( "123" ); req.setRq(obj1); AlitripBtripSupplychainTrainIndustrySearchResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | < alitrip_btrip_supplychain_train_industry_search_response > < result > < module > < arr_city >123</ arr_city > < arr_location >123</ arr_location > < dep_city >123</ dep_city > < dep_date >2021-05-19</ dep_date > < dep_location >123</ dep_location > < has_more_train >false</ has_more_train > < show_trans_guide >false</ show_trans_guide > < trains > < train_station_vo > < arr_day_tag >+1</ arr_day_tag > < arr_time >07:30</ arr_time > < arr_time_full >2017-11-11 07:30:00</ arr_time_full > < arrive_station >北京西</ arrive_station > < arrive_station_code >TNC</ arrive_station_code > < cost_time >12时32分</ cost_time > < cost_time_int >108</ cost_time_int > < dep_time >07:30</ dep_time > < dep_time_full >2017-11-11 07:30:00</ dep_time_full > < depart_station >北京西</ depart_station > < depart_station_code >VNP</ depart_station_code > < end_station >0</ end_station > < has_more_train >false</ has_more_train > < has_stock >0</ has_stock > < pre_sell_date_str >2018-08-08 11:00:00</ pre_sell_date_str > < price >1</ price > < revival_train >false</ revival_train > < seat_types > < seat_vo > < houbu_price >1</ houbu_price > < price >1</ price > < seat_name >123</ seat_name > < seat_type >1</ seat_type > < sleeper_price >100</ sleeper_price > < stock >1</ stock > </ seat_vo > </ seat_types > < show_id_icon >false</ show_id_icon > < silence_compartment >false</ silence_compartment > < start_station >0</ start_station > < train_no >G101</ train_no > < train_type >1</ train_type > </ train_station_vo > </ trains > </ module > < result_code >0</ result_code > < result_msg >成功</ result_msg > < is_success >true</ is_success > </ result > </ alitrip_btrip_supplychain_train_industry_search_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|