TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest req = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest();
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopSaveGoodsToUpSaleTopCmd obj1 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopSaveGoodsToUpSaleTopCmd();
obj1.setGoodsId(3241236524353245L);
obj1.setTitle("iphone13手机");
obj1.setDesc("红色,9成新");
List<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVO> list3 = new ArrayList<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVO>();
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVO obj4 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVO();
list3.add(obj4);
obj4.setId(234543565756L);
obj4.setUrl("http://kkk.ipg");
obj4.setWide(68L);
obj4.setHeight(168L);
obj1.setImgList(list3);
List<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVO> list6 = new ArrayList<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVO>();
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVO obj7 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVO();
list6.add(obj7);
obj7.setPropertyId("345234");
obj7.setPropertyName("颜色");
obj7.setValueId("6746543");
obj7.setValueName("红色");
obj1.setPvList(list6);
obj1.setCategory("126862528");
obj1.setDivisionId(330110L);
obj1.setLongitude("120.345");
obj1.setLatitude("89.345");
obj1.setPrice(8900L);
obj1.setSaleWay("Online");
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopBookTopDO obj8 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopBookTopDO();
obj8.setBarcode("123452353asdfsa342");
obj8.setBarcodeName("计算机科学实践");
obj1.setBookData(obj8);
obj1.setOriginalPrice(500000L);
obj1.setIsBrandNew(true);
req.setParam(obj1);
AlibabaIdleCycleshopStoreSavegoodsToupsaleResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest req = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest();
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopSaveGoodsToUpSaleTopCmdDomain obj1 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopSaveGoodsToUpSaleTopCmdDomain();
obj1.GoodsId = 3241236524353245L;
obj1.Title = "iphone13手机";
obj1.Desc = "红色,9成新";
List<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVODomain> list3 = new List<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVODomain>();
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVODomain obj4 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopImageTopVODomain();
list3.Add(obj4);
obj4.Id = 234543565756L;
obj4.Url = "http://kkk.ipg";
obj4.Wide = 68L;
obj4.Height = 168L;
obj1.ImgList= list3;
List<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVODomain> list6 = new List<AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVODomain>();
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVODomain obj7 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopPropertyTopVODomain();
list6.Add(obj7);
obj7.PropertyId = "345234";
obj7.PropertyName = "颜色";
obj7.ValueId = "6746543";
obj7.ValueName = "红色";
obj1.PvList= list6;
obj1.Category = "126862528";
obj1.DivisionId = 330110L;
obj1.Longitude = "120.345";
obj1.Latitude = "89.345";
obj1.Price = 8900L;
obj1.SaleWay = "Online";
AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopBookTopDODomain obj8 = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest.CycleShopBookTopDODomain();
obj8.Barcode = "123452353asdfsa342";
obj8.BarcodeName = "计算机科学实践";
obj1.BookData= obj8;
obj1.OriginalPrice = 500000L;
obj1.IsBrandNew = true;
req.Param_ = obj1;
AlibabaIdleCycleshopStoreSavegoodsToupsaleResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest;
$param = new CycleShopSaveGoodsToUpSaleTopCmd;
$param->goods_id="3241236524353245";
$param->title="iphone13手机";
$param->desc="红色,9成新";
$img_list = new CycleShopImageTopVO;
$img_list->id="234543565756";
$img_list->url="http://kkk.ipg";
$img_list->wide="68";
$img_list->height="168";
$param->img_list = $img_list;
$pv_list = new CycleShopPropertyTopVO;
$pv_list->property_id="345234";
$pv_list->property_name="颜色";
$pv_list->value_id="6746543";
$pv_list->value_name="红色";
$param->pv_list = $pv_list;
$param->category="126862528";
$param->division_id="330110";
$param->longitude="120.345";
$param->latitude="89.345";
$param->price="8900";
$param->sale_way="Online";
$book_data = new CycleShopBookTopDO;
$book_data->barcode="123452353asdfsa342";
$book_data->barcode_name="计算机科学实践";
$param->book_data = $book_data;
$param->original_price="500000";
$param->is_brand_new="true";
$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.cycleshop.store.savegoods.toupsale' \
-d 'partner_id=apidoc' \
-d 'session=cb6d0f92-63d4-485c-b401-438db708b44b' \
-d 'sign=FE6007AF6C8BA610622C9363A8305927' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-11+21%3A46%3A36' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIdleCycleshopStoreSavegoodsToupsaleRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param="数据结构示例JSON格式"
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.cycleshop.store.savegoods.toupsale");
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.cycleshop.store.savegoods.toupsale', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})