TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallServicecenterServicestoreCreateservicestoreRequest req = new TmallServicecenterServicestoreCreateservicestoreRequest();
TmallServicecenterServicestoreCreateservicestoreRequest.ServiceStoreDTO obj1 = new TmallServicecenterServicestoreCreateservicestoreRequest.ServiceStoreDTO();
obj1.setAddressCity("杭州市");
obj1.setAddressCode(331100L);
obj1.setAddressDetail("浙江省杭州市余杭区文一西路969号4号楼小邮局");
obj1.setAddressDistrict("余杭区");
obj1.setAddressProvince("浙江省");
obj1.setAddressTown("五常街道");
obj1.setManagerName("张三");
obj1.setManagerPhone("12345678900");
obj1.setPhone("12345678");
obj1.setServiceStoreCode("xxx");
obj1.setServiceStoreName("网点名称");
req.setServiceStore(obj1);
TmallServicecenterServicestoreCreateservicestoreResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallServicecenterServicestoreCreateservicestoreRequest req = new TmallServicecenterServicestoreCreateservicestoreRequest();
TmallServicecenterServicestoreCreateservicestoreRequest.ServiceStoreDTODomain obj1 = new TmallServicecenterServicestoreCreateservicestoreRequest.ServiceStoreDTODomain();
obj1.AddressCity = "杭州市";
obj1.AddressCode = 331100L;
obj1.AddressDetail = "浙江省杭州市余杭区文一西路969号4号楼小邮局";
obj1.AddressDistrict = "余杭区";
obj1.AddressProvince = "浙江省";
obj1.AddressTown = "五常街道";
obj1.ManagerName = "张三";
obj1.ManagerPhone = "12345678900";
obj1.Phone = "12345678";
obj1.ServiceStoreCode = "xxx";
obj1.ServiceStoreName = "网点名称";
req.ServiceStore_ = obj1;
TmallServicecenterServicestoreCreateservicestoreResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallServicecenterServicestoreCreateservicestoreRequest;
$service_store = new ServiceStoreDTO;
$service_store->address_city="杭州市";
$service_store->address_code="331100";
$service_store->address_detail="浙江省杭州市余杭区文一西路969号4号楼小邮局";
$service_store->address_district="余杭区";
$service_store->address_province="浙江省";
$service_store->address_town="五常街道";
$service_store->manager_name="张三";
$service_store->manager_phone="12345678900";
$service_store->phone="12345678";
$service_store->service_store_code="xxx";
$service_store->service_store_name="网点名称";
$req->setServiceStore(json_encode($service_store));
$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.servicecenter.servicestore.createservicestore' \
-d 'partner_id=apidoc' \
-d 'session=fc112fd3-c25a-440a-9435-e220ff66f80b' \
-d 'sign=9924C53B5232E4BDE3DDF4BB2160E28E' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-19+15%3A26%3A55' \
-d 'v=2.0' \
-d 'service_store=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallServicecenterServicestoreCreateservicestoreRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.service_store=""
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.servicecenter.servicestore.createservicestore");
add_param(pRequest,"service_store","数据结构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.servicecenter.servicestore.createservicestore', {
'service_store':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})