TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIdleCycleshopStoreGoodsCreateRequest req = new AlibabaIdleCycleshopStoreGoodsCreateRequest();
AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopGoodsCreateTopCmd obj1 = new AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopGoodsCreateTopCmd();
obj1.setJmPackid(23452352345L);
obj1.setGoodsTitle("iphone13手机");
obj1.setGoodsDesc("红色,9成新");
List<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVO> list3 = new ArrayList<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVO>();
AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVO obj4 = new AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVO();
list3.add(obj4);
obj4.setId(234543565756L);
obj4.setUrl("http://kkk.ipg");
obj4.setWide(68L);
obj4.setHeight(168L);
obj1.setGoodsImgList(list3);
obj1.setGoodsCategory("126862528");
List<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopPropertyTopVO> list6 = new ArrayList<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopPropertyTopVO>();
AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopPropertyTopVO obj7 = new AlibabaIdleCycleshopStoreGoodsCreateRequest.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.setOutId("3245asfaerew233");
obj1.setCostPrice(2000L);
obj1.setOriginPrice(3000L);
obj1.setQuantity(10L);
req.setParam(obj1);
AlibabaIdleCycleshopStoreGoodsCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIdleCycleshopStoreGoodsCreateRequest req = new AlibabaIdleCycleshopStoreGoodsCreateRequest();
AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopGoodsCreateTopCmdDomain obj1 = new AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopGoodsCreateTopCmdDomain();
obj1.JmPackid = 23452352345L;
obj1.GoodsTitle = "iphone13手机";
obj1.GoodsDesc = "红色,9成新";
List<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVODomain> list3 = new List<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVODomain>();
AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVODomain obj4 = new AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopImageTopVODomain();
list3.Add(obj4);
obj4.Id = 234543565756L;
obj4.Url = "http://kkk.ipg";
obj4.Wide = 68L;
obj4.Height = 168L;
obj1.GoodsImgList= list3;
obj1.GoodsCategory = "126862528";
List<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopPropertyTopVODomain> list6 = new List<AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopPropertyTopVODomain>();
AlibabaIdleCycleshopStoreGoodsCreateRequest.CycleShopPropertyTopVODomain obj7 = new AlibabaIdleCycleshopStoreGoodsCreateRequest.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.OutId = "3245asfaerew233";
obj1.CostPrice = 2000L;
obj1.OriginPrice = 3000L;
obj1.Quantity = 10L;
req.Param_ = obj1;
AlibabaIdleCycleshopStoreGoodsCreateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIdleCycleshopStoreGoodsCreateRequest;
$param = new CycleShopGoodsCreateTopCmd;
$param->jm_packid="23452352345";
$param->goods_title="iphone13手机";
$param->goods_desc="红色,9成新";
$goods_img_list = new CycleShopImageTopVO;
$goods_img_list->id="234543565756";
$goods_img_list->url="http://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->out_id="3245asfaerew233";
$param->cost_price="2000";
$param->origin_price="3000";
$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.create' \
-d 'partner_id=apidoc' \
-d 'session=f0ade51a-7b3c-49c5-9c9e-7c1de1e5c036' \
-d 'sign=B20FF52DD249C02A18DECED46B15E340' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-19+17%3A23%3A34' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIdleCycleshopStoreGoodsCreateRequest(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.create");
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.create', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})