TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthYtWtAdPlanSaveRequest req = new AlibabaAlihealthYtWtAdPlanSaveRequest();
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAdPlanDTO obj1 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAdPlanDTO();
obj1.setId(100000L);
obj1.setName("广告名称");
obj1.setAdsDesc("广告描述");
obj1.setAdsType(1L);
obj1.setItemId(123456L);
obj1.setCustomizeAdsUrl("https://");
obj1.setCustomizeDeepLink("https://");
obj1.setMediaId(1L);
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAttributionDTO obj2 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAttributionDTO();
obj2.setUserActionLevel(1L);
obj2.setUserActionType(1L);
obj2.setAttributionType(1L);
obj2.setAttributionTime(1L);
obj2.setShopReportBlackList("123456,123456");
obj2.setItemReportWhiteList("123456,123456");
obj1.setIsvAttributionDto(obj2);
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvPostbackDTO obj3 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvPostbackDTO();
obj3.setReportType(1L);
obj3.setReportFreqType(1L);
obj3.setReportProportion(90L);
obj3.setDelayTime(10L);
obj3.setFilterFee("100.05");
obj1.setIsvPostbackDto(obj3);
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAssistDTO obj4 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAssistDTO();
obj4.setAssistType(1L);
obj1.setIsvAssistDto(obj4);
obj1.setReportSwitch(1L);
req.setIsvAdPlanDto(obj1);
AlibabaAlihealthYtWtAdPlanSaveResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAlihealthYtWtAdPlanSaveRequest req = new AlibabaAlihealthYtWtAdPlanSaveRequest();
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAdPlanDTODomain obj1 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAdPlanDTODomain();
obj1.Id = 100000L;
obj1.Name = "广告名称";
obj1.AdsDesc = "广告描述";
obj1.AdsType = 1L;
obj1.ItemId = 123456L;
obj1.CustomizeAdsUrl = "https://";
obj1.CustomizeDeepLink = "https://";
obj1.MediaId = 1L;
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAttributionDTODomain obj2 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAttributionDTODomain();
obj2.UserActionLevel = 1L;
obj2.UserActionType = 1L;
obj2.AttributionType = 1L;
obj2.AttributionTime = 1L;
obj2.ShopReportBlackList = "123456,123456";
obj2.ItemReportWhiteList = "123456,123456";
obj1.IsvAttributionDto= obj2;
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvPostbackDTODomain obj3 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvPostbackDTODomain();
obj3.ReportType = 1L;
obj3.ReportFreqType = 1L;
obj3.ReportProportion = 90L;
obj3.DelayTime = 10L;
obj3.FilterFee = "100.05";
obj1.IsvPostbackDto= obj3;
AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAssistDTODomain obj4 = new AlibabaAlihealthYtWtAdPlanSaveRequest.IsvAssistDTODomain();
obj4.AssistType = 1L;
obj1.IsvAssistDto= obj4;
obj1.ReportSwitch = 1L;
req.IsvAdPlanDto_ = obj1;
AlibabaAlihealthYtWtAdPlanSaveResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAlihealthYtWtAdPlanSaveRequest;
$isv_ad_plan_dto = new IsvAdPlanDTO;
$isv_ad_plan_dto->id="100000";
$isv_ad_plan_dto->name="广告名称";
$isv_ad_plan_dto->ads_desc="广告描述";
$isv_ad_plan_dto->ads_type="1";
$isv_ad_plan_dto->item_id="123456";
$isv_ad_plan_dto->customize_ads_url="https://";
$isv_ad_plan_dto->customize_deep_link="https://";
$isv_ad_plan_dto->media_id="1";
$isv_attribution_dto = new IsvAttributionDTO;
$isv_attribution_dto->user_action_level="1";
$isv_attribution_dto->user_action_type="1";
$isv_attribution_dto->attribution_type="1";
$isv_attribution_dto->attribution_time="1";
$isv_attribution_dto->shop_report_black_list="123456,123456";
$isv_attribution_dto->item_report_white_list="123456,123456";
$isv_ad_plan_dto->isv_attribution_dto = $isv_attribution_dto;
$isv_postback_dto = new IsvPostbackDTO;
$isv_postback_dto->report_type="1";
$isv_postback_dto->report_freq_type="1";
$isv_postback_dto->report_proportion="90";
$isv_postback_dto->delay_time="10";
$isv_postback_dto->filter_fee="100.05";
$isv_ad_plan_dto->isv_postback_dto = $isv_postback_dto;
$isv_assist_dto = new IsvAssistDTO;
$isv_assist_dto->assist_type="1";
$isv_ad_plan_dto->isv_assist_dto = $isv_assist_dto;
$isv_ad_plan_dto->report_switch="1";
$req->setIsvAdPlanDto(json_encode($isv_ad_plan_dto));
$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.alihealth.yt.wt.ad.plan.save' \
-d 'partner_id=apidoc' \
-d 'sign=65AF870B61EFC16426230C5616BB69DF' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-28+16%3A44%3A11' \
-d 'v=2.0' \
-d 'isv_ad_plan_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAlihealthYtWtAdPlanSaveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.isv_ad_plan_dto="数据结构示例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.alihealth.yt.wt.ad.plan.save");
add_param(pRequest,"isv_ad_plan_dto","数据结构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.alihealth.yt.wt.ad.plan.save', {
'isv_ad_plan_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})