TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallBrandItemUploadRequest req = new TmallBrandItemUploadRequest();
List<TmallBrandItemUploadRequest.TmallBrandChannelNewItem> list2 = new ArrayList<TmallBrandItemUploadRequest.TmallBrandChannelNewItem>();
TmallBrandItemUploadRequest.TmallBrandChannelNewItem obj3 = new TmallBrandItemUploadRequest.TmallBrandChannelNewItem();
list2.add(obj3);
obj3.setChannelQuantity(10000L);
obj3.setChannelItemId(1001L);
obj3.setBrandName("天猫品牌名称");
obj3.setChannel("OFFICIAL_WEBSITE");
obj3.setChannelSkuId(11001L);
obj3.setChannelPublishTime(StringUtils.parseDateTime("2020-10-20 00:00:00"));
obj3.setTmallSame(true);
obj3.setItemId(1000001L);
obj3.setItemName("天猫商品名称");
obj3.setChannelItemName("渠道商品名称");
obj3.setChannelItemPicts("http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png,http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png,http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png");
obj3.setChannelProperties("颜色:红色;材质:棉麻");
obj3.setBrandId(888888L);
obj3.setChannelItemPrice("89.3");
obj3.setBarcode("ABC-abc-1234");
obj3.setSkuId(1100001L);
obj3.setChannelPublishArea("ALL");
req.setItemList(list2);
TmallBrandItemUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TmallBrandItemUploadRequest req = new TmallBrandItemUploadRequest();
List<TmallBrandItemUploadRequest.TmallBrandChannelNewItemDomain> list2 = new List<TmallBrandItemUploadRequest.TmallBrandChannelNewItemDomain>();
TmallBrandItemUploadRequest.TmallBrandChannelNewItemDomain obj3 = new TmallBrandItemUploadRequest.TmallBrandChannelNewItemDomain();
list2.Add(obj3);
obj3.ChannelQuantity = 10000L;
obj3.ChannelItemId = 1001L;
obj3.BrandName = "天猫品牌名称";
obj3.Channel = "OFFICIAL_WEBSITE";
obj3.ChannelSkuId = 11001L;
obj3.ChannelPublishTime = DateTime.Parse(2020-10-20 00:00:00");
obj3.TmallSame = true;
obj3.ItemId = 1000001L;
obj3.ItemName = "天猫商品名称";
obj3.ChannelItemName = "渠道商品名称";
obj3.ChannelItemPicts = "http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png,http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png,http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png";
obj3.ChannelProperties = "颜色:红色;材质:棉麻";
obj3.BrandId = 888888L;
obj3.ChannelItemPrice = "89.3";
obj3.Barcode = "ABC-abc-1234";
obj3.SkuId = 1100001L;
obj3.ChannelPublishArea = "ALL";
req.ItemList_ = list2;
TmallBrandItemUploadResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TmallBrandItemUploadRequest;
$item_list = new TmallBrandChannelNewItem;
$item_list->channel_quantity="10000";
$item_list->channel_item_id="1001";
$item_list->brand_name="天猫品牌名称";
$item_list->channel="OFFICIAL_WEBSITE";
$item_list->channel_sku_id="11001";
$item_list->channel_publish_time="2020-10-20 00:00:00";
$item_list->tmall_same="true";
$item_list->item_id="1000001";
$item_list->item_name="天猫商品名称";
$item_list->channel_item_name="渠道商品名称";
$item_list->channel_item_picts="http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png,http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png,http://img.alicdn.com/tfs/TB1MaLKRXXXXXaWXFXXXXXXXXXX-480-260.png";
$item_list->channel_properties="颜色:红色;材质:棉麻";
$item_list->brand_id="888888";
$item_list->channel_item_price="89.3";
$item_list->barcode="ABC-abc-1234";
$item_list->sku_id="1100001";
$item_list->channel_publish_area="ALL";
$req->setItemList(json_encode($item_list));
$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=tmall.brand.item.upload' \
-d 'partner_id=apidoc' \
-d 'session=2b92d395-b3a0-49ee-82a3-9925f77672b9' \
-d 'sign=495CA74C46D99D8930F193E5092B673E' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-12-14+18%3A10%3A17' \
-d 'v=2.0' \
-d 'item_list=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TmallBrandItemUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.item_list=""
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,"tmall.brand.item.upload");
add_param(pRequest,"item_list","数据结构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('tmall.brand.item.upload', {
'item_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})