TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsStationFenceAsyncRequest req = new LogisticsStationFenceAsyncRequest();
LogisticsStationFenceAsyncRequest.StationFenceOperateRequest obj1 = new LogisticsStationFenceAsyncRequest.StationFenceOperateRequest();
obj1.setRequestTime(1656674541000L);
obj1.setRequestId("1656674541000_001");
obj1.setSupplierId("10000000001");
obj1.setStationCode("ST001");
obj1.setServiceType("3");
List<LogisticsStationFenceAsyncRequest.StationFenceParam> list3 = new ArrayList<LogisticsStationFenceAsyncRequest.StationFenceParam>();
LogisticsStationFenceAsyncRequest.StationFenceParam obj4 = new LogisticsStationFenceAsyncRequest.StationFenceParam();
list3.add(obj4);
obj4.setOutFenceCode("FC001");
obj4.setStationFenceWkt("POLYGON((120.020513 30.279902,120.023989 30.280847,120.02562 30.281255,120.026564 30.281644,120.028817 30.28207,120.030105 30.282126,120.030555 30.280365,120.030834 30.27955,120.031027 30.278197,120.031263 30.277308,120.029482 30.277141,120.028731 30.277122,120.027873 30.277067,120.026843 30.277289,120.026028 30.277289,120.02532 30.277196,120.024547 30.276956,120.023818 30.276548,120.022487 30.276344,120.021994 30.276122,120.02165 30.2769,120.020513 30.279902))");
obj4.setStatus(1L);
obj4.setServiceCodeList(""22010160"");
obj4.setCoverAddressList(new Long[] { 330110005 };
);
obj4.setSupportBrandList(""STO"");
obj1.setStationFenceList(list3);
req.setStationFenceOperateRequest(obj1);
LogisticsStationFenceAsyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
LogisticsStationFenceAsyncRequest req = new LogisticsStationFenceAsyncRequest();
LogisticsStationFenceAsyncRequest.StationFenceOperateRequestDomain obj1 = new LogisticsStationFenceAsyncRequest.StationFenceOperateRequestDomain();
obj1.RequestTime = 1656674541000L;
obj1.RequestId = "1656674541000_001";
obj1.SupplierId = "10000000001";
obj1.StationCode = "ST001";
obj1.ServiceType = "3";
List<LogisticsStationFenceAsyncRequest.StationFenceParamDomain> list3 = new List<LogisticsStationFenceAsyncRequest.StationFenceParamDomain>();
LogisticsStationFenceAsyncRequest.StationFenceParamDomain obj4 = new LogisticsStationFenceAsyncRequest.StationFenceParamDomain();
list3.Add(obj4);
obj4.OutFenceCode = "FC001";
obj4.StationFenceWkt = "POLYGON((120.020513 30.279902,120.023989 30.280847,120.02562 30.281255,120.026564 30.281644,120.028817 30.28207,120.030105 30.282126,120.030555 30.280365,120.030834 30.27955,120.031027 30.278197,120.031263 30.277308,120.029482 30.277141,120.028731 30.277122,120.027873 30.277067,120.026843 30.277289,120.026028 30.277289,120.02532 30.277196,120.024547 30.276956,120.023818 30.276548,120.022487 30.276344,120.021994 30.276122,120.02165 30.2769,120.020513 30.279902))";
obj4.Status = 1L;
obj4.ServiceCodeList = ""22010160"";
obj4.CoverAddressList = new long[] { 330110005 };
;
obj4.SupportBrandList = ""STO"";
obj1.StationFenceList= list3;
req.StationFenceOperateRequest_ = obj1;
LogisticsStationFenceAsyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new LogisticsStationFenceAsyncRequest;
$station_fence_operate_request = new StationFenceOperateRequest;
$station_fence_operate_request->request_time="1656674541000";
$station_fence_operate_request->request_id="1656674541000_001";
$station_fence_operate_request->supplier_id="10000000001";
$station_fence_operate_request->station_code="ST001";
$station_fence_operate_request->service_type="3";
$station_fence_list = new StationFenceParam;
$station_fence_list->out_fence_code="FC001";
$station_fence_list->station_fence_wkt="POLYGON((120.020513 30.279902,120.023989 30.280847,120.02562 30.281255,120.026564 30.281644,120.028817 30.28207,120.030105 30.282126,120.030555 30.280365,120.030834 30.27955,120.031027 30.278197,120.031263 30.277308,120.029482 30.277141,120.028731 30.277122,120.027873 30.277067,120.026843 30.277289,120.026028 30.277289,120.02532 30.277196,120.024547 30.276956,120.023818 30.276548,120.022487 30.276344,120.021994 30.276122,120.02165 30.2769,120.020513 30.279902))";
$station_fence_list->status="1";
$station_fence_list->service_code_list="[\"22010160\"]";
$station_fence_list->cover_address_list="[ 330110005]";
$station_fence_list->support_brand_list="[\"STO\"]";
$station_fence_operate_request->station_fence_list = $station_fence_list;
$req->setStationFenceOperateRequest(json_encode($station_fence_operate_request));
$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=taobao.logistics.station.fence.async' \
-d 'partner_id=apidoc' \
-d 'sign=E1D9DDBA89AED8008D5A89EBC8DDC233' \
-d 'sign_method=hmac' \
-d 'timestamp=2026-09-16+16%3A01%3A49' \
-d 'v=2.0' \
-d 'station_fence_operate_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.LogisticsStationFenceAsyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.station_fence_operate_request="数据结构示例JSON格式"
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,"taobao.logistics.station.fence.async");
add_param(pRequest,"station_fence_operate_request","数据结构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',
'url': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.logistics.station.fence.async', {
'station_fence_operate_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})