TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
UniversalbpCreativeBindRequest req = new UniversalbpCreativeBindRequest();
UniversalbpCreativeBindRequest.TopServiceContext obj1 = new UniversalbpCreativeBindRequest.TopServiceContext();
obj1.setBizCode("xxxxx");
req.setTopServiceContext(obj1);
UniversalbpCreativeBindRequest.CreativeRefCommandVo obj2 = new UniversalbpCreativeBindRequest.CreativeRefCommandVo();
obj2.setCampaignId(68796878069L);
obj2.setAdgroupId(68793666608L);
obj2.setCreativeId(6845715605L);
obj2.setCreativeIdList(new Long[] { 739684500310001 };
);
obj2.setAddMainPicVideo(true);
obj2.setAddAutoCreative(true);
List<UniversalbpCreativeBindRequest.MaterialImageInfoVo> list4 = new ArrayList<UniversalbpCreativeBindRequest.MaterialImageInfoVo>();
UniversalbpCreativeBindRequest.MaterialImageInfoVo obj5 = new UniversalbpCreativeBindRequest.MaterialImageInfoVo();
list4.add(obj5);
obj5.setMaterialId(714616513841L);
obj5.setImagePosition(0L);
obj5.setImgUrl("https://img.alicdn.com/bao/uploaded/i1/3838159498/O1CN013BTEpu2K28f5CkcgG_!!3838159498.jpg");
obj5.setLinkUrl("http://item.taobao.com/item.htm?id=668800719012");
obj5.setMaterialName("外投宝贝测试,请不要拍");
obj2.setMaterialImageInfoList(list4);
req.setDataList(obj2);
UniversalbpCreativeBindResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
UniversalbpCreativeBindRequest req = new UniversalbpCreativeBindRequest();
UniversalbpCreativeBindRequest.TopServiceContextDomain obj1 = new UniversalbpCreativeBindRequest.TopServiceContextDomain();
obj1.BizCode = "xxxxx";
req.TopServiceContext_ = obj1;
UniversalbpCreativeBindRequest.CreativeRefCommandVoDomain obj2 = new UniversalbpCreativeBindRequest.CreativeRefCommandVoDomain();
obj2.CampaignId = 68796878069L;
obj2.AdgroupId = 68793666608L;
obj2.CreativeId = 6845715605L;
obj2.CreativeIdList = new long[] { 739684500310001 };
;
obj2.AddMainPicVideo = true;
obj2.AddAutoCreative = true;
List<UniversalbpCreativeBindRequest.MaterialImageInfoVoDomain> list4 = new List<UniversalbpCreativeBindRequest.MaterialImageInfoVoDomain>();
UniversalbpCreativeBindRequest.MaterialImageInfoVoDomain obj5 = new UniversalbpCreativeBindRequest.MaterialImageInfoVoDomain();
list4.Add(obj5);
obj5.MaterialId = 714616513841L;
obj5.ImagePosition = 0L;
obj5.ImgUrl = "https://img.alicdn.com/bao/uploaded/i1/3838159498/O1CN013BTEpu2K28f5CkcgG_!!3838159498.jpg";
obj5.LinkUrl = "http://item.taobao.com/item.htm?id=668800719012";
obj5.MaterialName = "外投宝贝测试,请不要拍";
obj2.MaterialImageInfoList= list4;
req.DataList_ = obj2;
UniversalbpCreativeBindResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new UniversalbpCreativeBindRequest;
$top_service_context = new TopServiceContext;
$top_service_context->biz_code="xxxxx";
$req->setTopServiceContext(json_encode($top_service_context));
$data_list = new CreativeRefCommandVo;
$data_list->campaign_id="68796878069";
$data_list->adgroup_id="68793666608";
$data_list->creative_id="6845715605";
$data_list->creative_id_list="[739684500310001]";
$data_list->add_main_pic_video="true";
$data_list->add_auto_creative="true";
$material_image_info_list = new MaterialImageInfoVo;
$material_image_info_list->material_id="714616513841";
$material_image_info_list->image_position="0";
$material_image_info_list->img_url="https://img.alicdn.com/bao/uploaded/i1/3838159498/O1CN013BTEpu2K28f5CkcgG_!!3838159498.jpg";
$material_image_info_list->link_url="http://item.taobao.com/item.htm?id=668800719012";
$material_image_info_list->material_name="外投宝贝测试,请不要拍";
$data_list->material_image_info_list = $material_image_info_list;
$req->setDataList(json_encode($data_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=taobao.universalbp.creative.bind' \
-d 'partner_id=apidoc' \
-d 'session=086e5c2e-18a5-49c0-9fa1-05c0c29751d9' \
-d 'sign=7F0B559520D8C45E175E86818E3F3C94' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+15%3A31%3A15' \
-d 'v=2.0' \
-d 'data_list=null' \
-d 'top_service_context=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.UniversalbpCreativeBindRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.top_service_context="数据结构示例JSON格式"
req.data_list="数据结构示例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,"taobao.universalbp.creative.bind");
add_param(pRequest,"top_service_context","数据结构JSON示例");
add_param(pRequest,"data_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('taobao.universalbp.creative.bind', {
'top_service_context':'数据结构JSON示例',
'data_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})