TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmOpenCustomerSaveRequest req = new AlibabaAlscCrmOpenCustomerSaveRequest();
AlibabaAlscCrmOpenCustomerSaveRequest.CustomerSaveOpenReq obj1 = new AlibabaAlscCrmOpenCustomerSaveRequest.CustomerSaveOpenReq();
obj1.setBirthday(StringUtils.parseDateTime("2010-01-01 00:00:00"));
obj1.setBrandId("244323");
obj1.setChannel("2");
obj1.setGender(1L);
obj1.setMobile("18651822226");
obj1.setName("刘德华");
obj1.setOperatorId("2392313");
obj1.setOuterId("2088328921390232323");
obj1.setOuterType("alipay");
obj1.setRemark("备注");
obj1.setRequestId("13239a4388b382c48d3");
obj1.setShopId("239923231");
req.setParamCustomerSaveOpenReq(obj1);
AlibabaAlscCrmOpenCustomerSaveResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAlscCrmOpenCustomerSaveRequest req = new AlibabaAlscCrmOpenCustomerSaveRequest();
AlibabaAlscCrmOpenCustomerSaveRequest.CustomerSaveOpenReqDomain obj1 = new AlibabaAlscCrmOpenCustomerSaveRequest.CustomerSaveOpenReqDomain();
obj1.Birthday = DateTime.Parse(2010-01-01 00:00:00");
obj1.BrandId = "244323";
obj1.Channel = "2";
obj1.Gender = 1L;
obj1.Mobile = "18651822226";
obj1.Name = "刘德华";
obj1.OperatorId = "2392313";
obj1.OuterId = "2088328921390232323";
obj1.OuterType = "alipay";
obj1.Remark = "备注";
obj1.RequestId = "13239a4388b382c48d3";
obj1.ShopId = "239923231";
req.ParamCustomerSaveOpenReq_ = obj1;
AlibabaAlscCrmOpenCustomerSaveResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAlscCrmOpenCustomerSaveRequest;
$param_customer_save_open_req = new CustomerSaveOpenReq;
$param_customer_save_open_req->birthday="2010-01-01 00:00:00";
$param_customer_save_open_req->brand_id="244323";
$param_customer_save_open_req->channel="2";
$param_customer_save_open_req->gender="1";
$param_customer_save_open_req->mobile="18651822226";
$param_customer_save_open_req->name="刘德华";
$param_customer_save_open_req->operator_id="2392313";
$param_customer_save_open_req->outer_id="2088328921390232323";
$param_customer_save_open_req->outer_type="alipay";
$param_customer_save_open_req->remark="备注";
$param_customer_save_open_req->request_id="13239a4388b382c48d3";
$param_customer_save_open_req->shop_id="239923231";
$req->setParamCustomerSaveOpenReq(json_encode($param_customer_save_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.open.customer.save' \
-d 'partner_id=apidoc' \
-d 'sign=CAEF37CA531AD96888EF226988366AC3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-19+15%3A13%3A40' \
-d 'v=2.0' \
-d 'param_customer_save_open_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAlscCrmOpenCustomerSaveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_customer_save_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.open.customer.save");
add_param(pRequest,"param_customer_save_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.open.customer.save', {
'param_customer_save_open_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})