TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaUdUdsmartdataGetRequest req = new AlibabaUdUdsmartdataGetRequest();
AlibabaUdUdsmartdataGetRequest.UDSmartServiceRequest obj1 = new AlibabaUdUdsmartdataGetRequest.UDSmartServiceRequest();
obj1.setTecAgent("代理商");
obj1.setCmClickId("adbcde");
obj1.setCmRequestId("2024123123");
obj1.setProductId("123");
obj1.setOrderId("123");
obj1.setEventType("12");
obj1.setCkClickId("adbcde");
obj1.setAppAccessToken("adbcde");
obj1.setPurchaseAmount("9900");
obj1.setItemCount("1");
obj1.setCkRequestId("2024123123");
obj1.setItemId("123456");
obj1.setItemName("T恤");
obj1.setEventTime("1728456618");
obj1.setChannelId("1");
obj1.setCallbackType("1");
obj1.setAdvertiserId("1213456");
obj1.setShopName("xx的铺子");
obj1.setTs(1L);
obj1.setIsDirectMatch("1");
obj1.setCallBackUrl("url");
obj1.setTraceId("traceId");
obj1.setAdSrc("52");
obj1.setBusinessType("type");
req.setUdSmartServiceRequest(obj1);
AlibabaUdUdsmartdataGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaUdUdsmartdataGetRequest req = new AlibabaUdUdsmartdataGetRequest();
AlibabaUdUdsmartdataGetRequest.UDSmartServiceRequestDomain obj1 = new AlibabaUdUdsmartdataGetRequest.UDSmartServiceRequestDomain();
obj1.TecAgent = "代理商";
obj1.CmClickId = "adbcde";
obj1.CmRequestId = "2024123123";
obj1.ProductId = "123";
obj1.OrderId = "123";
obj1.EventType = "12";
obj1.CkClickId = "adbcde";
obj1.AppAccessToken = "adbcde";
obj1.PurchaseAmount = "9900";
obj1.ItemCount = "1";
obj1.CkRequestId = "2024123123";
obj1.ItemId = "123456";
obj1.ItemName = "T恤";
obj1.EventTime = "1728456618";
obj1.ChannelId = "1";
obj1.CallbackType = "1";
obj1.AdvertiserId = "1213456";
obj1.ShopName = "xx的铺子";
obj1.Ts = 1L;
obj1.IsDirectMatch = "1";
obj1.CallBackUrl = "url";
obj1.TraceId = "traceId";
obj1.AdSrc = "52";
obj1.BusinessType = "type";
req.UdSmartServiceRequest_ = obj1;
AlibabaUdUdsmartdataGetResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaUdUdsmartdataGetRequest;
$ud_smart_service_request = new UDSmartServiceRequest;
$ud_smart_service_request->tec_agent="代理商";
$ud_smart_service_request->cm_click_id="adbcde";
$ud_smart_service_request->cm_request_id="2024123123";
$ud_smart_service_request->product_id="123";
$ud_smart_service_request->order_id="123";
$ud_smart_service_request->event_type="12";
$ud_smart_service_request->ck_click_id="adbcde";
$ud_smart_service_request->app_access_token="adbcde";
$ud_smart_service_request->purchase_amount="9900";
$ud_smart_service_request->item_count="1";
$ud_smart_service_request->ck_request_id="2024123123";
$ud_smart_service_request->item_id="123456";
$ud_smart_service_request->item_name="T恤";
$ud_smart_service_request->event_time="1728456618";
$ud_smart_service_request->channel_id="1";
$ud_smart_service_request->callback_type="1";
$ud_smart_service_request->advertiser_id="1213456";
$ud_smart_service_request->shop_name="xx的铺子";
$ud_smart_service_request->ts="1";
$ud_smart_service_request->is_direct_match="1";
$ud_smart_service_request->call_back_url="url";
$ud_smart_service_request->trace_id="traceId";
$ud_smart_service_request->ad_src="52";
$ud_smart_service_request->business_type="type";
$req->setUdSmartServiceRequest(json_encode($ud_smart_service_request));
$resp = $c->execute($req);
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.ud.udsmartdata.get' \
-d 'partner_id=apidoc' \
-d 'sign=70AB5B342699C32195FFCEA4FB0BD8F6' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-08+05%3A00%3A24' \
-d 'v=2.0' \
-d 'ud_smart_service_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaUdUdsmartdataGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.ud_smart_service_request="数据结构示例JSON格式"
try:
resp= req.getResponse()
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.ud.udsmartdata.get");
add_param(pRequest,"ud_smart_service_request","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
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.ud.udsmartdata.get', {
'ud_smart_service_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})