TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripGrouptourProductUploadRequest req = new AlitripGrouptourProductUploadRequest();
req.setGoTrafficType(1L);
req.setTripDay(1L);
req.setWapDesc("<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>");
req.setSubStock(0L);
req.setBackTrafficType(1L);
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.setConfirmTime(1L);
req.setTitle("商品标题");
req.setRouteType(1L);
req.setRefundRegulations("30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90");
List<AlitripGrouptourProductUploadRequest.GroupTourPackageInfo> list2 = new ArrayList<AlitripGrouptourProductUploadRequest.GroupTourPackageInfo>();
AlitripGrouptourProductUploadRequest.GroupTourPackageInfo obj3 = new AlitripGrouptourProductUploadRequest.GroupTourPackageInfo();
list2.add(obj3);
List<AlitripGrouptourProductUploadRequest.GroupTourTripElement> list6 = new ArrayList<AlitripGrouptourProductUploadRequest.GroupTourTripElement>();
AlitripGrouptourProductUploadRequest.GroupTourTripElement obj7 = new AlitripGrouptourProductUploadRequest.GroupTourTripElement();
list6.add(obj7);
obj7.setDay(1L);
obj7.setType(1L);
obj7.setJsonStr("\"type\":1, \"hotelType”:1, \"hotelStarType\":1, \"hotelStar\":\"三星级\", \"hotelCityName\":\"北京市\", \"hotelName\":\"如家快捷北京北太平庄店”, \"roomType\":\"大床房\" }");
list4.setTripElementList(list6);
List<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo> list10 = new ArrayList<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo>();
AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo obj11 = new AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo();
list10.add(obj11);
obj11.setTransportWay(1L);
obj11.setGroup(1L);
obj11.setNonStop(1L);
obj11.setTrafficDesc("交通描述");
obj11.setArrivalTime("15:00");
obj11.setDepartureTime("13:00");
obj11.setDestination("北京");
obj11.setDeparture("杭州");
obj11.setPlaneType("中型机");
obj11.setVendor("中国国航");
obj11.setTrafficNo("CA1710");
obj11.setDay(1L);
obj11.setStopOver(true);
obj11.setStopCity("北京");
obj11.setIsNonRedEyeFlight(true);
list8.setBackTrafficInfoList(list10);
List<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo> list14 = new ArrayList<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo>();
AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo obj15 = new AlitripGrouptourProductUploadRequest.GroupTourTrafficInfo();
list14.add(obj15);
obj15.setTransportWay(1L);
obj15.setGroup(1L);
obj15.setNonStop(1L);
obj15.setTrafficDesc("交通描述");
obj15.setArrivalTime("15:00");
obj15.setDepartureTime("13:00");
obj15.setDestination("北京");
obj15.setDeparture("杭州");
obj15.setPlaneType("中型机");
obj15.setVendor("中国国航");
obj15.setTrafficNo("CA1710");
obj15.setDay(1L);
obj15.setStopOver(true);
obj15.setStopCity("北京");
obj15.setIsNonRedEyeFlight(true);
list12.setGoTrafficInfoList(list14);
obj3.setSelfExplanation("自费项目1,自费项目2");
obj3.setOrderInfo("买家预定须知1,买家预定须知2");
obj3.setFeeExclude("费用不含1,费用不含2");
obj3.setFeeInclude("费用包含1,费用包含2");
obj3.setFromLocations("北京");
obj3.setOutProductId("12345");
obj3.setPackageName("套餐1");
obj3.setPackageOperation(0L);
obj3.setTripDays(1L);
obj3.setAccomNights(0L);
req.setGroupTourPackageInfo(list2);
req.setConfirmType(1L);
req.setItemCustomTag("美食");
req.setOutProductId("1111");
req.setTripNight(1L);
req.setToLocations("东京,京都");
req.setPicUrls("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg");
req.setReserveLimit("1_18_00");
req.setItemId(12345L);
req.setRefundType(0L);
req.setSubTitles("亮点1,亮点2,亮点3");
req.setFromLocations("东京");
req.setDescHtml("PC端详情描述");
req.setTravellerTemplateId(111L);
req.setIsOverseasTour(0L);
req.setPurePlay(1L);
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.setPackageOperation(0L);
req.setGroupTourType(1L);
req.setSellerCids("12344,24332");
req.setSecondKill("wap_only");
req.setHasDiscount(false);
AlitripGrouptourProductUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripGrouptourProductUploadRequest req = new AlitripGrouptourProductUploadRequest();
req.GoTrafficType = 1L;
req.TripDay = 1L;
req.WapDesc = "<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>";
req.SubStock = 0L;
req.BackTrafficType = 1L;
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.ConfirmTime = 1L;
req.Title = "商品标题";
req.RouteType = 1L;
req.RefundRegulations = "30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90";
List<AlitripGrouptourProductUploadRequest.GroupTourPackageInfoDomain> list2 = new List<AlitripGrouptourProductUploadRequest.GroupTourPackageInfoDomain>();
AlitripGrouptourProductUploadRequest.GroupTourPackageInfoDomain obj3 = new AlitripGrouptourProductUploadRequest.GroupTourPackageInfoDomain();
list2.Add(obj3);
List<AlitripGrouptourProductUploadRequest.GroupTourTripElementDomain> list5 = new List<AlitripGrouptourProductUploadRequest.GroupTourTripElementDomain>();
AlitripGrouptourProductUploadRequest.GroupTourTripElementDomain obj6 = new AlitripGrouptourProductUploadRequest.GroupTourTripElementDomain();
list5.Add(obj6);
obj6.Day = 1L;
obj6.Type = 1L;
obj6.JsonStr = "\"type\":1, \"hotelType”:1, \"hotelStarType\":1, \"hotelStar\":\"三星级\", \"hotelCityName\":\"北京市\", \"hotelName\":\"如家快捷北京北太平庄店”, \"roomType\":\"大床房\" }";
obj3.TripElementList= list5;
List<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain> list8 = new List<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain>();
AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain obj9 = new AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain();
list8.Add(obj9);
obj9.TransportWay = 1L;
obj9.Group = 1L;
obj9.NonStop = 1L;
obj9.TrafficDesc = "交通描述";
obj9.ArrivalTime = "15:00";
obj9.DepartureTime = "13:00";
obj9.Destination = "北京";
obj9.Departure = "杭州";
obj9.PlaneType = "中型机";
obj9.Vendor = "中国国航";
obj9.TrafficNo = "CA1710";
obj9.Day = 1L;
obj9.StopOver = true;
obj9.StopCity = "北京";
obj9.IsNonRedEyeFlight = true;
obj3.BackTrafficInfoList= list8;
List<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain> list11 = new List<AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain>();
AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain obj12 = new AlitripGrouptourProductUploadRequest.GroupTourTrafficInfoDomain();
list11.Add(obj12);
obj12.TransportWay = 1L;
obj12.Group = 1L;
obj12.NonStop = 1L;
obj12.TrafficDesc = "交通描述";
obj12.ArrivalTime = "15:00";
obj12.DepartureTime = "13:00";
obj12.Destination = "北京";
obj12.Departure = "杭州";
obj12.PlaneType = "中型机";
obj12.Vendor = "中国国航";
obj12.TrafficNo = "CA1710";
obj12.Day = 1L;
obj12.StopOver = true;
obj12.StopCity = "北京";
obj12.IsNonRedEyeFlight = true;
obj3.GoTrafficInfoList= list11;
obj3.SelfExplanation = "自费项目1,自费项目2";
obj3.OrderInfo = "买家预定须知1,买家预定须知2";
obj3.FeeExclude = "费用不含1,费用不含2";
obj3.FeeInclude = "费用包含1,费用包含2";
obj3.FromLocations = "北京";
obj3.OutProductId = "12345";
obj3.PackageName = "套餐1";
obj3.PackageOperation = 0L;
obj3.TripDays = 1L;
obj3.AccomNights = 0L;
req.GroupTourPackageInfo_ = list2;
req.ConfirmType = 1L;
req.ItemCustomTag = "美食";
req.OutProductId = "1111";
req.TripNight = 1L;
req.ToLocations = "东京,京都";
req.PicUrls = "https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg";
req.ReserveLimit = "1_18_00";
req.ItemId = 12345L;
req.RefundType = 0L;
req.SubTitles = "亮点1,亮点2,亮点3";
req.FromLocations = "东京";
req.DescHtml = "PC端详情描述";
req.TravellerTemplateId = 111L;
req.IsOverseasTour = 0L;
req.PurePlay = 1L;
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.PackageOperation = 0L;
req.GroupTourType = 1L;
req.SellerCids = "12344,24332";
req.SecondKill = "wap_only";
req.HasDiscount = false;
AlitripGrouptourProductUploadResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripGrouptourProductUploadRequest;
$req->setGoTrafficType("1");
$req->setTripDay("1");
$req->setWapDesc("<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>");
$req->setSubStock("0");
$req->setBackTrafficType("1");
$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->setConfirmTime("1");
$req->setTitle("商品标题");
$req->setRouteType("1");
$req->setRefundRegulations("30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90");
$group_tour_package_info = new GroupTourPackageInfo;
$trip_element_list = new GroupTourTripElement;
$trip_element_list->day="1";
$trip_element_list->type="1";
$trip_element_list->json_str="\"type\":1, \"hotelType”:1, \"hotelStarType\":1, \"hotelStar\":\"三星级\", \"hotelCityName\":\"北京市\", \"hotelName\":\"如家快捷北京北太平庄店”, \"roomType\":\"大床房\" }";
$group_tour_package_info->trip_element_list = $trip_element_list;
$back_traffic_info_list = new GroupTourTrafficInfo;
$back_traffic_info_list->transport_way="1";
$back_traffic_info_list->group="1";
$back_traffic_info_list->non_stop="1";
$back_traffic_info_list->traffic_desc="交通描述";
$back_traffic_info_list->arrival_time="15:00";
$back_traffic_info_list->departure_time="13:00";
$back_traffic_info_list->destination="北京";
$back_traffic_info_list->departure="杭州";
$back_traffic_info_list->plane_type="中型机";
$back_traffic_info_list->vendor="中国国航";
$back_traffic_info_list->traffic_no="CA1710";
$back_traffic_info_list->day="1";
$back_traffic_info_list->stop_over="true";
$back_traffic_info_list->stop_city="北京";
$back_traffic_info_list->is_non_red_eye_flight="true";
$group_tour_package_info->back_traffic_info_list = $back_traffic_info_list;
$go_traffic_info_list = new GroupTourTrafficInfo;
$go_traffic_info_list->transport_way="1";
$go_traffic_info_list->group="1";
$go_traffic_info_list->non_stop="1";
$go_traffic_info_list->traffic_desc="交通描述";
$go_traffic_info_list->arrival_time="15:00";
$go_traffic_info_list->departure_time="13:00";
$go_traffic_info_list->destination="北京";
$go_traffic_info_list->departure="杭州";
$go_traffic_info_list->plane_type="中型机";
$go_traffic_info_list->vendor="中国国航";
$go_traffic_info_list->traffic_no="CA1710";
$go_traffic_info_list->day="1";
$go_traffic_info_list->stop_over="true";
$go_traffic_info_list->stop_city="北京";
$go_traffic_info_list->is_non_red_eye_flight="true";
$group_tour_package_info->go_traffic_info_list = $go_traffic_info_list;
$group_tour_package_info->self_explanation="自费项目1,自费项目2";
$group_tour_package_info->order_info="买家预定须知1,买家预定须知2";
$group_tour_package_info->fee_exclude="费用不含1,费用不含2";
$group_tour_package_info->fee_include="费用包含1,费用包含2";
$group_tour_package_info->from_locations="北京";
$group_tour_package_info->out_product_id="12345";
$group_tour_package_info->package_name="套餐1";
$group_tour_package_info->package_operation="0";
$group_tour_package_info->trip_days="1";
$group_tour_package_info->accom_nights="0";
$req->setGroupTourPackageInfo(json_encode($group_tour_package_info));
$req->setConfirmType("1");
$req->setItemCustomTag("美食");
$req->setOutProductId("1111");
$req->setTripNight("1");
$req->setToLocations("东京,京都");
$req->setPicUrls("https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg");
$req->setReserveLimit("1_18_00");
$req->setItemId("12345");
$req->setRefundType("0");
$req->setSubTitles("亮点1,亮点2,亮点3");
$req->setFromLocations("东京");
$req->setDescHtml("PC端详情描述");
$req->setTravellerTemplateId("111");
$req->setIsOverseasTour("0");
$req->setPurePlay("1");
$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->setPackageOperation("0");
$req->setGroupTourType("1");
$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.grouptour.product.upload' \
-d 'partner_id=apidoc' \
-d 'session=9cbeb543-70de-45d0-8360-13561be7f28d' \
-d 'sign=012E60DE6687F9587AE6E48269AE2676' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A25%3A01' \
-d 'v=2.0' \
-d 'back_traffic_type=1' \
-d 'confirm_time=1' \
-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 'from_locations=%E4%B8%9C%E4%BA%AC' \
-d 'go_traffic_type=1' \
-d 'group_tour_package_info=null' \
-d 'group_tour_type=1' \
-d 'has_discount=false' \
-d 'is_overseas_tour=0' \
-d 'item_custom_tag=%E7%BE%8E%E9%A3%9F' \
-d 'item_id=12345' \
-d 'out_product_id=1111' \
-d 'package_operation=0' \
-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 'pure_play=1' \
-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 'route_type=1' \
-d 'second_kill=wap_only' \
-d 'seller_cids=12344%2C24332' \
-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 'traveller_template_id=111' \
-d 'trip_day=1' \
-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.AlitripGrouptourProductUploadRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.go_traffic_type=1
req.trip_day=1
req.wap_desc="<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>"
req.sub_stock=0
req.back_traffic_type=1
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.confirm_time=1
req.title="商品标题"
req.route_type=1
req.refund_regulations="30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90"
req.group_tour_package_info=""
req.confirm_type=1
req.item_custom_tag="美食"
req.out_product_id="1111"
req.trip_night=1
req.to_locations="东京,京都"
req.pic_urls="https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg"
req.reserve_limit="1_18_00"
req.item_id=12345
req.refund_type=0
req.sub_titles="亮点1,亮点2,亮点3"
req.from_locations="东京"
req.desc_html="PC端详情描述"
req.traveller_template_id=111
req.is_overseas_tour=0
req.pure_play=1
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.package_operation=0
req.group_tour_type=1
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.grouptour.product.upload");
add_param(pRequest,"go_traffic_type","1");
add_param(pRequest,"trip_day","1");
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,"sub_stock","0");
add_param(pRequest,"back_traffic_type","1");
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,"confirm_time","1");
add_param(pRequest,"title","商品标题");
add_param(pRequest,"route_type","1");
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,"group_tour_package_info","数据结构JSON示例");
add_param(pRequest,"confirm_type","1");
add_param(pRequest,"item_custom_tag","美食");
add_param(pRequest,"out_product_id","1111");
add_param(pRequest,"trip_night","1");
add_param(pRequest,"to_locations","东京,京都");
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,"reserve_limit","1_18_00");
add_param(pRequest,"item_id","12345");
add_param(pRequest,"refund_type","0");
add_param(pRequest,"sub_titles","亮点1,亮点2,亮点3");
add_param(pRequest,"from_locations","东京");
add_param(pRequest,"desc_html","PC端详情描述");
add_param(pRequest,"traveller_template_id","111");
add_param(pRequest,"is_overseas_tour","0");
add_param(pRequest,"pure_play","1");
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,"package_operation","0");
add_param(pRequest,"group_tour_type","1");
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.grouptour.product.upload', {
'go_traffic_type':'1',
'trip_day':'1',
'wap_desc':'<wapDesc><shortDesc>标题1</shortDesc> <txt>描述1</txt> <img>图片路径1</img> <shortDesc>标题2</shortDesc> <txt>描述2</txt> <img>图片路径2</img> </wapDesc>',
'sub_stock':'0',
'back_traffic_type':'1',
'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>',
'confirm_time':'1',
'title':'商品标题',
'route_type':'1',
'refund_regulations':'30_30_0,30_15_5,14_7_15,6_4_70,3_1_85,1_1_90',
'group_tour_package_info':'数据结构JSON示例',
'confirm_type':'1',
'item_custom_tag':'美食',
'out_product_id':'1111',
'trip_night':'1',
'to_locations':'东京,京都',
'pic_urls':'https://img.daily.taobaocdn.net/imgextra/i3/2024098454/TB2C4VXXXXXXXc1XXXXXXXXXXXX_!!2024098454.jpg,http://ww1.sinaimg.cn/large/005EDdjYgw1fanv4d823dj31gs0z6qb8.jpg',
'reserve_limit':'1_18_00',
'item_id':'12345',
'refund_type':'0',
'sub_titles':'亮点1,亮点2,亮点3',
'from_locations':'东京',
'desc_html':'PC端详情描述',
'traveller_template_id':'111',
'is_overseas_tour':'0',
'pure_play':'1',
'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}',
'package_operation':'0',
'group_tour_type':'1',
'seller_cids':'12344,24332',
'second_kill':'wap_only',
'has_discount':'false'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})