TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CrmServicePointInitpointRequest req = new CrmServicePointInitpointRequest();
req.setBuyerNick("demo");
req.setPointBatch("PG_POINT_BATCH");
req.setPointCode("PG_POINT");
req.setBuyerQuantity(123L);
req.setTotalQuantity(123L);
req.setUsedQuantity(123L);
req.setPointType(123L);
req.setCheckId("123");
CrmServicePointInitpointResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
CrmServicePointInitpointRequest req = new CrmServicePointInitpointRequest();
req.BuyerNick = "demo";
req.PointBatch = "PG_POINT_BATCH";
req.PointCode = "PG_POINT";
req.BuyerQuantity = 123L;
req.TotalQuantity = 123L;
req.UsedQuantity = 123L;
req.PointType = 123L;
req.CheckId = "123";
CrmServicePointInitpointResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new CrmServicePointInitpointRequest;
$req->setBuyerNick("demo");
$req->setPointBatch("PG_POINT_BATCH");
$req->setPointCode("PG_POINT");
$req->setBuyerQuantity("123");
$req->setTotalQuantity("123");
$req->setUsedQuantity("123");
$req->setPointType("123");
$req->setCheckId("123");
$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=taobao.crm.service.point.initpoint' \
-d 'partner_id=apidoc' \
-d 'session=5f3fb870-99e1-4622-a661-a3b89c88fa5d' \
-d 'sign=619B815E530091D1330D411795C19352' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-10+14%3A03%3A07' \
-d 'v=2.0' \
-d 'buyer_nick=demo' \
-d 'buyer_quantity=123' \
-d 'check_id=123' \
-d 'point_batch=PG_POINT_BATCH' \
-d 'point_code=PG_POINT' \
-d 'point_type=123' \
-d 'total_quantity=123' \
-d 'used_quantity=123'
# -*- coding: utf-8 -*-
import top.api
req=top.api.CrmServicePointInitpointRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.buyer_nick="demo"
req.point_batch="PG_POINT_BATCH"
req.point_code="PG_POINT"
req.buyer_quantity=123
req.total_quantity=123
req.used_quantity=123
req.point_type=123
req.check_id="123"
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,"taobao.crm.service.point.initpoint");
add_param(pRequest,"buyer_nick","demo");
add_param(pRequest,"point_batch","PG_POINT_BATCH");
add_param(pRequest,"point_code","PG_POINT");
add_param(pRequest,"buyer_quantity","123");
add_param(pRequest,"total_quantity","123");
add_param(pRequest,"used_quantity","123");
add_param(pRequest,"point_type","123");
add_param(pRequest,"check_id","123");
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('taobao.crm.service.point.initpoint', {
'buyer_nick':'demo',
'point_batch':'PG_POINT_BATCH',
'point_code':'PG_POINT',
'buyer_quantity':'123',
'total_quantity':'123',
'used_quantity':'123',
'point_type':'123',
'check_id':'123'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})