新增/更新营销活动,更新为全量更新,商家需把活动信息全量再传一次。
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
create_promotion_param | CreatePromotionParam | 必须 | 促销活动对象 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | ResultSet | 营销活动创建结果 | |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); XhotelPromotionCreateRequest req = new XhotelPromotionCreateRequest(); XhotelPromotionCreateRequest.CreatePromotionParam obj1 = new XhotelPromotionCreateRequest.CreatePromotionParam(); obj1.setPromotionRuleId(12345L); List<XhotelPromotionCreateRequest.PromotionRule> list3 = new ArrayList<XhotelPromotionCreateRequest.PromotionRule>(); XhotelPromotionCreateRequest.PromotionRule obj4 = new XhotelPromotionCreateRequest.PromotionRule(); list3.add(obj4); obj4.setLengthOfStay(3L); XhotelPromotionCreateRequest.DateRange obj6 = new XhotelPromotionCreateRequest.DateRange(); obj6.setStart( "2024-06-11" ); obj6.setEnd( "2024-06-12" ); list5.setBookDate(obj6); obj4.setStayWeekdays( "1,0,1,1,1,0,1" ); obj4.setMinAdvanceDay(1L); XhotelPromotionCreateRequest.TimeRange obj8 = new XhotelPromotionCreateRequest.TimeRange(); obj8.setStartTime( "14:00:00" ); obj8.setEndTime( "16:00:00" ); list7.setBookTime(obj8); List<XhotelPromotionCreateRequest.DateRange> list11 = new ArrayList<XhotelPromotionCreateRequest.DateRange>(); XhotelPromotionCreateRequest.DateRange obj12 = new XhotelPromotionCreateRequest.DateRange(); list11.add(obj12); obj12.setStart( "2024-06-01" ); obj12.setEnd( "2024-06-02" ); list9.setUnStayDate(list11); obj4.setDiscountValue(20L); XhotelPromotionCreateRequest.DateRange obj14 = new XhotelPromotionCreateRequest.DateRange(); obj14.setStart( "2024-06-01" ); obj14.setEnd( "2024-06-02" ); list13.setStayDate(obj14); obj1.setPromotionRules(list3); obj1.setDiscountType(1L); obj1.setPromotionCode( "4151" ); req.setCreatePromotionParam(obj1); XhotelPromotionCreateResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 | < xhotel_promotion_create_response > < result > < promotion_rule_id >12345</ promotion_rule_id > < error_code >isv.invalid-parameter:NOTNULL</ error_code > < error_msg >参数不能为空</ error_msg > < success >true</ success > < trace_id >122334232</ trace_id > </ result > </ xhotel_promotion_create_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|