TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallMafiaAccountAreaAuthRequest req = new TmallMafiaAccountAreaAuthRequest();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaRequest obj1 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaRequest();
List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO> list3 = new ArrayList<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO>();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO obj4 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO();
list3.add(obj4);
obj4.setAccountId(1234L);
obj4.setAccountName("张三经销商");
obj4.setProvinceCode(330000L);
obj4.setProvinceName("浙江省");
obj4.setCityCode(330100L);
obj4.setCityName("杭州");
obj4.setAreaCode(330110L);
obj4.setAreaName("余杭区");
obj4.setTownCode(330110005L);
obj4.setTownName("五常街道");
obj4.setCommunityId(123456L);
obj4.setCommunityName("xxxx");
obj4.setStoreId(123456L);
obj4.setAddress("xxxx");
obj4.setAccountType("xxxx");
obj4.setStatus("xxx");
obj4.setModifierName("张三");
obj4.setCreatorName("张三");
obj4.setModifierId(1234L);
obj4.setCreatorId(1234L);
obj4.setVersion(0L);
obj4.setAttributes("xxxx");
obj4.setGmtModified(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj4.setGmtCreate(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj1.setAuthAreaDto(list3);
List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO> list6 = new ArrayList<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO>();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO obj7 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO();
list6.add(obj7);
obj7.setAccountId(1234L);
obj7.setAccountName("张三经销商");
obj7.setProvinceCode(330000L);
obj7.setProvinceName("浙江省");
obj7.setCityCode(330100L);
obj7.setCityName("杭州");
obj7.setAreaCode(330110L);
obj7.setAreaName("余杭区");
obj7.setTownCode(330110005L);
obj7.setTownName("五常街道");
obj7.setCommunityId(123456L);
obj7.setCommunityName("xxxx");
obj7.setStoreId(123456L);
obj7.setAddress("xxxxx");
obj7.setAccountType("xxxx");
obj7.setStatus("\"\"");
obj7.setModifierName("张三");
obj7.setCreatorName("张三");
obj7.setModifierId(1234L);
obj7.setCreatorId(1234L);
obj7.setVersion(0L);
obj7.setAttributes("xxxx");
obj7.setGmtModified(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj7.setGmtCreate(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj1.setUnAuthAreaDto(list6);
req.setAreaRequest(obj1);
TmallMafiaAccountAreaAuthResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallMafiaAccountAreaAuthRequest req = new TmallMafiaAccountAreaAuthRequest();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaRequestDomain obj1 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaRequestDomain();
List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain> list3 = new List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain>();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain obj4 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain();
list3.Add(obj4);
obj4.AccountId = 1234L;
obj4.AccountName = "张三经销商";
obj4.ProvinceCode = 330000L;
obj4.ProvinceName = "浙江省";
obj4.CityCode = 330100L;
obj4.CityName = "杭州";
obj4.AreaCode = 330110L;
obj4.AreaName = "余杭区";
obj4.TownCode = 330110005L;
obj4.TownName = "五常街道";
obj4.CommunityId = 123456L;
obj4.CommunityName = "xxxx";
obj4.StoreId = 123456L;
obj4.Address = "xxxx";
obj4.AccountType = "xxxx";
obj4.Status = "xxx";
obj4.ModifierName = "张三";
obj4.CreatorName = "张三";
obj4.ModifierId = 1234L;
obj4.CreatorId = 1234L;
obj4.Version = 0L;
obj4.Attributes = "xxxx";
obj4.GmtModified = DateTime.Parse(2018-06-12 19:59:20");
obj4.GmtCreate = DateTime.Parse(2018-06-12 19:59:20");
obj1.AuthAreaDto= list3;
List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain> list6 = new List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain>();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain obj7 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTODomain();
list6.Add(obj7);
obj7.AccountId = 1234L;
obj7.AccountName = "张三经销商";
obj7.ProvinceCode = 330000L;
obj7.ProvinceName = "浙江省";
obj7.CityCode = 330100L;
obj7.CityName = "杭州";
obj7.AreaCode = 330110L;
obj7.AreaName = "余杭区";
obj7.TownCode = 330110005L;
obj7.TownName = "五常街道";
obj7.CommunityId = 123456L;
obj7.CommunityName = "xxxx";
obj7.StoreId = 123456L;
obj7.Address = "xxxxx";
obj7.AccountType = "xxxx";
obj7.Status = "\"\"";
obj7.ModifierName = "张三";
obj7.CreatorName = "张三";
obj7.ModifierId = 1234L;
obj7.CreatorId = 1234L;
obj7.Version = 0L;
obj7.Attributes = "xxxx";
obj7.GmtModified = DateTime.Parse(2018-06-12 19:59:20");
obj7.GmtCreate = DateTime.Parse(2018-06-12 19:59:20");
obj1.UnAuthAreaDto= list6;
req.AreaRequest_ = obj1;
TmallMafiaAccountAreaAuthResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallMafiaAccountAreaAuthRequest;
$area_request = new TxpAccountAreaRequest;
$auth_area_dto = new TxpAccountAreaDTO;
$auth_area_dto->account_id="1234";
$auth_area_dto->account_name="张三经销商";
$auth_area_dto->province_code="330000";
$auth_area_dto->province_name="浙江省";
$auth_area_dto->city_code="330100";
$auth_area_dto->city_name="杭州";
$auth_area_dto->area_code="330110";
$auth_area_dto->area_name="余杭区";
$auth_area_dto->town_code="330110005";
$auth_area_dto->town_name="五常街道";
$auth_area_dto->community_id="123456";
$auth_area_dto->community_name="xxxx";
$auth_area_dto->store_id="123456";
$auth_area_dto->address="xxxx";
$auth_area_dto->account_type="xxxx";
$auth_area_dto->status="xxx";
$auth_area_dto->modifier_name="张三";
$auth_area_dto->creator_name="张三";
$auth_area_dto->modifier_id="1234";
$auth_area_dto->creator_id="1234";
$auth_area_dto->version="0";
$auth_area_dto->attributes="xxxx";
$auth_area_dto->gmt_modified="2018-06-12 19:59:20";
$auth_area_dto->gmt_create="2018-06-12 19:59:20";
$area_request->auth_area_dto = $auth_area_dto;
$un_auth_area_dto = new TxpAccountAreaDTO;
$un_auth_area_dto->account_id="1234";
$un_auth_area_dto->account_name="张三经销商";
$un_auth_area_dto->province_code="330000";
$un_auth_area_dto->province_name="浙江省";
$un_auth_area_dto->city_code="330100";
$un_auth_area_dto->city_name="杭州";
$un_auth_area_dto->area_code="330110";
$un_auth_area_dto->area_name="余杭区";
$un_auth_area_dto->town_code="330110005";
$un_auth_area_dto->town_name="五常街道";
$un_auth_area_dto->community_id="123456";
$un_auth_area_dto->community_name="xxxx";
$un_auth_area_dto->store_id="123456";
$un_auth_area_dto->address="xxxxx";
$un_auth_area_dto->account_type="xxxx";
$un_auth_area_dto->status="\"\"";
$un_auth_area_dto->modifier_name="张三";
$un_auth_area_dto->creator_name="张三";
$un_auth_area_dto->modifier_id="1234";
$un_auth_area_dto->creator_id="1234";
$un_auth_area_dto->version="0";
$un_auth_area_dto->attributes="xxxx";
$un_auth_area_dto->gmt_modified="2018-06-12 19:59:20";
$un_auth_area_dto->gmt_create="2018-06-12 19:59:20";
$area_request->un_auth_area_dto = $un_auth_area_dto;
$req->setAreaRequest(json_encode($area_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=tmall.mafia.account.area.auth' \
-d 'partner_id=apidoc' \
-d 'sign=0CA5472BFC31F9BC5D4AD6F7CCA7A107' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-22+16%3A42%3A12' \
-d 'v=2.0' \
-d 'area_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallMafiaAccountAreaAuthRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.area_request=""
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,"tmall.mafia.account.area.auth");
add_param(pRequest,"area_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',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('tmall.mafia.account.area.auth', {
'area_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})