TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAmapChannelCarPricesQueryRequest req = new AlibabaAmapChannelCarPricesQueryRequest();
req.setTraceId("6d684a10-873a-5c84-878c-161f15923200");
req.setMobile("15811531478");
req.setUserId(8767887L);
req.setRequireTransportTypeList("gd_express");
AlibabaAmapChannelCarPricesQueryRequest.LocationInfo obj1 = new AlibabaAmapChannelCarPricesQueryRequest.LocationInfo();
obj1.setName("首开广场(西北一门)");
obj1.setLon("116.473253");
obj1.setLat("39.993952");
obj1.setPoiId("BV11040976");
req.setStartLocation(obj1);
AlibabaAmapChannelCarPricesQueryRequest.LocationInfo obj2 = new AlibabaAmapChannelCarPricesQueryRequest.LocationInfo();
obj2.setName("育新(地铁站");
obj2.setLon("116.347328");
obj2.setLat("40.060039");
obj2.setPoiId("B0FFJI527E");
req.setEndLocation(obj2);
AlibabaAmapChannelCarPricesQueryRequest.OrderInfo obj3 = new AlibabaAmapChannelCarPricesQueryRequest.OrderInfo();
obj3.setDepartureTime(1600087832858L);
obj3.setGdServiceId(1L);
obj3.setDepAirCode("SHA");
obj3.setPickUpDelayTime(10L);
obj3.setFlightDate(1600087832858L);
obj3.setArrAirCode("SHA");
obj3.setFlightNo("MU5118");
obj3.setSubGdServiceId(1L);
obj3.setFreeMinute(10L);
obj3.setEquityKm(10L);
req.setOrderInfo(obj3);
req.setClientSource("amap.car");
req.setExcludeCpSourceList("car_didi_api");
req.setIdfa("6d684a10-873a-5c84-878c-161f15923200");
req.setImei("6d684a10-873a-5c84-878c-161f15923200");
req.setRequireCpSourceList("car_didi_api");
AlibabaAmapChannelCarPricesQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAmapChannelCarPricesQueryRequest req = new AlibabaAmapChannelCarPricesQueryRequest();
req.TraceId = "6d684a10-873a-5c84-878c-161f15923200";
req.Mobile = "15811531478";
req.UserId = 8767887L;
req.RequireTransportTypeList = "gd_express";
AlibabaAmapChannelCarPricesQueryRequest.LocationInfoDomain obj1 = new AlibabaAmapChannelCarPricesQueryRequest.LocationInfoDomain();
obj1.Name = "首开广场(西北一门)";
obj1.Lon = "116.473253";
obj1.Lat = "39.993952";
obj1.PoiId = "BV11040976";
req.StartLocation_ = obj1;
AlibabaAmapChannelCarPricesQueryRequest.LocationInfoDomain obj2 = new AlibabaAmapChannelCarPricesQueryRequest.LocationInfoDomain();
obj2.Name = "育新(地铁站";
obj2.Lon = "116.347328";
obj2.Lat = "40.060039";
obj2.PoiId = "B0FFJI527E";
req.EndLocation_ = obj2;
AlibabaAmapChannelCarPricesQueryRequest.OrderInfoDomain obj3 = new AlibabaAmapChannelCarPricesQueryRequest.OrderInfoDomain();
obj3.DepartureTime = 1600087832858L;
obj3.GdServiceId = 1L;
obj3.DepAirCode = "SHA";
obj3.PickUpDelayTime = 10L;
obj3.FlightDate = 1600087832858L;
obj3.ArrAirCode = "SHA";
obj3.FlightNo = "MU5118";
obj3.SubGdServiceId = 1L;
obj3.FreeMinute = 10L;
obj3.EquityKm = 10L;
req.OrderInfo_ = obj3;
req.ClientSource = "amap.car";
req.ExcludeCpSourceList = "car_didi_api";
req.Idfa = "6d684a10-873a-5c84-878c-161f15923200";
req.Imei = "6d684a10-873a-5c84-878c-161f15923200";
req.RequireCpSourceList = "car_didi_api";
AlibabaAmapChannelCarPricesQueryResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAmapChannelCarPricesQueryRequest;
$req->setTraceId("6d684a10-873a-5c84-878c-161f15923200");
$req->setMobile("15811531478");
$req->setUserId("8767887");
$req->setRequireTransportTypeList("gd_express");
$start_location = new LocationInfo;
$start_location->name="首开广场(西北一门)";
$start_location->lon="116.473253";
$start_location->lat="39.993952";
$start_location->poi_id="BV11040976";
$req->setStartLocation(json_encode($start_location));
$end_location = new LocationInfo;
$end_location->name="育新(地铁站";
$end_location->lon="116.347328";
$end_location->lat="40.060039";
$end_location->poi_id="B0FFJI527E";
$req->setEndLocation(json_encode($end_location));
$order_info = new OrderInfo;
$order_info->departure_time="1600087832858";
$order_info->gd_service_id="1";
$order_info->dep_air_code="SHA";
$order_info->pick_up_delay_time="10";
$order_info->flight_date="1600087832858";
$order_info->arr_air_code="SHA";
$order_info->flight_no="MU5118";
$order_info->sub_gd_service_id="1";
$order_info->free_minute="10";
$order_info->equity_km="10";
$req->setOrderInfo(json_encode($order_info));
$req->setClientSource("amap.car");
$req->setExcludeCpSourceList("car_didi_api");
$req->setIdfa("6d684a10-873a-5c84-878c-161f15923200");
$req->setImei("6d684a10-873a-5c84-878c-161f15923200");
$req->setRequireCpSourceList("car_didi_api");
$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=alibaba.amap.channel.car.prices.query' \
-d 'partner_id=apidoc' \
-d 'sign=90E19D40F9571EEB5E519F1C4F245EE8' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+13%3A42%3A02' \
-d 'v=2.0' \
-d 'client_source=amap.car' \
-d 'end_location=null' \
-d 'exclude_cp_source_list=car_didi_api' \
-d 'idfa=6d684a10-873a-5c84-878c-161f15923200' \
-d 'imei=6d684a10-873a-5c84-878c-161f15923200' \
-d 'mobile=15811531478' \
-d 'order_info=null' \
-d 'require_cp_source_list=car_didi_api' \
-d 'require_transport_type_list=gd_express' \
-d 'start_location=null' \
-d 'trace_id=6d684a10-873a-5c84-878c-161f15923200' \
-d 'user_id=8767887'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAmapChannelCarPricesQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.trace_id="6d684a10-873a-5c84-878c-161f15923200"
req.mobile="15811531478"
req.user_id=8767887
req.require_transport_type_list="gd_express"
req.start_location=""
req.end_location=""
req.order_info=""
req.client_source="amap.car"
req.exclude_cp_source_list="car_didi_api"
req.idfa="6d684a10-873a-5c84-878c-161f15923200"
req.imei="6d684a10-873a-5c84-878c-161f15923200"
req.require_cp_source_list="car_didi_api"
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,"alibaba.amap.channel.car.prices.query");
add_param(pRequest,"trace_id","6d684a10-873a-5c84-878c-161f15923200");
add_param(pRequest,"mobile","15811531478");
add_param(pRequest,"user_id","8767887");
add_param(pRequest,"require_transport_type_list","gd_express");
add_param(pRequest,"start_location","数据结构JSON示例");
add_param(pRequest,"end_location","数据结构JSON示例");
add_param(pRequest,"order_info","数据结构JSON示例");
add_param(pRequest,"client_source","amap.car");
add_param(pRequest,"exclude_cp_source_list","car_didi_api");
add_param(pRequest,"idfa","6d684a10-873a-5c84-878c-161f15923200");
add_param(pRequest,"imei","6d684a10-873a-5c84-878c-161f15923200");
add_param(pRequest,"require_cp_source_list","car_didi_api");
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('alibaba.amap.channel.car.prices.query', {
'trace_id':'6d684a10-873a-5c84-878c-161f15923200',
'mobile':'15811531478',
'user_id':'8767887',
'require_transport_type_list':'gd_express',
'start_location':'数据结构JSON示例',
'end_location':'数据结构JSON示例',
'order_info':'数据结构JSON示例',
'client_source':'amap.car',
'exclude_cp_source_list':'car_didi_api',
'idfa':'6d684a10-873a-5c84-878c-161f15923200',
'imei':'6d684a10-873a-5c84-878c-161f15923200',
'require_cp_source_list':'car_didi_api'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})