微商城 > 商品API > 商品 > ec/goods/updateGoods
更新商品
ec/goods/updateGoods
最近修改时间:2023-09-05 10:55:47
接口描述
1. 使用该接口更新商品时,如果非必填字段未传入则在更新时将会被抹掉或变为默认值。*另外,库存字段为增量更新。
2. 该接口暂不支持更新虚拟商品(付费券)。
3. 该接口支持商城库存的更新,不支持零售库存的更新,如果零售调用此接口那库存可为0,不会对库存做处理。
4. 该接口不支持更新预售商品信息。
接口信息
协议 | 请求方式 | 请求地址 |
---|---|---|
https | POST | https://dopen.weimob.com/api/1_0/ec/goods/updateGoods?accesstoken=ACCESS_TOKEN |
请求参数
参数 | 是否必填 | 类型 | 示例 | 描述 |
---|---|---|---|---|
暂无数据 |
响应参数
参数 | 类型 | 示例 | 描述 |
---|---|---|---|
暂无数据 |
接口示例
请求示例
json
点击复制
{ "goods": { "b2cGoods": { "freightTemplateId": 914301, "deliveryTypeIdList": [ 56, 111794, 111748 ], "b2cGoodsType": 0 }, "categoryId": 28, "title": "双肩背包2", "outerGoodsCode": "spu code", "isMultiSku": 1, "goodsTagId": 98309901, "goodsDesc": "<p>商品文描</p>", "initialSales": 10, "deductStockType": 1, "isPutAway": 0, "skuList": [ { "b2cSku": { "volume": 0, "weight": 0 }, "costPrice": "99", "imageUrl": "", "originalPrice": "110", "outerSkuCode": "merchant code", "salePrice": 100, "skuAttrMap": { "3000": { "key": 608809101 }, "13640101": { "key": 34565101 } }, "skuId": 256331800101, "editStockNum": "1" }, { "b2cSku": { "volume": 0, "weight": 0 }, "costPrice": "99", "imageUrl": "", "originalPrice": "110", "outerSkuCode": "merchant code", "salePrice": 100, "skuAttrMap": { "4000": { "key": 608809201 }, "13640201": { "key": 34565201 } }, "skuId": 256331800201, "editStockNum": "1" } ], "selectedSaleAttrList": [ { "attrValueList": [ { "key": 608809101 } ], "attributeId": 3000 }, { "attrValueList": [ { "key": 34565101 }, { "key": 1245804101 } ], "attributeId": 13640101 } ], "goodsVideoUrl": "https://c.weimobwmc.com/saas-wxbiz/e3831cfb48e240ec9b3995b87ce6877d.mp4", "goodsVideoImageUrl": "https://image-c.weimobwmc.com/saas-wxbiz/1de2bbddaf0f4c34a865efb031e04b4e.jpg", "sellModelType": 1, "selectedGoodsPropList": [ { "id": 522201, "propValList": [ { "id": 1288401 } ] }, { "id": 14201, "propValList": [ { "id": 30001 } ] } ], "selectedInnerGoodsPropList": [ { "id": 713101, "propValList": [ { "id": 1857101 } ] }, { "id": 713201, "propValList": [ { "id": 1857601 } ] } ], "selectedGoodsAttrList": [ { "attrValueList": [ { "key": 10605101 } ], "attributeId": 2000 } ], "selectedGoodsRightsList": [ { "goodsRightsValueList": [ { "id": 102701 } ], "id": 100601 } ], "goodsImageUrl": [ "https://image-c.weimobwmc.com/saas-wxbiz/0cd3a50f48f64377b83e3d0071ebad5c.jpg" ], "selectedClassifyIdList": [ 980811201 ], "goodsId": "69050320101", "sort": "0", "brandId": 9802241201, "cityFreightTemplateId": 98034341201, "goodsCertificateUrl": [ "https://image-c.weimobwmc.com/saas-wxbiz/0cd3a50f48f64377b83e3d0071ebad5c.jpg" ], "goodsLimitVo": { "goodsLimitNum": 1, "goodsLimitCycle": 1 }, "goodsLimitSwitch": 1 } }
响应示例
json
点击复制
{ "code": { "errcode": "0", "errmsg": "处理成功" }, "data": { "result": true, "skuList": [ { "outerSkuCode": "merchant code", "skuId": 256331810101 }, { "outerSkuCode": "merchant code", "skuId": 256331800101 } ] } }
文章是否对你有帮助?
- 有帮助
- 去吐槽