TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripDaytoursProductUploadRequest req = new AlitripDaytoursProductUploadRequest();
req.setTripDay(2L);
req.setSubStock(0L);
req.setWapDesc("<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>");
req.setItineraries("<ITINERARY><ACTIVITY><title>活动1</title> <txt>活动描述1</txt> <img>活动图片链接1-1</img> <img>活动图片链接1-2</img> <hour>3</hour> <minute>30</minute></ACTIVITY> <ACTIVITY><title>活动 2</title> <txt>活动描述2</txt> <img>活动图片链接2</img></ACTIVITY></ITINERARY>");
req.setDescXml("<DESC><HIGHLIGHT><title>亮点1</title> <txt>亮点描述1</txt> <img>亮点图片链接1</img></HIGHLIGHT> <HIGHLIGHT><title>亮点2</title> <txt>亮点描述2</txt> <img>亮点图片链接2</img></HIGHLIGHT></DESC>");
req.setFeeExclude("xxx,ssss");
req.setOrderInfo("须知1,须知2");
req.setConfirmTime(2L);
req.setTitle("商品标题");
req.setRefundRegulations("30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90");
req.setFeeInclude("费用包含1,费用包含2");
req.setConfirmType(1L);
req.setItemCustomTag("美食");
req.setOutProductId("1234");
req.setToLocations("东京,京都");
req.setTripNight(1L);
req.setPicUrls("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg");
req.setItemId(1111L);
req.setReserveLimit("1_18_00");
req.setRefundType(0L);
req.setFromLocations("东京");
req.setDescHtml("PC端详情描述");
req.setSubTitles("亮点1,亮点2,亮点3");
req.setTravellerTemplateId(111L);
req.setTouristServiceProvider("真实旅游服务提供商");
List<AlitripDaytoursProductUploadRequest.StructItinerary> list2 = new ArrayList<AlitripDaytoursProductUploadRequest.StructItinerary>();
AlitripDaytoursProductUploadRequest.StructItinerary obj3 = new AlitripDaytoursProductUploadRequest.StructItinerary();
list2.add(obj3);
obj3.setDayOrder(1L);
List<AlitripDaytoursProductUploadRequest.ItineraryActivity> list6 = new ArrayList<AlitripDaytoursProductUploadRequest.ItineraryActivity>();
AlitripDaytoursProductUploadRequest.ItineraryActivity obj7 = new AlitripDaytoursProductUploadRequest.ItineraryActivity();
list6.add(obj7);
obj7.setTitle("活动标题");
obj7.setTxt("活动内容文本描述");
obj7.setImages("http:xxx.com/jpg1, http:xxx.com/jpg2");
obj7.setHour(2L);
obj7.setMinute(30L);
list4.setActivities(list6);
req.setStructItineraries(list2);
List<AlitripDaytoursProductUploadRequest.ProductHighLights> list9 = new ArrayList<AlitripDaytoursProductUploadRequest.ProductHighLights>();
AlitripDaytoursProductUploadRequest.ProductHighLights obj10 = new AlitripDaytoursProductUploadRequest.ProductHighLights();
list9.add(obj10);
obj10.setTitle("测试标题");
obj10.setDesc("亮点信息");
obj10.setPicUrls("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg");
req.setHighLights(list9);
req.setRefundRegulationsJson("[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]");
req.setBusinessLicense("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg");
req.setSellerCids("12344,24332");
req.setSecondKill("wap_only");
req.setHasDiscount(false);
AlitripDaytoursProductUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripDaytoursProductUploadRequest req = new AlitripDaytoursProductUploadRequest();
req.TripDay = 2L;
req.SubStock = 0L;
req.WapDesc = "<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>";
req.Itineraries = "<ITINERARY><ACTIVITY><title>活动1</title> <txt>活动描述1</txt> <img>活动图片链接1-1</img> <img>活动图片链接1-2</img> <hour>3</hour> <minute>30</minute></ACTIVITY> <ACTIVITY><title>活动 2</title> <txt>活动描述2</txt> <img>活动图片链接2</img></ACTIVITY></ITINERARY>";
req.DescXml = "<DESC><HIGHLIGHT><title>亮点1</title> <txt>亮点描述1</txt> <img>亮点图片链接1</img></HIGHLIGHT> <HIGHLIGHT><title>亮点2</title> <txt>亮点描述2</txt> <img>亮点图片链接2</img></HIGHLIGHT></DESC>";
req.FeeExclude = "xxx,ssss";
req.OrderInfo = "须知1,须知2";
req.ConfirmTime = 2L;
req.Title = "商品标题";
req.RefundRegulations = "30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90";
req.FeeInclude = "费用包含1,费用包含2";
req.ConfirmType = 1L;
req.ItemCustomTag = "美食";
req.OutProductId = "1234";
req.ToLocations = "东京,京都";
req.TripNight = 1L;
req.PicUrls = "https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg";
req.ItemId = 1111L;
req.ReserveLimit = "1_18_00";
req.RefundType = 0L;
req.FromLocations = "东京";
req.DescHtml = "PC端详情描述";
req.SubTitles = "亮点1,亮点2,亮点3";
req.TravellerTemplateId = 111L;
req.TouristServiceProvider = "真实旅游服务提供商";
List<AlitripDaytoursProductUploadRequest.StructItineraryDomain> list2 = new List<AlitripDaytoursProductUploadRequest.StructItineraryDomain>();
AlitripDaytoursProductUploadRequest.StructItineraryDomain obj3 = new AlitripDaytoursProductUploadRequest.StructItineraryDomain();
list2.Add(obj3);
obj3.DayOrder = 1L;
List<AlitripDaytoursProductUploadRequest.ItineraryActivityDomain> list5 = new List<AlitripDaytoursProductUploadRequest.ItineraryActivityDomain>();
AlitripDaytoursProductUploadRequest.ItineraryActivityDomain obj6 = new AlitripDaytoursProductUploadRequest.ItineraryActivityDomain();
list5.Add(obj6);
obj6.Title = "活动标题";
obj6.Txt = "活动内容文本描述";
obj6.Images = "http:xxx.com/jpg1, http:xxx.com/jpg2";
obj6.Hour = 2L;
obj6.Minute = 30L;
obj3.Activities= list5;
req.StructItineraries_ = list2;
List<AlitripDaytoursProductUploadRequest.ProductHighLightsDomain> list8 = new List<AlitripDaytoursProductUploadRequest.ProductHighLightsDomain>();
AlitripDaytoursProductUploadRequest.ProductHighLightsDomain obj9 = new AlitripDaytoursProductUploadRequest.ProductHighLightsDomain();
list8.Add(obj9);
obj9.Title = "测试标题";
obj9.Desc = "亮点信息";
obj9.PicUrls = "https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg";
req.HighLights_ = list8;
req.RefundRegulationsJson = "[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]";
req.BusinessLicense = "https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg";
req.SellerCids = "12344,24332";
req.SecondKill = "wap_only";
req.HasDiscount = false;
AlitripDaytoursProductUploadResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripDaytoursProductUploadRequest;
$req->setTripDay("2");
$req->setSubStock("0");
$req->setWapDesc("<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>");
$req->setItineraries("<ITINERARY><ACTIVITY><title>活动1</title> <txt>活动描述1</txt> <img>活动图片链接1-1</img> <img>活动图片链接1-2</img> <hour>3</hour> <minute>30</minute></ACTIVITY> <ACTIVITY><title>活动 2</title> <txt>活动描述2</txt> <img>活动图片链接2</img></ACTIVITY></ITINERARY>");
$req->setDescXml("<DESC><HIGHLIGHT><title>亮点1</title> <txt>亮点描述1</txt> <img>亮点图片链接1</img></HIGHLIGHT> <HIGHLIGHT><title>亮点2</title> <txt>亮点描述2</txt> <img>亮点图片链接2</img></HIGHLIGHT></DESC>");
$req->setFeeExclude("xxx,ssss");
$req->setOrderInfo("须知1,须知2");
$req->setConfirmTime("2");
$req->setTitle("商品标题");
$req->setRefundRegulations("30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90");
$req->setFeeInclude("费用包含1,费用包含2");
$req->setConfirmType("1");
$req->setItemCustomTag("美食");
$req->setOutProductId("1234");
$req->setToLocations("东京,京都");
$req->setTripNight("1");
$req->setPicUrls("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg");
$req->setItemId("1111");
$req->setReserveLimit("1_18_00");
$req->setRefundType("0");
$req->setFromLocations("东京");
$req->setDescHtml("PC端详情描述");
$req->setSubTitles("亮点1,亮点2,亮点3");
$req->setTravellerTemplateId("111");
$req->setTouristServiceProvider("真实旅游服务提供商");
$struct_itineraries = new StructItinerary;
$struct_itineraries->day_order="1";
$activities = new ItineraryActivity;
$activities->title="活动标题";
$activities->txt="活动内容文本描述";
$activities->images="http:xxx.com/jpg1, http:xxx.com/jpg2";
$activities->hour="2";
$activities->minute="30";
$struct_itineraries->activities = $activities;
$req->setStructItineraries(json_encode($struct_itineraries));
$high_lights = new ProductHighLights;
$high_lights->title="测试标题";
$high_lights->desc="亮点信息";
$high_lights->pic_urls="https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg";
$req->setHighLights(json_encode($high_lights));
$req->setRefundRegulationsJson("[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]");
$req->setBusinessLicense("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg");
$req->setSellerCids("12344,24332");
$req->setSecondKill("wap_only");
$req->setHasDiscount("false");
$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=alitrip.daytours.product.upload' \
-d 'partner_id=apidoc' \
-d 'session=6acb0f5e-1e2c-4ce5-9409-eb289d312d61' \
-d 'sign=00E81A4C38D63C2A343A9C6FD48CFD7D' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A41%3A39' \
-d 'v=2.0' \
-d 'business_license=https%3A%2F%2Fimg.daily.taobaocdn.net%2Fimgextra%2Fi3%2F2024098454%2FTB2C4VXXXXXXXc1XXXXXXXXXXXX_%21%212024098454.jpg' \
-d 'confirm_time=2' \
-d 'confirm_type=1' \
-d 'desc_html=PC%E7%AB%AF%E8%AF%A6%E6%83%85%E6%8F%8F%E8%BF%B0' \
-d 'desc_xml=%3CDESC%3E%3CHIGHLIGHT%3E%3Ctitle%3E%E4%BA%AE%E7%82%B91%3C%2Ftitle%3E+%3Ctxt%3E%E4%BA%AE%E7%82%B9%E6%8F%8F%E8%BF%B01%3C%2Ftxt%3E+%3Cimg%3E%E4%BA%AE%E7%82%B9%E5%9B%BE%E7%89%87%E9%93%BE%E6%8E%A51%3C%2Fimg%3E%3C%2FHIGHLIGHT%3E+%3CHIGHLIGHT%3E%3Ctitle%3E%E4%BA%AE%E7%82%B92%3C%2Ftitle%3E+%3Ctxt%3E%E4%BA%AE%E7%82%B9%E6%8F%8F%E8%BF%B02%3C%2Ftxt%3E+%3Cimg%3E%E4%BA%AE%E7%82%B9%E5%9B%BE%E7%89%87%E9%93%BE%E6%8E%A52%3C%2Fimg%3E%3C%2FHIGHLIGHT%3E%3C%2FDESC%3E' \
-d 'fee_exclude=xxx%2Cssss' \
-d 'fee_include=%E8%B4%B9%E7%94%A8%E5%8C%85%E5%90%AB1%2C%E8%B4%B9%E7%94%A8%E5%8C%85%E5%90%AB2' \
-d 'from_locations=%E4%B8%9C%E4%BA%AC' \
-d 'has_discount=false' \
-d 'high_lights=null' \
-d 'item_custom_tag=%E7%BE%8E%E9%A3%9F' \
-d 'item_id=1111' \
-d 'itineraries=%3CITINERARY%3E%3CACTIVITY%3E%3Ctitle%3E%E6%B4%BB%E5%8A%A81%3C%2Ftitle%3E+%3Ctxt%3E%E6%B4%BB%E5%8A%A8%E6%8F%8F%E8%BF%B01%3C%2Ftxt%3E+%3Cimg%3E%E6%B4%BB%E5%8A%A8%E5%9B%BE%E7%89%87%E9%93%BE%E6%8E%A51-1%3C%2Fimg%3E+%3Cimg%3E%E6%B4%BB%E5%8A%A8%E5%9B%BE%E7%89%87%E9%93%BE%E6%8E%A51-2%3C%2Fimg%3E+%3Chour%3E3%3C%2Fhour%3E+%3Cminute%3E30%3C%2Fminute%3E%3C%2FACTIVITY%3E+%3CACTIVITY%3E%3Ctitle%3E%E6%B4%BB%E5%8A%A8+2%3C%2Ftitle%3E+%3Ctxt%3E%E6%B4%BB%E5%8A%A8%E6%8F%8F%E8%BF%B02%3C%2Ftxt%3E+%3Cimg%3E%E6%B4%BB%E5%8A%A8%E5%9B%BE%E7%89%87%E9%93%BE%E6%8E%A52%3C%2Fimg%3E%3C%2FACTIVITY%3E%3C%2FITINERARY%3E' \
-d 'order_info=%E9%A1%BB%E7%9F%A51%2C%E9%A1%BB%E7%9F%A52' \
-d 'out_product_id=1234' \
-d 'pic_urls=https%3A%2F%2Fimg.daily.taobaocdn.net%2Fimgextra%2Fi3%2F2024098454%2FTB2C4VXXXXXXXc1XXXXXXXXXXXX_%21%212024098454.jpg%2Chttp%3A%2F%2Fww1.sinaimg.cn%2Flarge%2F005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg' \
-d 'refund_regulations=30_30_0%2C30_15_5%2C14_7_15%2C6_4_70%2C3_1_85%2C1_1_90' \
-d 'refund_regulations_json=%7B%22firstDay%22%3A-1%2C%22secondDay%22%3A5%2C%22percent%22%3A50%2C%22sellerPercent%22%3A20%7D%2C%7B%22firstDay%22%3A4%2C%22secondDay%22%3A1%2C%22percent%22%3A80%2C%22sellerPercent%22%3A50%7D%2C%7B%22firstDay%22%3A0%2C%22secondDay%22%3A0%2C%22percent%22%3A100%2C%22sellerPercent%22%3A70%7D%2C%7B%22firstDay%22%3A0%2C%22secondDay%22%3A0%2C%22percent%22%3A100%2C%22sellerPercent%22%3A90%2C%22isHoliday%22%3Atrue%7D' \
-d 'refund_type=0' \
-d 'reserve_limit=1_18_00' \
-d 'second_kill=wap_only' \
-d 'seller_cids=12344%2C24332' \
-d 'struct_itineraries=null' \
-d 'sub_stock=0' \
-d 'sub_titles=%E4%BA%AE%E7%82%B91%2C%E4%BA%AE%E7%82%B92%2C%E4%BA%AE%E7%82%B93' \
-d 'title=%E5%95%86%E5%93%81%E6%A0%87%E9%A2%98' \
-d 'to_locations=%E4%B8%9C%E4%BA%AC%2C%E4%BA%AC%E9%83%BD' \
-d 'tourist_service_provider=%E7%9C%9F%E5%AE%9E%E6%97%85%E6%B8%B8%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E5%95%86' \
-d 'traveller_template_id=111' \
-d 'trip_day=2' \
-d 'trip_night=1' \
-d 'wap_desc=%3CwapDesc%3E%3CshortDesc%3E%E6%A0%87%E9%A2%981%3C%2FshortDesc%3E+%3Ctxt%3E%E6%8F%8F%E8%BF%B01%3C%2Ftxt%3E+%3Cimg%3E%E5%9B%BE%E7%89%87%E8%B7%AF%E5%BE%841%3C%2Fimg%3E+%3CshortDesc%3E%E6%A0%87%E9%A2%982%3C%2FshortDesc%3E+%3Ctxt%3E%E6%8F%8F%E8%BF%B02%3C%2Ftxt%3E+%3Cimg%3E%E5%9B%BE%E7%89%87%E8%B7%AF%E5%BE%842%3C%2Fimg%3E+%3C%2FwapDesc%3E'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripDaytoursProductUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.trip_day=2
req.sub_stock=0
req.wap_desc="<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>"
req.itineraries="<ITINERARY><ACTIVITY><title>活动1</title> <txt>活动描述1</txt> <img>活动图片链接1-1</img> <img>活动图片链接1-2</img> <hour>3</hour> <minute>30</minute></ACTIVITY> <ACTIVITY><title>活动 2</title> <txt>活动描述2</txt> <img>活动图片链接2</img></ACTIVITY></ITINERARY>"
req.desc_xml="<DESC><HIGHLIGHT><title>亮点1</title> <txt>亮点描述1</txt> <img>亮点图片链接1</img></HIGHLIGHT> <HIGHLIGHT><title>亮点2</title> <txt>亮点描述2</txt> <img>亮点图片链接2</img></HIGHLIGHT></DESC>"
req.fee_exclude="xxx,ssss"
req.order_info="须知1,须知2"
req.confirm_time=2
req.title="商品标题"
req.refund_regulations="30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90"
req.fee_include="费用包含1,费用包含2"
req.confirm_type=1
req.item_custom_tag="美食"
req.out_product_id="1234"
req.to_locations="东京,京都"
req.trip_night=1
req.pic_urls="https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg"
req.item_id=1111
req.reserve_limit="1_18_00"
req.refund_type=0
req.from_locations="东京"
req.desc_html="PC端详情描述"
req.sub_titles="亮点1,亮点2,亮点3"
req.traveller_template_id=111
req.tourist_service_provider="真实旅游服务提供商"
req.struct_itineraries=""
req.high_lights=""
req.refund_regulations_json="[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]"
req.business_license="https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg"
req.seller_cids="12344,24332"
req.second_kill="wap_only"
req.has_discount=false
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,"alitrip.daytours.product.upload");
add_param(pRequest,"trip_day","2");
add_param(pRequest,"sub_stock","0");
add_param(pRequest,"wap_desc","<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>");
add_param(pRequest,"itineraries","<ITINERARY><ACTIVITY><title>活动1</title> <txt>活动描述1</txt> <img>活动图片链接1-1</img> <img>活动图片链接1-2</img> <hour>3</hour> <minute>30</minute></ACTIVITY> <ACTIVITY><title>活动 2</title> <txt>活动描述2</txt> <img>活动图片链接2</img></ACTIVITY></ITINERARY>");
add_param(pRequest,"desc_xml","<DESC><HIGHLIGHT><title>亮点1</title> <txt>亮点描述1</txt> <img>亮点图片链接1</img></HIGHLIGHT> <HIGHLIGHT><title>亮点2</title> <txt>亮点描述2</txt> <img>亮点图片链接2</img></HIGHLIGHT></DESC>");
add_param(pRequest,"fee_exclude","xxx,ssss");
add_param(pRequest,"order_info","须知1,须知2");
add_param(pRequest,"confirm_time","2");
add_param(pRequest,"title","商品标题");
add_param(pRequest,"refund_regulations","30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90");
add_param(pRequest,"fee_include","费用包含1,费用包含2");
add_param(pRequest,"confirm_type","1");
add_param(pRequest,"item_custom_tag","美食");
add_param(pRequest,"out_product_id","1234");
add_param(pRequest,"to_locations","东京,京都");
add_param(pRequest,"trip_night","1");
add_param(pRequest,"pic_urls","https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg");
add_param(pRequest,"item_id","1111");
add_param(pRequest,"reserve_limit","1_18_00");
add_param(pRequest,"refund_type","0");
add_param(pRequest,"from_locations","东京");
add_param(pRequest,"desc_html","PC端详情描述");
add_param(pRequest,"sub_titles","亮点1,亮点2,亮点3");
add_param(pRequest,"traveller_template_id","111");
add_param(pRequest,"tourist_service_provider","真实旅游服务提供商");
add_param(pRequest,"struct_itineraries","数据结构JSON示例");
add_param(pRequest,"high_lights","数据结构JSON示例");
add_param(pRequest,"refund_regulations_json","{"firstDay":-1,"secondDay":5,"percent":50,"sellerPercent":20},{"firstDay":4,"secondDay":1,"percent":80,"sellerPercent":50},{"firstDay":0,"secondDay":0,"percent":100,"sellerPercent":70},{"firstDay":0,"secondDay":0,"percent":100,"sellerPercent":90,"isHoliday":true}");
add_param(pRequest,"business_license","https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg");
add_param(pRequest,"seller_cids","12344,24332");
add_param(pRequest,"second_kill","wap_only");
add_param(pRequest,"has_discount","false");
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('alitrip.daytours.product.upload', {
'trip_day':'2',
'sub_stock':'0',
'wap_desc':'<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>',
'itineraries':'<ITINERARY><ACTIVITY><title>活动1</title> <txt>活动描述1</txt> <img>活动图片链接1-1</img> <img>活动图片链接1-2</img> <hour>3</hour> <minute>30</minute></ACTIVITY> <ACTIVITY><title>活动 2</title> <txt>活动描述2</txt> <img>活动图片链接2</img></ACTIVITY></ITINERARY>',
'desc_xml':'<DESC><HIGHLIGHT><title>亮点1</title> <txt>亮点描述1</txt> <img>亮点图片链接1</img></HIGHLIGHT> <HIGHLIGHT><title>亮点2</title> <txt>亮点描述2</txt> <img>亮点图片链接2</img></HIGHLIGHT></DESC>',
'fee_exclude':'xxx,ssss',
'order_info':'须知1,须知2',
'confirm_time':'2',
'title':'商品标题',
'refund_regulations':'30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90',
'fee_include':'费用包含1,费用包含2',
'confirm_type':'1',
'item_custom_tag':'美食',
'out_product_id':'1234',
'to_locations':'东京,京都',
'trip_night':'1',
'pic_urls':'https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg',
'item_id':'1111',
'reserve_limit':'1_18_00',
'refund_type':'0',
'from_locations':'东京',
'desc_html':'PC端详情描述',
'sub_titles':'亮点1,亮点2,亮点3',
'traveller_template_id':'111',
'tourist_service_provider':'真实旅游服务提供商',
'struct_itineraries':'数据结构JSON示例',
'high_lights':'数据结构JSON示例',
'refund_regulations_json':'{"firstDay":-1,"secondDay":5,"percent":50,"sellerPercent":20},{"firstDay":4,"secondDay":1,"percent":80,"sellerPercent":50},{"firstDay":0,"secondDay":0,"percent":100,"sellerPercent":70},{"firstDay":0,"secondDay":0,"percent":100,"sellerPercent":90,"isHoliday":true}',
'business_license':'https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg',
'seller_cids':'12344,24332',
'second_kill':'wap_only',
'has_discount':'false'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})