TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
UsceslIteminfoBatchInsertRequest req = new UsceslIteminfoBatchInsertRequest();
List<UsceslIteminfoBatchInsertRequest.ItemChangeBo> list2 = new ArrayList<UsceslIteminfoBatchInsertRequest.ItemChangeBo>();
UsceslIteminfoBatchInsertRequest.ItemChangeBo obj3 = new UsceslIteminfoBatchInsertRequest.ItemChangeBo();
list2.add(obj3);
obj3.setSourceCode("http://taobao.com");
obj3.setPriceUnit("盒");
obj3.setBrandName("品牌");
obj3.setCategoryName("品类");
obj3.setRank("一级");
obj3.setSuggestPrice("1000");
obj3.setSkuId("123123");
obj3.setEnergyEfficiency("能效");
obj3.setPromotionStart(StringUtils.parseDateTime("2018-08-01 10:00:00"));
obj3.setForestSecondCatId("12312");
obj3.setCustomizeFeatureC("自定义扩展属性");
obj3.setCustomizeFeatureD("自定义扩展属性");
obj3.setCustomizeFeatureE("自定义扩展属性");
obj3.setCustomizeFeatureF("自定义扩展属性");
obj3.setCustomizeFeatureG("自定义扩展属性");
obj3.setCustomizeFeatureH("自定义扩展属性");
obj3.setCustomizeFeatureI("自定义扩展属性");
obj3.setCustomizeFeatureJ("自定义扩展属性");
obj3.setItemQrCode("http://taobao.com");
obj3.setIfPromotion(false);
obj3.setPromotionEnd(StringUtils.parseDateTime("2018-08-01 10:00:00"));
obj3.setExtraAttribute("{ \"extra1\": \"v1\", \"extra2\": \"v2\" }");
obj3.setOriginalPrice("2000");
obj3.setPositonCode("1-2-3-4");
obj3.setCustomizeFeatureB("自定义扩展属性");
obj3.setCustomizeFeatureA("自定义扩展属性");
obj3.setModelNum("型号");
obj3.setSaleSpec("500g");
obj3.setAcctionPrice("2000");
obj3.setItemBarCode("6955748500036");
obj3.setMemberPrice("1000");
obj3.setItemTitle("商品标题");
obj3.setPromotionText("优惠文案");
obj3.setItemStatus(0L);
obj3.setItemId(123123L);
obj3.setForestFirstCatId("123123");
obj3.setShortTitle("商品短标题");
obj3.setIfSourceCode(false);
obj3.setProductionPlace("产地");
req.setItemList(list2);
req.setStoreId(123124L);
req.setBizBrandKey("234234");
UsceslIteminfoBatchInsertResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
UsceslIteminfoBatchInsertRequest req = new UsceslIteminfoBatchInsertRequest();
List<UsceslIteminfoBatchInsertRequest.ItemChangeBoDomain> list2 = new List<UsceslIteminfoBatchInsertRequest.ItemChangeBoDomain>();
UsceslIteminfoBatchInsertRequest.ItemChangeBoDomain obj3 = new UsceslIteminfoBatchInsertRequest.ItemChangeBoDomain();
list2.Add(obj3);
obj3.SourceCode = "http://taobao.com";
obj3.PriceUnit = "盒";
obj3.BrandName = "品牌";
obj3.CategoryName = "品类";
obj3.Rank = "一级";
obj3.SuggestPrice = "1000";
obj3.SkuId = "123123";
obj3.EnergyEfficiency = "能效";
obj3.PromotionStart = DateTime.Parse(2018-08-01 10:00:00");
obj3.ForestSecondCatId = "12312";
obj3.CustomizeFeatureC = "自定义扩展属性";
obj3.CustomizeFeatureD = "自定义扩展属性";
obj3.CustomizeFeatureE = "自定义扩展属性";
obj3.CustomizeFeatureF = "自定义扩展属性";
obj3.CustomizeFeatureG = "自定义扩展属性";
obj3.CustomizeFeatureH = "自定义扩展属性";
obj3.CustomizeFeatureI = "自定义扩展属性";
obj3.CustomizeFeatureJ = "自定义扩展属性";
obj3.ItemQrCode = "http://taobao.com";
obj3.IfPromotion = false;
obj3.PromotionEnd = DateTime.Parse(2018-08-01 10:00:00");
obj3.ExtraAttribute = "{ \"extra1\": \"v1\", \"extra2\": \"v2\" }";
obj3.OriginalPrice = "2000";
obj3.PositonCode = "1-2-3-4";
obj3.CustomizeFeatureB = "自定义扩展属性";
obj3.CustomizeFeatureA = "自定义扩展属性";
obj3.ModelNum = "型号";
obj3.SaleSpec = "500g";
obj3.AcctionPrice = "2000";
obj3.ItemBarCode = "6955748500036";
obj3.MemberPrice = "1000";
obj3.ItemTitle = "商品标题";
obj3.PromotionText = "优惠文案";
obj3.ItemStatus = 0L;
obj3.ItemId = 123123L;
obj3.ForestFirstCatId = "123123";
obj3.ShortTitle = "商品短标题";
obj3.IfSourceCode = false;
obj3.ProductionPlace = "产地";
req.ItemList_ = list2;
req.StoreId = 123124L;
req.BizBrandKey = "234234";
UsceslIteminfoBatchInsertResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new UsceslIteminfoBatchInsertRequest;
$item_list = new ItemChangeBo;
$item_list->source_code="http://taobao.com";
$item_list->price_unit="盒";
$item_list->brand_name="品牌";
$item_list->category_name="品类";
$item_list->rank="一级";
$item_list->suggest_price="1000";
$item_list->sku_id="123123";
$item_list->energy_efficiency="能效";
$item_list->promotion_start="2018-08-01 10:00:00";
$item_list->forest_second_cat_id="12312";
$item_list->customize_feature_c="自定义扩展属性";
$item_list->customize_feature_d="自定义扩展属性";
$item_list->customize_feature_e="自定义扩展属性";
$item_list->customize_feature_f="自定义扩展属性";
$item_list->customize_feature_g="自定义扩展属性";
$item_list->customize_feature_h="自定义扩展属性";
$item_list->customize_feature_i="自定义扩展属性";
$item_list->customize_feature_j="自定义扩展属性";
$item_list->item_qr_code="http://taobao.com";
$item_list->if_promotion="false";
$item_list->promotion_end="2018-08-01 10:00:00";
$item_list->extra_attribute="{ \"extra1\": \"v1\", \"extra2\": \"v2\" }";
$item_list->original_price="2000";
$item_list->positon_code="1-2-3-4";
$item_list->customize_feature_b="自定义扩展属性";
$item_list->customize_feature_a="自定义扩展属性";
$item_list->model_num="型号";
$item_list->sale_spec="500g";
$item_list->acction_price="2000";
$item_list->item_bar_code="6955748500036";
$item_list->member_price="1000";
$item_list->item_title="商品标题";
$item_list->promotion_text="优惠文案";
$item_list->item_status="0";
$item_list->item_id="123123";
$item_list->forest_first_cat_id="123123";
$item_list->short_title="商品短标题";
$item_list->if_source_code="false";
$item_list->production_place="产地";
$req->setItemList(json_encode($item_list));
$req->setStoreId("123124");
$req->setBizBrandKey("234234");
$resp = $c->execute($req);
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.uscesl.iteminfo.batch.insert' \
-d 'partner_id=apidoc' \
-d 'sign=E301CF640DD60C9AB4920D4EE5562833' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+18%3A46%3A16' \
-d 'v=2.0' \
-d 'biz_brand_key=234234' \
-d 'item_list=null' \
-d 'store_id=123124'
# -*- coding: utf-8 -*-
import top.api
req=top.api.UsceslIteminfoBatchInsertRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.item_list=""
req.store_id=123124
req.biz_brand_key="234234"
try:
resp= req.getResponse()
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.uscesl.iteminfo.batch.insert");
add_param(pRequest,"item_list","数据结构JSON示例");
add_param(pRequest,"store_id","123124");
add_param(pRequest,"biz_brand_key","234234");
pResponse = top_execute(pClient,pRequest,NULL);
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.uscesl.iteminfo.batch.insert', {
'item_list':'数据结构JSON示例',
'store_id':'123124',
'biz_brand_key':'234234'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})