TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIdleConsignmentSpuStatisticsRequest req = new AlibabaIdleConsignmentSpuStatisticsRequest();
AlibabaIdleConsignmentSpuStatisticsRequest.SpuStatistics obj1 = new AlibabaIdleConsignmentSpuStatisticsRequest.SpuStatistics();
obj1.setStartTime("2019-05-12 12:00:00");
obj1.setStatus(1L);
obj1.setSceneType("3C");
obj1.setSpuId(123L);
obj1.setSkuId("462");
obj1.setDescr("iphoneX机型记录信息");
obj1.setEndTime("2019-05-12 12:00:00");
obj1.setVersion(1L);
obj1.setSpuData("{\"compare\":[{\"type1\":{\"top\":100000,\"higher\":2000}},{\"type1\":{\"top\":100000,\"higher\":2000}},{\"type1\":{\"top\":100000,\"higher\":2000}}]}或者{\"compare\":[{\"64G\":{\"top\":498900,\"higher\":80000}},{\"128G\":{\"top\":563400,\"higher\":78400}},{\"256G\":{\"top\":639900,\"higher\":104800}}]}");
req.setParam(obj1);
AlibabaIdleConsignmentSpuStatisticsResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIdleConsignmentSpuStatisticsRequest req = new AlibabaIdleConsignmentSpuStatisticsRequest();
AlibabaIdleConsignmentSpuStatisticsRequest.SpuStatisticsDomain obj1 = new AlibabaIdleConsignmentSpuStatisticsRequest.SpuStatisticsDomain();
obj1.StartTime = "2019-05-12 12:00:00";
obj1.Status = 1L;
obj1.SceneType = "3C";
obj1.SpuId = 123L;
obj1.SkuId = "462";
obj1.Descr = "iphoneX机型记录信息";
obj1.EndTime = "2019-05-12 12:00:00";
obj1.Version = 1L;
obj1.SpuData = "{\"compare\":[{\"type1\":{\"top\":100000,\"higher\":2000}},{\"type1\":{\"top\":100000,\"higher\":2000}},{\"type1\":{\"top\":100000,\"higher\":2000}}]}或者{\"compare\":[{\"64G\":{\"top\":498900,\"higher\":80000}},{\"128G\":{\"top\":563400,\"higher\":78400}},{\"256G\":{\"top\":639900,\"higher\":104800}}]}";
req.Param_ = obj1;
AlibabaIdleConsignmentSpuStatisticsResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIdleConsignmentSpuStatisticsRequest;
$param = new SpuStatistics;
$param->start_time="2019-05-12 12:00:00";
$param->status="1";
$param->scene_type="3C";
$param->spu_id="123";
$param->sku_id="462";
$param->descr="iphoneX机型记录信息";
$param->end_time="2019-05-12 12:00:00";
$param->version="1";
$param->spu_data="{\"compare\":[{\"type1\":{\"top\":100000,\"higher\":2000}},{\"type1\":{\"top\":100000,\"higher\":2000}},{\"type1\":{\"top\":100000,\"higher\":2000}}]}或者{\"compare\":[{\"64G\":{\"top\":498900,\"higher\":80000}},{\"128G\":{\"top\":563400,\"higher\":78400}},{\"256G\":{\"top\":639900,\"higher\":104800}}]}";
$req->setParam(json_encode($param));
$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=alibaba.idle.consignment.spu.statistics' \
-d 'partner_id=apidoc' \
-d 'session=6f46c3a0-1546-4018-a2b4-dc0d4d27db7d' \
-d 'sign=676B5B46057B516B7E90A41A9172D38C' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-25+15%3A12%3A51' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIdleConsignmentSpuStatisticsRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param=""
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,"alibaba.idle.consignment.spu.statistics");
add_param(pRequest,"param","数据结构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('alibaba.idle.consignment.spu.statistics', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})