TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallNrtAgencySynchronizeRequest req = new TmallNrtAgencySynchronizeRequest();
TmallNrtAgencySynchronizeRequest.NrtAgencyDTO obj1 = new TmallNrtAgencySynchronizeRequest.NrtAgencyDTO();
obj1.setBrandIdStr("淘宝心选");
obj1.setOpType("update");
obj1.setAgencySubname("心选");
obj1.setOutId("123123123");
obj1.setAgencyCode("tbxx");
obj1.setVersion(12L);
obj1.setAgencyName("淘宝心选");
obj1.setBizCode("macalline");
obj1.setRelateCode("10001");
req.setAgency(obj1);
TmallNrtAgencySynchronizeResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallNrtAgencySynchronizeRequest req = new TmallNrtAgencySynchronizeRequest();
TmallNrtAgencySynchronizeRequest.NrtAgencyDTODomain obj1 = new TmallNrtAgencySynchronizeRequest.NrtAgencyDTODomain();
obj1.BrandIdStr = "淘宝心选";
obj1.OpType = "update";
obj1.AgencySubname = "心选";
obj1.OutId = "123123123";
obj1.AgencyCode = "tbxx";
obj1.Version = 12L;
obj1.AgencyName = "淘宝心选";
obj1.BizCode = "macalline";
obj1.RelateCode = "10001";
req.Agency_ = obj1;
TmallNrtAgencySynchronizeResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallNrtAgencySynchronizeRequest;
$agency = new NrtAgencyDTO;
$agency->brand_id_str="淘宝心选";
$agency->op_type="update";
$agency->agency_subname="心选";
$agency->out_id="123123123";
$agency->agency_code="tbxx";
$agency->version="12";
$agency->agency_name="淘宝心选";
$agency->biz_code="macalline";
$agency->relate_code="10001";
$req->setAgency(json_encode($agency));
$resp = $c->execute($req, $sessionKey);
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=tmall.nrt.agency.synchronize' \
-d 'partner_id=apidoc' \
-d 'session=e34b1120-a85c-4e70-bffc-a9f6e10f903e' \
-d 'sign=EC5AC6DBCCAEC6CDDBE4E5E70068907F' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-15+14%3A19%3A12' \
-d 'v=2.0' \
-d 'agency=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallNrtAgencySynchronizeRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.agency=""
try:
resp= req.getResponse(sessionkey)
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,"tmall.nrt.agency.synchronize");
add_param(pRequest,"agency","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
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('tmall.nrt.agency.synchronize', {
'agency':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})