TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoEndpointLockerTopGuiAddorupdateRequest req = new CainiaoEndpointLockerTopGuiAddorupdateRequest();
CainiaoEndpointLockerTopGuiAddorupdateRequest.GuiInfo obj1 = new CainiaoEndpointLockerTopGuiAddorupdateRequest.GuiInfo();
obj1.setZip("300120");
obj1.setGuiLng("120.129872");
obj1.setGuiAddr("翡翠城二期");
obj1.setGuiId("198128");
obj1.setStatus(0L);
obj1.setGuiName("翡翠城自提柜");
obj1.setCellSmall(0L);
obj1.setCellMicro(0L);
obj1.setHousingEstate("翡翠城");
obj1.setCellTotal(0L);
obj1.setCellHuge(0L);
obj1.setGuiNo("A42");
obj1.setCompanyCode("xxx.com");
obj1.setCity("杭州市");
obj1.setImgUrl("http://www.taobao.com");
obj1.setGuiLat("30.127655");
obj1.setCellMiddle(0L);
obj1.setProvince("浙江省");
obj1.setServiceDegree(0L);
obj1.setCoordType("MARS");
obj1.setCellCool(0L);
obj1.setTown("五常街道");
obj1.setDistrict("余杭区");
obj1.setCellLarge(0L);
obj1.setExtra("{'support_oneopen':'true','support_scanopen':'true','support_subscribe':'true'}");
req.setGuiInfo(obj1);
CainiaoEndpointLockerTopGuiAddorupdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CainiaoEndpointLockerTopGuiAddorupdateRequest req = new CainiaoEndpointLockerTopGuiAddorupdateRequest();
CainiaoEndpointLockerTopGuiAddorupdateRequest.GuiInfoDomain obj1 = new CainiaoEndpointLockerTopGuiAddorupdateRequest.GuiInfoDomain();
obj1.Zip = "300120";
obj1.GuiLng = "120.129872";
obj1.GuiAddr = "翡翠城二期";
obj1.GuiId = "198128";
obj1.Status = 0L;
obj1.GuiName = "翡翠城自提柜";
obj1.CellSmall = 0L;
obj1.CellMicro = 0L;
obj1.HousingEstate = "翡翠城";
obj1.CellTotal = 0L;
obj1.CellHuge = 0L;
obj1.GuiNo = "A42";
obj1.CompanyCode = "xxx.com";
obj1.City = "杭州市";
obj1.ImgUrl = "http://www.taobao.com";
obj1.GuiLat = "30.127655";
obj1.CellMiddle = 0L;
obj1.Province = "浙江省";
obj1.ServiceDegree = 0L;
obj1.CoordType = "MARS";
obj1.CellCool = 0L;
obj1.Town = "五常街道";
obj1.District = "余杭区";
obj1.CellLarge = 0L;
obj1.Extra = "{'support_oneopen':'true','support_scanopen':'true','support_subscribe':'true'}";
req.GuiInfo_ = obj1;
CainiaoEndpointLockerTopGuiAddorupdateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CainiaoEndpointLockerTopGuiAddorupdateRequest;
$gui_info = new GuiInfo;
$gui_info->zip="300120";
$gui_info->gui_lng="120.129872";
$gui_info->gui_addr="翡翠城二期";
$gui_info->gui_id="198128";
$gui_info->status="0";
$gui_info->gui_name="翡翠城自提柜";
$gui_info->cell_small="0";
$gui_info->cell_micro="0";
$gui_info->housing_estate="翡翠城";
$gui_info->cell_total="0";
$gui_info->cell_huge="0";
$gui_info->gui_no="A42";
$gui_info->company_code="xxx.com";
$gui_info->city="杭州市";
$gui_info->img_url="http://www.taobao.com";
$gui_info->gui_lat="30.127655";
$gui_info->cell_middle="0";
$gui_info->province="浙江省";
$gui_info->service_degree="0";
$gui_info->coord_type="MARS";
$gui_info->cell_cool="0";
$gui_info->town="五常街道";
$gui_info->district="余杭区";
$gui_info->cell_large="0";
$gui_info->extra="{'support_oneopen':'true','support_scanopen':'true','support_subscribe':'true'}";
$req->setGuiInfo(json_encode($gui_info));
$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=cainiao.endpoint.locker.top.gui.addorupdate' \
-d 'partner_id=apidoc' \
-d 'sign=26BBD1B4A8065AAED0900493C40EAA46' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-25+18%3A29%3A42' \
-d 'v=2.0' \
-d 'gui_info=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CainiaoEndpointLockerTopGuiAddorupdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.gui_info=""
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,"cainiao.endpoint.locker.top.gui.addorupdate");
add_param(pRequest,"gui_info","数据结构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('cainiao.endpoint.locker.top.gui.addorupdate', {
'gui_info':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})