TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
OpentradeGroupSyncRequest req = new OpentradeGroupSyncRequest();
req.setItemId(1233L);
req.setDiscountPrice(1000L);
req.setFailProcess("close");
req.setOpenLimit(1L);
req.setAllowWhiteList(""用户1","用户2"");
req.setAllowType("all");
req.setGroupType(0L);
req.setGoal(5L);
req.setExpiration(3600L);
req.setEndTime(StringUtils.parseDateTime("2020-09-10 10:00:00"));
req.setStartTime(StringUtils.parseDateTime("2020-09-01 10:00:00"));
req.setGroupActivityId(11111L);
OpentradeGroupSyncResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
OpentradeGroupSyncRequest req = new OpentradeGroupSyncRequest();
req.ItemId = 1233L;
req.DiscountPrice = 1000L;
req.FailProcess = "close";
req.OpenLimit = 1L;
req.AllowWhiteList = ""用户1","用户2"";
req.AllowType = "all";
req.GroupType = 0L;
req.Goal = 5L;
req.Expiration = 3600L;
req.EndTime = DateTime.Parse("2020-09-10 10:00:00");
req.StartTime = DateTime.Parse("2020-09-01 10:00:00");
req.GroupActivityId = 11111L;
OpentradeGroupSyncResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new OpentradeGroupSyncRequest;
$req->setItemId("1233");
$req->setDiscountPrice("1000");
$req->setFailProcess("close");
$req->setOpenLimit("1");
$req->setAllowWhiteList("[\"用户1\",\"用户2\"]");
$req->setAllowType("all");
$req->setGroupType("0");
$req->setGoal("5");
$req->setExpiration("3600");
$req->setEndTime("2020-09-10 10:00:00");
$req->setStartTime("2020-09-01 10:00:00");
$req->setGroupActivityId("11111");
$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.opentrade.group.sync' \
-d 'partner_id=apidoc' \
-d 'session=f9233866-b885-4e76-b14b-5922f786966a' \
-d 'sign=BF1A59B6E3A0CE3F8AF2C9424989CA3B' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-02+12%3A44%3A04' \
-d 'v=2.0' \
-d 'allow_type=all' \
-d 'allow_white_list=%22%E7%94%A8%E6%88%B71%22%2C%22%E7%94%A8%E6%88%B72%22' \
-d 'discount_price=1000' \
-d 'end_time=2020-09-10+10%3A00%3A00' \
-d 'expiration=3600' \
-d 'fail_process=close' \
-d 'goal=5' \
-d 'group_activity_id=11111' \
-d 'group_type=0' \
-d 'item_id=1233' \
-d 'open_limit=1' \
-d 'start_time=2020-09-01+10%3A00%3A00'
# -*- coding: utf-8 -*-
import top.api
req=top.api.OpentradeGroupSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.item_id=1233
req.discount_price=1000
req.fail_process="close"
req.open_limit=1
req.allow_white_list="["用户1","用户2"]"
req.allow_type="all"
req.group_type=0
req.goal=5
req.expiration=3600
req.end_time="2020-09-10 10:00:00"
req.start_time="2020-09-01 10:00:00"
req.group_activity_id=11111
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.opentrade.group.sync");
add_param(pRequest,"item_id","1233");
add_param(pRequest,"discount_price","1000");
add_param(pRequest,"fail_process","close");
add_param(pRequest,"open_limit","1");
add_param(pRequest,"allow_white_list",""用户1","用户2"");
add_param(pRequest,"allow_type","all");
add_param(pRequest,"group_type","0");
add_param(pRequest,"goal","5");
add_param(pRequest,"expiration","3600");
add_param(pRequest,"end_time","2020-09-10 10:00:00");
add_param(pRequest,"start_time","2020-09-01 10:00:00");
add_param(pRequest,"group_activity_id","11111");
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.opentrade.group.sync', {
'item_id':'1233',
'discount_price':'1000',
'fail_process':'close',
'open_limit':'1',
'allow_white_list':'"用户1","用户2"',
'allow_type':'all',
'group_type':'0',
'goal':'5',
'expiration':'3600',
'end_time':'2020-09-10 10:00:00',
'start_time':'2020-09-01 10:00:00',
'group_activity_id':'11111'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})