TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmCustomerCreateRequest req = new AlibabaAlscCrmCustomerCreateRequest();
AlibabaAlscCrmCustomerCreateRequest.CustomerCreateOpenReq obj1 = new AlibabaAlscCrmCustomerCreateRequest.CustomerCreateOpenReq();
obj1.setAddress("浙江省杭州市");
obj1.setBirthday(StringUtils.parseDateTime("2010-01-01 00:00:00"));
obj1.setBrandId("201903898665");
obj1.setChannel("2 表示pos");
obj1.setCustomerType(1L);
obj1.setEmail("xxx@gmail.com");
obj1.setGender("1");
obj1.setInvoice("口碑(杭州)电子商务有限公司");
obj1.setLevelId("1");
obj1.setMobile("13411111111");
obj1.setName("王小二");
obj1.setOperatorId("2019865534");
obj1.setOuterId("13411111111");
obj1.setOuterType("mobile");
obj1.setPhone("0571-87658765");
obj1.setRemark("老板的朋友");
obj1.setRequestId("234334534543234234");
obj1.setShopId("2019093647836487563");
obj1.setTagIdList("爱吃辣");
obj1.setOutBrandId("123");
obj1.setOutShopId("132");
req.setParamCustomerCreateOpenReq(obj1);
AlibabaAlscCrmCustomerCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAlscCrmCustomerCreateRequest req = new AlibabaAlscCrmCustomerCreateRequest();
AlibabaAlscCrmCustomerCreateRequest.CustomerCreateOpenReqDomain obj1 = new AlibabaAlscCrmCustomerCreateRequest.CustomerCreateOpenReqDomain();
obj1.Address = "浙江省杭州市";
obj1.Birthday = DateTime.Parse(2010-01-01 00:00:00");
obj1.BrandId = "201903898665";
obj1.Channel = "2 表示pos";
obj1.CustomerType = 1L;
obj1.Email = "xxx@gmail.com";
obj1.Gender = "1";
obj1.Invoice = "口碑(杭州)电子商务有限公司";
obj1.LevelId = "1";
obj1.Mobile = "13411111111";
obj1.Name = "王小二";
obj1.OperatorId = "2019865534";
obj1.OuterId = "13411111111";
obj1.OuterType = "mobile";
obj1.Phone = "0571-87658765";
obj1.Remark = "老板的朋友";
obj1.RequestId = "234334534543234234";
obj1.ShopId = "2019093647836487563";
obj1.TagIdList = "爱吃辣";
obj1.OutBrandId = "123";
obj1.OutShopId = "132";
req.ParamCustomerCreateOpenReq_ = obj1;
AlibabaAlscCrmCustomerCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAlscCrmCustomerCreateRequest;
$param_customer_create_open_req = new CustomerCreateOpenReq;
$param_customer_create_open_req->address="浙江省杭州市";
$param_customer_create_open_req->birthday="2010-01-01 00:00:00";
$param_customer_create_open_req->brand_id="201903898665";
$param_customer_create_open_req->channel="2 表示pos";
$param_customer_create_open_req->customer_type="1";
$param_customer_create_open_req->email="xxx@gmail.com";
$param_customer_create_open_req->gender="1";
$param_customer_create_open_req->invoice="口碑(杭州)电子商务有限公司";
$param_customer_create_open_req->level_id="1";
$param_customer_create_open_req->mobile="13411111111";
$param_customer_create_open_req->name="王小二";
$param_customer_create_open_req->operator_id="2019865534";
$param_customer_create_open_req->outer_id="13411111111";
$param_customer_create_open_req->outer_type="mobile";
$param_customer_create_open_req->phone="0571-87658765";
$param_customer_create_open_req->remark="老板的朋友";
$param_customer_create_open_req->request_id="234334534543234234";
$param_customer_create_open_req->shop_id="2019093647836487563";
$param_customer_create_open_req->tag_id_list="爱吃辣";
$param_customer_create_open_req->out_brand_id="123";
$param_customer_create_open_req->out_shop_id="132";
$req->setParamCustomerCreateOpenReq(json_encode($param_customer_create_open_req));
$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=alibaba.alsc.crm.customer.create' \
-d 'partner_id=apidoc' \
-d 'sign=3B3CB0103D445FEFF98A635B5593B773' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-19+15%3A44%3A37' \
-d 'v=2.0' \
-d 'param_customer_create_open_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAlscCrmCustomerCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_customer_create_open_req=""
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,"alibaba.alsc.crm.customer.create");
add_param(pRequest,"param_customer_create_open_req","数据结构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('alibaba.alsc.crm.customer.create', {
'param_customer_create_open_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})