QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlibabaAscpTxpAreaCreateRequest req = new AlibabaAscpTxpAreaCreateRequest();
AlibabaAscpTxpAreaCreateRequest.TxpCommunityAreaDTO obj1 = new AlibabaAscpTxpAreaCreateRequest.TxpCommunityAreaDTO();
obj1.setUnitId("1234");
obj1.setUnitName("1单元");
obj1.setBuildingId("1234");
obj1.setBuildingName("1栋");
obj1.setCommunityId("1234");
obj1.setCommunityName("西溪北苑");
obj1.setStoreId("1234");
obj1.setProvinceName("浙江省");
obj1.setProvinceCode("1234");
obj1.setCityName("杭州市");
obj1.setCityCode("1234");
obj1.setAreaName("余杭区");
obj1.setAreaCode("1234");
obj1.setTownName("五常街道");
obj1.setTownCode("1234");
obj1.setAddress("xxxx");
obj1.setSellerId("1234");
obj1.setBizCode("txp");
obj1.setOutId("1234");
obj1.setGmtCreate("xxx");
obj1.setGmtModified("xxx");
obj1.setAttributes("xxx");
obj1.setVersion("0");
obj1.setIsDeleted("n");
obj1.setCreatorId("1234");
obj1.setModifierId("1234");
obj1.setCreatorName("张三");
obj1.setModifierName("张三");
obj1.setStatus("init");
req.setTxpAreaDTO(obj1);
AlibabaAscpTxpAreaCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAscpTxpAreaCreateRequest req = new AlibabaAscpTxpAreaCreateRequest();
AlibabaAscpTxpAreaCreateRequest.TxpCommunityAreaDTODomain obj1 = new AlibabaAscpTxpAreaCreateRequest.TxpCommunityAreaDTODomain();
obj1.UnitId = "1234";
obj1.UnitName = "1单元";
obj1.BuildingId = "1234";
obj1.BuildingName = "1栋";
obj1.CommunityId = "1234";
obj1.CommunityName = "西溪北苑";
obj1.StoreId = "1234";
obj1.ProvinceName = "浙江省";
obj1.ProvinceCode = "1234";
obj1.CityName = "杭州市";
obj1.CityCode = "1234";
obj1.AreaName = "余杭区";
obj1.AreaCode = "1234";
obj1.TownName = "五常街道";
obj1.TownCode = "1234";
obj1.Address = "xxxx";
obj1.SellerId = "1234";
obj1.BizCode = "txp";
obj1.OutId = "1234";
obj1.GmtCreate = "xxx";
obj1.GmtModified = "xxx";
obj1.Attributes = "xxx";
obj1.Version = "0";
obj1.IsDeleted = "n";
obj1.CreatorId = "1234";
obj1.ModifierId = "1234";
obj1.CreatorName = "张三";
obj1.ModifierName = "张三";
obj1.Status = "init";
req.TxpAreaDTO_ = obj1;
AlibabaAscpTxpAreaCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAscpTxpAreaCreateRequest;
$txpAreaDTO = new TxpCommunityAreaDTO;
$txpAreaDTO->unit_id="1234";
$txpAreaDTO->unit_name="1单元";
$txpAreaDTO->building_id="1234";
$txpAreaDTO->building_name="1栋";
$txpAreaDTO->community_id="1234";
$txpAreaDTO->community_name="西溪北苑";
$txpAreaDTO->store_id="1234";
$txpAreaDTO->province_name="浙江省";
$txpAreaDTO->province_code="1234";
$txpAreaDTO->city_name="杭州市";
$txpAreaDTO->city_code="1234";
$txpAreaDTO->area_name="余杭区";
$txpAreaDTO->area_code="1234";
$txpAreaDTO->town_name="五常街道";
$txpAreaDTO->town_code="1234";
$txpAreaDTO->address="xxxx";
$txpAreaDTO->seller_id="1234";
$txpAreaDTO->biz_code="txp";
$txpAreaDTO->out_id="1234";
$txpAreaDTO->gmt_create="xxx";
$txpAreaDTO->gmt_modified="xxx";
$txpAreaDTO->attributes="xxx";
$txpAreaDTO->version="0";
$txpAreaDTO->is_deleted="n";
$txpAreaDTO->creator_id="1234";
$txpAreaDTO->modifier_id="1234";
$txpAreaDTO->creator_name="张三";
$txpAreaDTO->modifier_name="张三";
$txpAreaDTO->status="init";
$req->setTxpAreaDTO(json_encode($txpAreaDTO));
$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=qimen.alibaba.ascp.txp.area.create' \
-d 'partner_id=apidoc' \
-d 'sign=9CB1972FCFC55F8E0916955B9D6108C8' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-15+14%3A47%3A58' \
-d 'v=2.0' \
-d 'txpAreaDTO=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.QimenAlibabaAscpTxpAreaCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.txpAreaDTO="数据结构示例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,"qimen.alibaba.ascp.txp.area.create");
add_param(pRequest,"txpAreaDTO","数据结构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('qimen.alibaba.ascp.txp.area.create', {
'txpAreaDTO':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})