TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaItemPublishDistributeSubmitRequest req = new AlibabaItemPublishDistributeSubmitRequest();
req.setBizType("taobao/1.0.0/brandAsyncRenderEnable");
req.setMarket("taobao");
req.setCatId(50021288L);
req.setSpuId(32323L);
req.setBarcode("6932529211107");
req.setSchema("<itemSchema></itemSchema>");
AlibabaItemPublishDistributeSubmitRequest.SourceItemInfoForDistributionDTO obj1 = new AlibabaItemPublishDistributeSubmitRequest.SourceItemInfoForDistributionDTO();
obj1.setItemId("1111");
obj1.setItemHighestPrice(111L);
obj1.setItemLowestPrice(11L);
obj1.setShopId("123");
obj1.setType("淘宝、天猫");
obj1.setItemUrl("https://detail.tmall.com/item.htm?id=816970004994");
req.setSourceItemInfo(obj1);
req.setBizExtString("{\"key\":\"value\"}");
AlibabaItemPublishDistributeSubmitResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaItemPublishDistributeSubmitRequest req = new AlibabaItemPublishDistributeSubmitRequest();
req.BizType = "taobao/1.0.0/brandAsyncRenderEnable";
req.Market = "taobao";
req.CatId = 50021288L;
req.SpuId = 32323L;
req.Barcode = "6932529211107";
req.Schema = "<itemSchema></itemSchema>";
AlibabaItemPublishDistributeSubmitRequest.SourceItemInfoForDistributionDTODomain obj1 = new AlibabaItemPublishDistributeSubmitRequest.SourceItemInfoForDistributionDTODomain();
obj1.ItemId = "1111";
obj1.ItemHighestPrice = 111L;
obj1.ItemLowestPrice = 11L;
obj1.ShopId = "123";
obj1.Type = "淘宝、天猫";
obj1.ItemUrl = "https://detail.tmall.com/item.htm?id=816970004994";
req.SourceItemInfo_ = obj1;
req.BizExt = "{\"key\":\"value\"}";
AlibabaItemPublishDistributeSubmitResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaItemPublishDistributeSubmitRequest;
$req->setBizType("taobao/1.0.0/brandAsyncRenderEnable");
$req->setMarket("taobao");
$req->setCatId("50021288");
$req->setSpuId("32323");
$req->setBarcode("6932529211107");
$req->setSchema("<itemSchema></itemSchema>");
$source_item_info = new SourceItemInfoForDistributionDTO;
$source_item_info->item_id="1111";
$source_item_info->item_highest_price="111";
$source_item_info->item_lowest_price="11";
$source_item_info->shop_id="123";
$source_item_info->type="淘宝、天猫";
$source_item_info->item_url="https://detail.tmall.com/item.htm?id=816970004994";
$req->setSourceItemInfo(json_encode($source_item_info));
$req->setBizExt("{\"key\":\"value\"}");
$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.item.publish.distribute.submit' \
-d 'partner_id=apidoc' \
-d 'session=a744e202-7d27-412b-bcb1-b6966a3e4d98' \
-d 'sign=94225A95AB4E8AA4883152B03F9BFD75' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-24+16%3A04%3A12' \
-d 'v=2.0' \
-d 'barcode=6932529211107' \
-d 'biz_ext=%7B%5C%22key%5C%22%3A%5C%22value%5C%22%7D' \
-d 'biz_type=taobao%2F1.0.0%2FbrandAsyncRenderEnable' \
-d 'cat_id=50021288' \
-d 'market=taobao' \
-d 'schema=%3CitemSchema%3E%3C%2FitemSchema%3E' \
-d 'source_item_info=null' \
-d 'spu_id=32323'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaItemPublishDistributeSubmitRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.biz_type="taobao/1.0.0/brandAsyncRenderEnable"
req.market="taobao"
req.cat_id=50021288
req.spu_id=32323
req.barcode="6932529211107"
req.schema="<itemSchema></itemSchema>"
req.source_item_info="数据结构示例JSON格式"
req.biz_ext="{\"key\":\"value\"}"
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.item.publish.distribute.submit");
add_param(pRequest,"biz_type","taobao/1.0.0/brandAsyncRenderEnable");
add_param(pRequest,"market","taobao");
add_param(pRequest,"cat_id","50021288");
add_param(pRequest,"spu_id","32323");
add_param(pRequest,"barcode","6932529211107");
add_param(pRequest,"schema","<itemSchema></itemSchema>");
add_param(pRequest,"source_item_info","数据结构JSON示例");
add_param(pRequest,"biz_ext","{\"key\":\"value\"}");
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.item.publish.distribute.submit', {
'biz_type':'taobao/1.0.0/brandAsyncRenderEnable',
'market':'taobao',
'cat_id':'50021288',
'spu_id':'32323',
'barcode':'6932529211107',
'schema':'<itemSchema></itemSchema>',
'source_item_info':'数据结构JSON示例',
'biz_ext':'{\"key\":\"value\"}'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})