除度假线路、门票以外的商品维护接口;目前该接口支持以下类目; (123740001:客栈周边交通服务、125038002:旅行设备/GPS/相机租赁、50018298:船票、124084006:酒店商品升级差价、125228016:预约卡券、50011954:旅游服务、50012913:酒店优惠券、50214003:旅游会员卡/酒店会员卡、50012917:巴士/地铁/交通卡/一卡通、50134002:代客烧香/还愿、50026091:境外火车票、123742001:客栈周边餐饮服务、50019817:海外套餐(该类目已废弃)、125210016:团建/outing、124212017:其他预定、50025888:机场行李托运取送寄存、50025831:旅游年票/年卡、124142009:旅游商品升级差价/押金、123744001:客栈周边其他服务、50012762:广深口岸港澳送关服务、50025880:旅行拍照/婚纱摄影、123166001:酒店餐饮美食(该类目已废弃)、50668002:手绘地图/明信片、50024210:旅游购物/纪念品、50024208:酒店用品、50024215:购物折扣卡券、50025878:酒店SPA/足浴/温泉、50024212:旅游必备品、123738001:客栈周边票务服务、123164002:游泳健身(该类目已废弃)、50686003:机票增值产品、123164001:酒店SPA(该类目已废弃)、124832008:美食卡券/酒店餐饮卡券、125408001:旅游定制服务、50018112:旅行社/网站优惠券、124258004:酒店客房优惠券(该类目已废弃)、50104001:机场周边停车位、124730002:内机机场/火车站送关服务、124090010:其他)
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
base_info | BaseInfo | 可选 | 必填,商品基本信息 | ||
|
|||||
booking_rules | BookingRuleInfo [] | 必须 |
|
必填,预定规则结构。示例: [{ "rule_type": "fee_excluded", "rule_desc": "费用包含描述"},{ "rule_type": "fee_included", "rule_desc": "费用不含描述"},{ "rule_type": "order_info", "rule_desc": "预定须知描述"}] | |
|
|||||
date_sku_info_list | DateSkuInfo [] | 可选 |
|
更新sku信息,仅限日历商品使用 | |
|
|||||
item_ele_cert_info | ItemEleCertInfo | 可选 | 新版电子凭证信息。如果传递了此参数,则sales_info中旧版电子凭证信息将被忽略,否则电子凭证信息将以旧版电子凭证参数为准。如果新、旧版参数都没传,则该商品不支持电子凭证 | ||
|
|||||
item_refund_info | ItemRefundInfo | 可选 | 选填,退款规则结构 | ||
|
|||||
common_sku_list | NoDateSkuInfo [] | 可选 |
|
更新sku信息,仅限非日历(普通)商品使用 | |
|
|||||
poi | Poi | 可选 | poi信息,个别类目必填,如演艺类目下场馆信息 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
travel_item | TopTravelItem | 11 | 商品发布结果 |
|
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlitripTravelGereralitemUpdateRequest req = new AlitripTravelGereralitemUpdateRequest(); AlitripTravelGereralitemUpdateRequest.BaseInfo obj1 = new AlitripTravelGereralitemUpdateRequest.BaseInfo(); obj1.setApproveStatus(1L); obj1.setCategoryId(1111L); obj1.setCity("杭州"); obj1.setDesc("我家的货很好很好很好"); obj1.setExtsMap("{\"showStart\":\"2017-10-16\",\"showEnd\":\"2017-10-20\"}"); obj1.setHasDiscount(false); obj1.setHasShowcase(false); obj1.setItemId(112111L); obj1.setLabel("演艺"); obj1.setOnlineTime(StringUtils.parseDateTime("2000-01-01 00:00:00")); obj1.setOutId("11111"); obj1.setPicUrls("https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg,https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg"); List<AlitripTravelGereralitemUpdateRequest.CatPropInfo> list3 = new ArrayList<AlitripTravelGereralitemUpdateRequest.CatPropInfo>(); AlitripTravelGereralitemUpdateRequest.CatPropInfo obj4 = new AlitripTravelGereralitemUpdateRequest.CatPropInfo(); list3.add(obj4); obj4.setPid("111"); obj4.setVid("222"); obj1.setProps(list3); obj1.setProv("浙江"); obj1.setSecondKill("wap_only"); obj1.setSellerCids(""12344","24332""); obj1.setSubStock(1L); obj1.setSubTitles("亮点1,亮点2"); obj1.setTitle("xxxx"); obj1.setWapDesc("<wapDesc><shortDesc>标题</shortDesc> <txt>描述</txt><img>图片路径</img></wapDesc>"); obj1.setFromLocations("杭州"); obj1.setToLocations("上海"); obj1.setConfirmType(1L); obj1.setConfirmTime(1L); obj1.setDuration(0L); obj1.setReserveDeadlineHours(1L); obj1.setReserveDeadlineMinutes(30L); req.setBaseInfo(obj1); List<AlitripTravelGereralitemUpdateRequest.BookingRuleInfo> list6 = new ArrayList<AlitripTravelGereralitemUpdateRequest.BookingRuleInfo>(); AlitripTravelGereralitemUpdateRequest.BookingRuleInfo obj7 = new AlitripTravelGereralitemUpdateRequest.BookingRuleInfo(); list6.add(obj7); obj7.setRuleDesc("xxxx"); obj7.setRuleType("fee_included"); req.setBookingRules(list6); List<AlitripTravelGereralitemUpdateRequest.DateSkuInfo> list9 = new ArrayList<AlitripTravelGereralitemUpdateRequest.DateSkuInfo>(); AlitripTravelGereralitemUpdateRequest.DateSkuInfo obj10 = new AlitripTravelGereralitemUpdateRequest.DateSkuInfo(); list9.add(obj10); List<AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo> list13 = new ArrayList<AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo>(); AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo obj14 = new AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo(); list13.add(obj14); obj14.setProperties("20000:33564"); obj14.setValue("香港直飞 四星泳池"); list11.setAlias(list13); List<AlitripTravelGereralitemUpdateRequest.DateInventoryAndPrice> list17 = new ArrayList<AlitripTravelGereralitemUpdateRequest.DateInventoryAndPrice>(); AlitripTravelGereralitemUpdateRequest.DateInventoryAndPrice obj18 = new AlitripTravelGereralitemUpdateRequest.DateInventoryAndPrice(); list17.add(obj18); obj18.setDate(StringUtils.parseDateTime("2015-09-19 09:42:12")); obj18.setPrice(1000L); obj18.setStock(1000L); list15.setDateList(list17); obj10.setOuterId("1111"); List<AlitripTravelGereralitemUpdateRequest.CatPropInfo> list21 = new ArrayList<AlitripTravelGereralitemUpdateRequest.CatPropInfo>(); AlitripTravelGereralitemUpdateRequest.CatPropInfo obj22 = new AlitripTravelGereralitemUpdateRequest.CatPropInfo(); list21.add(obj22); obj22.setPid("111"); obj22.setVid("222"); list19.setProperties(list21); req.setDateSkuInfoList(list9); AlitripTravelGereralitemUpdateRequest.ItemEleCertInfo obj23 = new AlitripTravelGereralitemUpdateRequest.ItemEleCertInfo(); obj23.setAutoRefundRate(100L); obj23.setExpiredRefundRate(100L); obj23.setExpiryDateEnd(StringUtils.parseDateTime("2018-01-01 00:00:00")); obj23.setExpiryDateStart(StringUtils.parseDateTime("2017-01-01 00:00:00")); obj23.setExpiryDateType(1L); obj23.setExpiryDays(5L); obj23.setPackageId(20182296L); req.setItemEleCertInfo(obj23); AlitripTravelGereralitemUpdateRequest.ItemRefundInfo obj24 = new AlitripTravelGereralitemUpdateRequest.ItemRefundInfo(); obj24.setRefundRegulations(""30_30_0","30_15_5","14_7_15","6_4_70","3_1_85","1_1_90""); obj24.setRefundType(0L); req.setItemRefundInfo(obj24); List<AlitripTravelGereralitemUpdateRequest.NoDateSkuInfo> list26 = new ArrayList<AlitripTravelGereralitemUpdateRequest.NoDateSkuInfo>(); AlitripTravelGereralitemUpdateRequest.NoDateSkuInfo obj27 = new AlitripTravelGereralitemUpdateRequest.NoDateSkuInfo(); list26.add(obj27); List<AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo> list30 = new ArrayList<AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo>(); AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo obj31 = new AlitripTravelGereralitemUpdateRequest.PropertyAliasInfo(); list30.add(obj31); obj31.setProperties("20000:33564"); obj31.setValue("香港直飞 四星泳池"); list28.setAlias(list30); obj27.setOuterId("1111"); obj27.setPrice(1000L); List<AlitripTravelGereralitemUpdateRequest.CatPropInfo> list34 = new ArrayList<AlitripTravelGereralitemUpdateRequest.CatPropInfo>(); AlitripTravelGereralitemUpdateRequest.CatPropInfo obj35 = new AlitripTravelGereralitemUpdateRequest.CatPropInfo(); list34.add(obj35); obj35.setPid("111"); obj35.setVid("222"); list32.setProperties(list34); obj27.setQuantity(1000L); req.setCommonSkuList(list26); AlitripTravelGereralitemUpdateRequest.Poi obj36 = new AlitripTravelGereralitemUpdateRequest.Poi(); obj36.setId(1L); obj36.setName("黄龙体育场馆"); req.setPoi(obj36); AlitripTravelGereralitemUpdateResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody());
<alitrip_travel_gereralitem_update_response> <travel_item> <created>2015-9-07 22:56:18</created> <item_id>123</item_id> <modified>2015-09-07 22:56:18</modified> </travel_item> </alitrip_travel_gereralitem_update_response>
<error_response> <code>50</code> <msg>Remote service error</msg> <sub_code>isv.invalid-parameter</sub_code> <sub_msg>非法参数</sub_msg> </error_response>
错误码 | 错误描述 | 解决方案 |
---|---|---|
isv.PARAM_ERROR | 参数错误 | 根据错误提示修改 |