文档中心 > API类目 > 五道口API

alibaba.wdk.merchantproduct.edit (商家产品服务-编辑产品)

商家产品服务-编辑产品

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
req MerchantProductRequest 可选 产品编辑入参
  • └ transport_weight
  • String
  • 可选
  • 12
  • 运输: 重量,单位: (g)
  • └ expiration_days
  • Number
  • 可选
  • 2
  • 保质期(天)
  • └ title
  • String
  • 可选
  • xx产品
  • 标题
  • └ rt_category_id
  • Number
  • 可选
  • 23412
  • 商家类目ID
  • └ tax_invoice
  • String
  • 可选
  • 12
  • 税率
  • └ inventory_unit
  • String
  • 可选
  • 库存单位
  • └ price
  • String
  • 可选
  • 23.21
  • 价格,小数点2位
  • └ transport_height
  • String
  • 可选
  • 340
  • 运输: 高度(mm)
  • └ barcodes
  • String []
  • 可选
  • ["123","456"]
  • 商品条码
  • └ package_num
  • Number
  • 可选
  • 23
  • 箱规数/包装数
  • └ height
  • String
  • 可选
  • 3400
  • 销售: 高度(mm)
  • cat_props
  • CatProps []
  • 可选
  • 类目属性信息
  • └ property_id
  • Number
  • 可选
  • 111
  • 类目属性ID
  • └ property_text
  • String
  • 可选
  • 尺码
  • 类目属性名称
  • └ value_id
  • Number
  • 可选
  • 2222
  • 类目值ID
  • └ value_text
  • String
  • 可选
  • XXL
  • 类目值名称
  • └ length
  • String
  • 可选
  • 332
  • 销售: 长度(mm)
  • └ specification
  • String
  • 可选
  • xxx
  • 规格
  • └ weight
  • String
  • 可选
  • 320
  • 销售: 重量(g)
  • └ step_quantity
  • Number
  • 可选
  • 10
  • APP购买步长
  • └ transport_width
  • String
  • 可选
  • 3000
  • 运输: 宽度(mm)
  • └ market_categories
  • String
  • 可选
  • {"df3t2", 123}
  • 铺货渠道类目(key: 渠道编码, value: 渠道类目)
  • └ transport_length
  • String
  • 可选
  • 230
  • 运输: 长度(mm)
  • └ volume
  • String
  • 可选
  • 3200
  • 销售: 体积(cm^3)
  • └ standard_category_id
  • Number
  • 可选
  • 32999463
  • 阿里标准叶子类目
  • └ purchase_quantity
  • Number
  • 可选
  • 1
  • 最小起订量
  • └ width
  • String
  • 可选
  • 1000
  • 销售: 宽度(mm)
  • └ rt_item_code
  • Number
  • 必须
  • 2342234
  • RT商品ID
  • └ avg_weight
  • String
  • 可选
  • 23.43
  • 均重
  • └ is_shelflife
  • Boolean
  • 可选
  • true
  • 效期方式(true:有效期,false:无效期)
  • └ yx_category_id
  • String
  • 可选
  • 234222
  • 优鲜类目ID
  • └ is_weight
  • Boolean
  • 可选
  • false
  • 是否称重
  • └ rt_category_name_path
  • String
  • 可选
  • 111>222>333
  • 商家类目名路径
  • └ transport_volume
  • String
  • 可选
  • 23344
  • 运输: 体积,单位: (cm^3)
  • └ yx_category_name_path
  • String
  • 可选
  • 555>333>222
  • 优鲜类目名路径

响应参数

名称 类型 示例值 描述
result ApiResult 产品编辑返回结果
  • └ success
  • Boolean
  • 请求是否成功
  • └ err_code
  • String
  • 错误码
  • └ err_msg
  • String
  • 错误信息
  • model
  • MerchantProductResponse
  • 返回结果
  • └ sc_ids
  • Number []
  • 货品id
  • └ item_id
  • Number
  • ["123","456"]

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaWdkMerchantproductEditRequest req = new AlibabaWdkMerchantproductEditRequest();
AlibabaWdkMerchantproductEditRequest.MerchantProductRequest obj1 = new AlibabaWdkMerchantproductEditRequest.MerchantProductRequest();
obj1.setTransportWeight("12");
obj1.setExpirationDays(2L);
obj1.setTitle("xx产品");
obj1.setRtCategoryId(23412L);
obj1.setTaxInvoice("12");
obj1.setInventoryUnit("个");
obj1.setPrice("23.21");
obj1.setTransportHeight("340");
obj1.setBarcodes(""123","456"");
obj1.setPackageNum(23L);
obj1.setHeight("3400");
List<AlibabaWdkMerchantproductEditRequest.CatProps> list3 = new ArrayList<AlibabaWdkMerchantproductEditRequest.CatProps>();
AlibabaWdkMerchantproductEditRequest.CatProps obj4 = new AlibabaWdkMerchantproductEditRequest.CatProps();
list3.add(obj4);
obj4.setPropertyId(111L);
obj4.setPropertyText("尺码");
obj4.setValueId(2222L);
obj4.setValueText("XXL");
obj1.setCatProps(list3);
obj1.setLength("332");
obj1.setSpecification("xxx");
obj1.setWeight("320");
obj1.setStepQuantity(10L);
obj1.setTransportWidth("3000");
obj1.setMarketCategories("{\"df3t2\", 123}");
obj1.setTransportLength("230");
obj1.setVolume("3200");
obj1.setStandardCategoryId(32999463L);
obj1.setPurchaseQuantity(1L);
obj1.setWidth("1000");
obj1.setRtItemCode(2342234L);
obj1.setAvgWeight("23.43");
obj1.setIsShelflife(true);
obj1.setYxCategoryId("234222");
obj1.setIsWeight(false);
obj1.setRtCategoryNamePath("111>222>333");
obj1.setTransportVolume("23344");
obj1.setYxCategoryNamePath("555>333>222");
req.setReq(obj1);
AlibabaWdkMerchantproductEditResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_wdk_merchantproduct_edit_response>
    <result>
        <success></success>
        <err_code></err_code>
        <err_msg></err_msg>
        <model>
            <sc_ids>
                <number></number>
            </sc_ids>
            <item_id></item_id>
        </model>
    </result>
</alibaba_wdk_merchantproduct_edit_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部