QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlitripTransferPricesQueryRequest req = new AlitripTransferPricesQueryRequest();
req.setTraceId("1111");
req.setChannelId("20001");
req.setIsPressureTest(false);
req.setUseType(1L);
req.setIsCorpOrder(false);
req.setChannelName("耀出行");
req.setItemId(1111L);
req.setSellerId(11111L);
req.setUserId(1111L);
req.setExts("key:value");
AlitripTransferPricesQueryRequest.TransferDest obj1 = new AlitripTransferPricesQueryRequest.TransferDest();
obj1.setCountryName("中国");
obj1.setCityName("杭州");
obj1.setCountryCode("CN");
obj1.setCityCode("HGH");
obj1.setOriginCity("杭州");
obj1.setDestCity("北京");
req.setTransferDest(obj1);
AlitripTransferPricesQueryRequest.FromPlaceInfo obj2 = new AlitripTransferPricesQueryRequest.FromPlaceInfo();
obj2.setFromAddress("北京首都机场");
obj2.setFromDetailAddress("北京首都机场");
obj2.setFromLongitude("40.08188");
obj2.setFromLatitude("116.590401");
req.setFromPlaceInfo(obj2);
AlitripTransferPricesQueryRequest.ToPlaceInfo obj3 = new AlitripTransferPricesQueryRequest.ToPlaceInfo();
obj3.setToAddress("乐佳国际2号楼");
obj3.setToDetailAddress("余杭区良睦路999号");
obj3.setToLongitude("40.166602");
obj3.setToLatitude("116.266735");
req.setToPlaceInfo(obj3);
AlitripTransferPricesQueryRequest.FlightInfo obj4 = new AlitripTransferPricesQueryRequest.FlightInfo();
obj4.setFlightNo("MU5132");
obj4.setFlightFlyTime("2017-05-07 19:00:00");
obj4.setFlightDepartureTime("2017-05-07 19:00:00");
obj4.setAirportCode("PEK");
obj4.setOriginAirportCode("HGH");
obj4.setAirportTerminal("北京首都机场T1");
req.setFlightInfo(obj4);
AlitripTransferPricesQueryRequest.CarUseInfo obj5 = new AlitripTransferPricesQueryRequest.CarUseInfo();
obj5.setServiceTime("2020-02-23 21:30:00");
obj5.setServiceTimeMs("1582464600000");
obj5.setDistance("22222");
obj5.setDistanceType(0L);
obj5.setExpectedTime("2820");
obj5.setFlightDelayTime("30");
obj5.setCarTypeList(new Long[] { };
);
req.setCarUseInfo(obj5);
req.setStrategy("[1,30]");
List<AlitripTransferPricesQueryRequest.RoutePlanInfo> list7 = new ArrayList<AlitripTransferPricesQueryRequest.RoutePlanInfo>();
AlitripTransferPricesQueryRequest.RoutePlanInfo obj8 = new AlitripTransferPricesQueryRequest.RoutePlanInfo();
list7.add(obj8);
obj8.setStrategyId(30L);
List<AlitripTransferPricesQueryRequest.WaypointPoiInfo> list11 = new ArrayList<AlitripTransferPricesQueryRequest.WaypointPoiInfo>();
AlitripTransferPricesQueryRequest.WaypointPoiInfo obj12 = new AlitripTransferPricesQueryRequest.WaypointPoiInfo();
list11.add(obj12);
obj12.setLongitude("116.357483");
obj12.setLatitude("39.907234");
list9.setWaypoints(list11);
obj8.setExpectedTime(300L);
obj8.setDistance("3000");
List<AlitripTransferPricesQueryRequest.AdditionalFeeInfo> list15 = new ArrayList<AlitripTransferPricesQueryRequest.AdditionalFeeInfo>();
AlitripTransferPricesQueryRequest.AdditionalFeeInfo obj16 = new AlitripTransferPricesQueryRequest.AdditionalFeeInfo();
list15.add(obj16);
obj16.setAdditionalFeeType(1L);
obj16.setAdditionalFee("10.00");
list13.setAdditionalFees(list15);
req.setRoutePlanInfos(list7);
AlitripTransferPricesQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTransferPricesQueryRequest req = new AlitripTransferPricesQueryRequest();
req.TraceId = "1111";
req.ChannelId = "20001";
req.IsPressureTest = false;
req.UseType = 1L;
req.IsCorpOrder = false;
req.ChannelName = "耀出行";
req.ItemId = 1111L;
req.SellerId = 11111L;
req.UserId = 1111L;
req.Exts = "key:value";
AlitripTransferPricesQueryRequest.TransferDestDomain obj1 = new AlitripTransferPricesQueryRequest.TransferDestDomain();
obj1.CountryName = "中国";
obj1.CityName = "杭州";
obj1.CountryCode = "CN";
obj1.CityCode = "HGH";
obj1.OriginCity = "杭州";
obj1.DestCity = "北京";
req.TransferDest_ = obj1;
AlitripTransferPricesQueryRequest.FromPlaceInfoDomain obj2 = new AlitripTransferPricesQueryRequest.FromPlaceInfoDomain();
obj2.FromAddress = "北京首都机场";
obj2.FromDetailAddress = "北京首都机场";
obj2.FromLongitude = "40.08188";
obj2.FromLatitude = "116.590401";
req.FromPlaceInfo_ = obj2;
AlitripTransferPricesQueryRequest.ToPlaceInfoDomain obj3 = new AlitripTransferPricesQueryRequest.ToPlaceInfoDomain();
obj3.ToAddress = "乐佳国际2号楼";
obj3.ToDetailAddress = "余杭区良睦路999号";
obj3.ToLongitude = "40.166602";
obj3.ToLatitude = "116.266735";
req.ToPlaceInfo_ = obj3;
AlitripTransferPricesQueryRequest.FlightInfoDomain obj4 = new AlitripTransferPricesQueryRequest.FlightInfoDomain();
obj4.FlightNo = "MU5132";
obj4.FlightFlyTime = "2017-05-07 19:00:00";
obj4.FlightDepartureTime = "2017-05-07 19:00:00";
obj4.AirportCode = "PEK";
obj4.OriginAirportCode = "HGH";
obj4.AirportTerminal = "北京首都机场T1";
req.FlightInfo_ = obj4;
AlitripTransferPricesQueryRequest.CarUseInfoDomain obj5 = new AlitripTransferPricesQueryRequest.CarUseInfoDomain();
obj5.ServiceTime = "2020-02-23 21:30:00";
obj5.ServiceTimeMs = "1582464600000";
obj5.Distance = "22222";
obj5.DistanceType = 0L;
obj5.ExpectedTime = "2820";
obj5.FlightDelayTime = "30";
obj5.CarTypeList = new long[] { };
;
req.CarUseInfo_ = obj5;
req.Strategy = "[1,30]";
List<AlitripTransferPricesQueryRequest.RoutePlanInfoDomain> list7 = new List<AlitripTransferPricesQueryRequest.RoutePlanInfoDomain>();
AlitripTransferPricesQueryRequest.RoutePlanInfoDomain obj8 = new AlitripTransferPricesQueryRequest.RoutePlanInfoDomain();
list7.Add(obj8);
obj8.StrategyId = 30L;
List<AlitripTransferPricesQueryRequest.WaypointPoiInfoDomain> list10 = new List<AlitripTransferPricesQueryRequest.WaypointPoiInfoDomain>();
AlitripTransferPricesQueryRequest.WaypointPoiInfoDomain obj11 = new AlitripTransferPricesQueryRequest.WaypointPoiInfoDomain();
list10.Add(obj11);
obj11.Longitude = "116.357483";
obj11.Latitude = "39.907234";
obj8.Waypoints= list10;
obj8.ExpectedTime = 300L;
obj8.Distance = "3000";
List<AlitripTransferPricesQueryRequest.AdditionalFeeInfoDomain> list13 = new List<AlitripTransferPricesQueryRequest.AdditionalFeeInfoDomain>();
AlitripTransferPricesQueryRequest.AdditionalFeeInfoDomain obj14 = new AlitripTransferPricesQueryRequest.AdditionalFeeInfoDomain();
list13.Add(obj14);
obj14.AdditionalFeeType = 1L;
obj14.AdditionalFee = "10.00";
obj8.AdditionalFees= list13;
req.RoutePlanInfos_ = list7;
AlitripTransferPricesQueryResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTransferPricesQueryRequest;
$req->setTraceId("1111");
$req->setChannelId("20001");
$req->setIsPressureTest("false");
$req->setUseType("1");
$req->setIsCorpOrder("false");
$req->setChannelName("耀出行");
$req->setItemId("1111");
$req->setSellerId("11111");
$req->setUserId("1111");
$req->setExts("key:value");
$transferDest = new TransferDest;
$transferDest->country_name="中国";
$transferDest->city_name="杭州";
$transferDest->country_code="CN";
$transferDest->city_code="HGH";
$transferDest->origin_city="杭州";
$transferDest->dest_city="北京";
$req->setTransferDest(json_encode($transferDest));
$fromPlaceInfo = new FromPlaceInfo;
$fromPlaceInfo->from_address="北京首都机场";
$fromPlaceInfo->from_detail_address="北京首都机场";
$fromPlaceInfo->from_longitude="40.08188";
$fromPlaceInfo->from_latitude="116.590401";
$req->setFromPlaceInfo(json_encode($fromPlaceInfo));
$toPlaceInfo = new ToPlaceInfo;
$toPlaceInfo->to_address="乐佳国际2号楼";
$toPlaceInfo->to_detail_address="余杭区良睦路999号";
$toPlaceInfo->to_longitude="40.166602";
$toPlaceInfo->to_latitude="116.266735";
$req->setToPlaceInfo(json_encode($toPlaceInfo));
$flightInfo = new FlightInfo;
$flightInfo->flight_no="MU5132";
$flightInfo->flight_fly_time="2017-05-07 19:00:00";
$flightInfo->flight_departure_time="2017-05-07 19:00:00";
$flightInfo->airport_code="PEK";
$flightInfo->origin_airport_code="HGH";
$flightInfo->airport_terminal="北京首都机场T1";
$req->setFlightInfo(json_encode($flightInfo));
$carUseInfo = new CarUseInfo;
$carUseInfo->service_time="2020-02-23 21:30:00";
$carUseInfo->service_time_ms="1582464600000";
$carUseInfo->distance="22222";
$carUseInfo->distance_type="0";
$carUseInfo->expected_time="2820";
$carUseInfo->flight_delay_time="30";
$carUseInfo->car_type_list="";
$req->setCarUseInfo(json_encode($carUseInfo));
$req->setStrategy("[1,30]");
$routePlanInfos = new RoutePlanInfo;
$routePlanInfos->strategy_id="30";
$waypoints = new WaypointPoiInfo;
$waypoints->longitude="116.357483";
$waypoints->latitude="39.907234";
$routePlanInfos->waypoints = $waypoints;
$routePlanInfos->expected_time="300";
$routePlanInfos->distance="3000";
$additionalFees = new AdditionalFeeInfo;
$additionalFees->additional_fee_type="1";
$additionalFees->additional_fee="10.00";
$routePlanInfos->additionalFees = $additionalFees;
$req->setRoutePlanInfos(json_encode($routePlanInfos));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=qimen.alitrip.transfer.prices.query' \
-d 'partner_id=apidoc' \
-d 'sign=F83E07B64B4DE9EAD8B3A3EC2C682951' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+17%3A09%3A43' \
-d 'v=2.0' \
-d 'carUseInfo=null' \
-d 'channelId=20001' \
-d 'channelName=%E8%80%80%E5%87%BA%E8%A1%8C' \
-d 'exts=key%3Avalue' \
-d 'flightInfo=null' \
-d 'fromPlaceInfo=null' \
-d 'isCorpOrder=false' \
-d 'isPressureTest=false' \
-d 'itemId=1111' \
-d 'routePlanInfos=null' \
-d 'sellerId=11111' \
-d 'strategy=1%2C30' \
-d 'toPlaceInfo=null' \
-d 'traceId=1111' \
-d 'transferDest=null' \
-d 'useType=1' \
-d 'userId=1111'
# -*- coding: utf-8 -*-
import top.api
req=top.api.QimenAlitripTransferPricesQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.traceId="1111"
req.channelId="20001"
req.isPressureTest=false
req.useType=1
req.isCorpOrder=false
req.channelName="耀出行"
req.itemId=1111
req.sellerId=11111
req.userId=1111
req.exts="key:value"
req.transferDest="数据结构示例JSON格式"
req.fromPlaceInfo="数据结构示例JSON格式"
req.toPlaceInfo="数据结构示例JSON格式"
req.flightInfo="数据结构示例JSON格式"
req.carUseInfo="数据结构示例JSON格式"
req.strategy="[1,30]"
req.routePlanInfos="null"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"qimen.alitrip.transfer.prices.query");
add_param(pRequest,"traceId","1111");
add_param(pRequest,"channelId","20001");
add_param(pRequest,"isPressureTest","false");
add_param(pRequest,"useType","1");
add_param(pRequest,"isCorpOrder","false");
add_param(pRequest,"channelName","耀出行");
add_param(pRequest,"itemId","1111");
add_param(pRequest,"sellerId","11111");
add_param(pRequest,"userId","1111");
add_param(pRequest,"exts","key:value");
add_param(pRequest,"transferDest","数据结构JSON示例");
add_param(pRequest,"fromPlaceInfo","数据结构JSON示例");
add_param(pRequest,"toPlaceInfo","数据结构JSON示例");
add_param(pRequest,"flightInfo","数据结构JSON示例");
add_param(pRequest,"carUseInfo","数据结构JSON示例");
add_param(pRequest,"strategy","1,30");
add_param(pRequest,"routePlanInfos","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('qimen.alitrip.transfer.prices.query', {
'traceId':'1111',
'channelId':'20001',
'isPressureTest':'false',
'useType':'1',
'isCorpOrder':'false',
'channelName':'耀出行',
'itemId':'1111',
'sellerId':'11111',
'userId':'1111',
'exts':'key:value',
'transferDest':'数据结构JSON示例',
'fromPlaceInfo':'数据结构JSON示例',
'toPlaceInfo':'数据结构JSON示例',
'flightInfo':'数据结构JSON示例',
'carUseInfo':'数据结构JSON示例',
'strategy':'1,30',
'routePlanInfos':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})