TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
UniversalbpNewAdgroupBidBatchupdateRequest req = new UniversalbpNewAdgroupBidBatchupdateRequest();
UniversalbpNewAdgroupBidBatchupdateRequest.TopServiceContext obj1 = new UniversalbpNewAdgroupBidBatchupdateRequest.TopServiceContext();
obj1.setBizCode("xxxxx");
obj1.setLoginType(1L);
obj1.setMemberId(12345L);
obj1.setExt("{}");
req.setTopServiceContext(obj1);
UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandListVO obj2 = new UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandListVO();
List<UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVO> list4 = new ArrayList<UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVO>();
UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVO obj5 = new UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVO();
list4.add(obj5);
obj5.setAdgroupId(68793666608L);
obj5.setEnableOcpc(true);
obj5.setOcpcRatio(200L);
obj5.setOcpcMarketingAim("conv");
obj5.setEnableColdSpeedNewItem(true);
obj2.setBidList(list4);
req.setAdgroupBidCommandListVO(obj2);
UniversalbpNewAdgroupBidBatchupdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
UniversalbpNewAdgroupBidBatchupdateRequest req = new UniversalbpNewAdgroupBidBatchupdateRequest();
UniversalbpNewAdgroupBidBatchupdateRequest.TopServiceContextDomain obj1 = new UniversalbpNewAdgroupBidBatchupdateRequest.TopServiceContextDomain();
obj1.BizCode = "xxxxx";
obj1.LoginType = 1L;
obj1.MemberId = 12345L;
obj1.Ext = "{}";
req.TopServiceContext_ = obj1;
UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandListVODomain obj2 = new UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandListVODomain();
List<UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVODomain> list4 = new List<UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVODomain>();
UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVODomain obj5 = new UniversalbpNewAdgroupBidBatchupdateRequest.AdgroupBidCommandVODomain();
list4.Add(obj5);
obj5.AdgroupId = 68793666608L;
obj5.EnableOcpc = true;
obj5.OcpcRatio = 200L;
obj5.OcpcMarketingAim = "conv";
obj5.EnableColdSpeedNewItem = true;
obj2.BidList= list4;
req.AdgroupBidCommandListVO_ = obj2;
UniversalbpNewAdgroupBidBatchupdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new UniversalbpNewAdgroupBidBatchupdateRequest;
$top_service_context = new TopServiceContext;
$top_service_context->biz_code="xxxxx";
$top_service_context->login_type="1";
$top_service_context->member_id="12345";
$top_service_context->ext="{}";
$req->setTopServiceContext(json_encode($top_service_context));
$adgroup_bid_command_list_v_o = new AdgroupBidCommandListVO;
$bid_list = new AdgroupBidCommandVO;
$bid_list->adgroup_id="68793666608";
$bid_list->enable_ocpc="true";
$bid_list->ocpc_ratio="200";
$bid_list->ocpc_marketing_aim="conv";
$bid_list->enable_cold_speed_new_item="true";
$adgroup_bid_command_list_v_o->bid_list = $bid_list;
$req->setAdgroupBidCommandListVO(json_encode($adgroup_bid_command_list_v_o));
$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.new.adgroup.bid.batchupdate' \
-d 'partner_id=apidoc' \
-d 'session=956d7f05-c4b1-4172-9651-8c2965bea61e' \
-d 'sign=6FFEA9BDEBEB2A662A8890DC0D2EF56B' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+15%3A22%3A47' \
-d 'v=2.0' \
-d 'adgroup_bid_command_list_v_o=null' \
-d 'top_service_context=TopServiceContext'
# -*- coding: utf-8 -*-
import top.api
req=top.api.UniversalbpNewAdgroupBidBatchupdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.top_service_context="TopServiceContext"
req.adgroup_bid_command_list_v_o=""
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.new.adgroup.bid.batchupdate");
add_param(pRequest,"top_service_context","数据结构JSON示例");
add_param(pRequest,"adgroup_bid_command_list_v_o","数据结构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.new.adgroup.bid.batchupdate', {
'top_service_context':'数据结构JSON示例',
'adgroup_bid_command_list_v_o':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})