TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIdleCycleshopStoreGoodsSaveRequest req = new AlibabaIdleCycleshopStoreGoodsSaveRequest();
AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopGoodsEditTopCmd obj1 = new AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopGoodsEditTopCmd();
obj1.setGoodsId(231145677864L);
obj1.setGoodsTitle("iphone13手机");
obj1.setGoodsDesc("红色,9成新");
List<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVO> list3 = new ArrayList<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVO>();
AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVO obj4 = new AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVO();
list3.add(obj4);
obj4.setId(234543565756L);
obj4.setUrl("ttp://kkk.ipg");
obj4.setWide(68L);
obj4.setHeight(168L);
obj1.setGoodsImgList(list3);
obj1.setGoodsCategory("126862528");
List<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVO> list6 = new ArrayList<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVO>();
AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVO obj7 = new AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVO();
list6.add(obj7);
obj7.setPropertyId("345234");
obj7.setPropertyName("颜色");
obj7.setValueId("6746543");
obj7.setValueName("红色");
obj1.setGoodsPvList(list6);
obj1.setMinPrePrice(158000L);
obj1.setMaxPrePrice(209300L);
obj1.setGoodsPrice(189800L);
obj1.setCanConsignSale(false);
obj1.setUnConsignReason("灯不亮");
obj1.setSaleWay("Both");
obj1.setCostPrice(100L);
obj1.setOriginPrice(200L);
obj1.setQuantity(10L);
req.setParam(obj1);
AlibabaIdleCycleshopStoreGoodsSaveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIdleCycleshopStoreGoodsSaveRequest req = new AlibabaIdleCycleshopStoreGoodsSaveRequest();
AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopGoodsEditTopCmdDomain obj1 = new AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopGoodsEditTopCmdDomain();
obj1.GoodsId = 231145677864L;
obj1.GoodsTitle = "iphone13手机";
obj1.GoodsDesc = "红色,9成新";
List<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVODomain> list3 = new List<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVODomain>();
AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVODomain obj4 = new AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopImageTopVODomain();
list3.Add(obj4);
obj4.Id = 234543565756L;
obj4.Url = "ttp://kkk.ipg";
obj4.Wide = 68L;
obj4.Height = 168L;
obj1.GoodsImgList= list3;
obj1.GoodsCategory = "126862528";
List<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVODomain> list6 = new List<AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVODomain>();
AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVODomain obj7 = new AlibabaIdleCycleshopStoreGoodsSaveRequest.CycleShopPropertyTopVODomain();
list6.Add(obj7);
obj7.PropertyId = "345234";
obj7.PropertyName = "颜色";
obj7.ValueId = "6746543";
obj7.ValueName = "红色";
obj1.GoodsPvList= list6;
obj1.MinPrePrice = 158000L;
obj1.MaxPrePrice = 209300L;
obj1.GoodsPrice = 189800L;
obj1.CanConsignSale = false;
obj1.UnConsignReason = "灯不亮";
obj1.SaleWay = "Both";
obj1.CostPrice = 100L;
obj1.OriginPrice = 200L;
obj1.Quantity = 10L;
req.Param_ = obj1;
AlibabaIdleCycleshopStoreGoodsSaveResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIdleCycleshopStoreGoodsSaveRequest;
$param = new CycleShopGoodsEditTopCmd;
$param->goods_id="231145677864";
$param->goods_title="iphone13手机";
$param->goods_desc="红色,9成新";
$goods_img_list = new CycleShopImageTopVO;
$goods_img_list->id="234543565756";
$goods_img_list->url="ttp://kkk.ipg";
$goods_img_list->wide="68";
$goods_img_list->height="168";
$param->goods_img_list = $goods_img_list;
$param->goods_category="126862528";
$goods_pv_list = new CycleShopPropertyTopVO;
$goods_pv_list->property_id="345234";
$goods_pv_list->property_name="颜色";
$goods_pv_list->value_id="6746543";
$goods_pv_list->value_name="红色";
$param->goods_pv_list = $goods_pv_list;
$param->min_pre_price="158000";
$param->max_pre_price="209300";
$param->goods_price="189800";
$param->can_consign_sale="false";
$param->un_consign_reason="灯不亮";
$param->sale_way="Both";
$param->cost_price="100";
$param->origin_price="200";
$param->quantity="10";
$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.goods.save' \
-d 'partner_id=apidoc' \
-d 'session=281d4b7d-f5f8-4461-9d5f-4d75c7807a93' \
-d 'sign=2B6C7AFF99187E75E98A32BE81400648' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-11+23%3A05%3A14' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIdleCycleshopStoreGoodsSaveRequest(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.goods.save");
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.goods.save', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})