TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
UniversalbpNewBidwordAddRequest req = new UniversalbpNewBidwordAddRequest();
UniversalbpNewBidwordAddRequest.TopServiceContext obj1 = new UniversalbpNewBidwordAddRequest.TopServiceContext();
obj1.setBizCode("xxxxx");
obj1.setLoginType(1L);
obj1.setMemberId(12345L);
obj1.setExt("{}");
req.setTopServiceContext(obj1);
UniversalbpNewBidwordAddRequest.BidWordAddRequestVO obj2 = new UniversalbpNewBidwordAddRequest.BidWordAddRequestVO();
List<UniversalbpNewBidwordAddRequest.WordCommandVO> list4 = new ArrayList<UniversalbpNewBidwordAddRequest.WordCommandVO>();
UniversalbpNewBidwordAddRequest.WordCommandVO obj5 = new UniversalbpNewBidwordAddRequest.WordCommandVO();
list4.add(obj5);
obj5.setBidwordId(1124844766581L);
obj5.setCampaignId(68796878069L);
obj5.setAdgroupId(68793666608L);
obj5.setWord("鞋原创小众");
obj5.setBidPrice("2.23");
obj5.setOnlineStatus(1L);
obj5.setMatchScope(4L);
obj2.setBidwordList(list4);
req.setBidWordAddRequestVO(obj2);
UniversalbpNewBidwordAddResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
UniversalbpNewBidwordAddRequest req = new UniversalbpNewBidwordAddRequest();
UniversalbpNewBidwordAddRequest.TopServiceContextDomain obj1 = new UniversalbpNewBidwordAddRequest.TopServiceContextDomain();
obj1.BizCode = "xxxxx";
obj1.LoginType = 1L;
obj1.MemberId = 12345L;
obj1.Ext = "{}";
req.TopServiceContext_ = obj1;
UniversalbpNewBidwordAddRequest.BidWordAddRequestVODomain obj2 = new UniversalbpNewBidwordAddRequest.BidWordAddRequestVODomain();
List<UniversalbpNewBidwordAddRequest.WordCommandVODomain> list4 = new List<UniversalbpNewBidwordAddRequest.WordCommandVODomain>();
UniversalbpNewBidwordAddRequest.WordCommandVODomain obj5 = new UniversalbpNewBidwordAddRequest.WordCommandVODomain();
list4.Add(obj5);
obj5.BidwordId = 1124844766581L;
obj5.CampaignId = 68796878069L;
obj5.AdgroupId = 68793666608L;
obj5.Word = "鞋原创小众";
obj5.BidPrice = "2.23";
obj5.OnlineStatus = 1L;
obj5.MatchScope = 4L;
obj2.BidwordList= list4;
req.BidWordAddRequestVO_ = obj2;
UniversalbpNewBidwordAddResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new UniversalbpNewBidwordAddRequest;
$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));
$bid_word_add_request_v_o = new BidWordAddRequestVO;
$bidword_list = new WordCommandVO;
$bidword_list->bidword_id="1124844766581";
$bidword_list->campaign_id="68796878069";
$bidword_list->adgroup_id="68793666608";
$bidword_list->word="鞋原创小众";
$bidword_list->bid_price="2.23";
$bidword_list->online_status="1";
$bidword_list->match_scope="4";
$bid_word_add_request_v_o->bidword_list = $bidword_list;
$req->setBidWordAddRequestVO(json_encode($bid_word_add_request_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.bidword.add' \
-d 'partner_id=apidoc' \
-d 'session=52852801-4c79-4b96-823d-f75900325e11' \
-d 'sign=20822BC5080C9B358D346B471807B0F9' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+15%3A26%3A50' \
-d 'v=2.0' \
-d 'bid_word_add_request_v_o=null' \
-d 'top_service_context=TopServiceContext'
# -*- coding: utf-8 -*-
import top.api
req=top.api.UniversalbpNewBidwordAddRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.top_service_context="TopServiceContext"
req.bid_word_add_request_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.bidword.add");
add_param(pRequest,"top_service_context","数据结构JSON示例");
add_param(pRequest,"bid_word_add_request_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.bidword.add', {
'top_service_context':'数据结构JSON示例',
'bid_word_add_request_v_o':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})