文档中心

获取微盟云简介、应用与模板相关的开发指南、最佳实践、常见问题库以及相关工具资源等,快速对接微盟云开放能力,轻松接入微盟云开放生态。

能力中心

了解微盟开放能力,应用深度融合提升用户体验

注册
微商城 > 商品API > 商品 > ec/goods/addGoods
添加商品
ec/goods/addGoods
最近修改时间:2024-01-17 11:03:27
接口描述

1、统一规格商品使用此接口,规格和参数字段可不传。

2、智慧零售添加商品时,传入单品条码需注意:当singleProductCode与商家后台已有单品条码重复时,库存及成本价均按已有单品。(例:已有单品库存为5,新增商品传入10库存,单品条码相同,则新商品库存为5)

3、API暂不支持添加虚拟商品(付费券)

接口信息
协议
请求方式
请求地址
https
POST
https://dopen.weimob.com/api/1_0/ec/goods/addGoods?accesstoken=ACCESS_TOKEN
请求参数
参数
是否必填
类型
示例
描述
暂无数据
响应参数
参数
类型
示例
描述
暂无数据
接口示例
请求示例
json
点击复制
{
    "goods":{
        "b2cGoods":{
            "freightTemplateId":914301,
            "deliveryTypeIdList":[
                111794,
                111748
            ],
            "b2cGoodsType":0
        },
        "categoryId":28,
        "title":"双肩背包",
        "outerGoodsCode":"ABC001",
        "isMultiSku":1,
        "goodsTagId":98309901,
        "goodsDesc":"

商品文描

", "initialSales":"10", "deductStockType":1, "isPutAway":0, "startPutAwayTime":null, "skuList": [{ "outerSkuCode": "023-3602702B", "salePrice": "135.00", "editStockNum": "0", "b2cSku": { "weight": "0", "volume": "0" }, "skuAttrMap": { "240547181": { "key": "1286820181", }, "226420181": { "key": "1210459181", } } }, { "outerSkuCode": "023-3602702C", "salePrice": "135.00", "editStockNum": "0", "b2cSku": { "weight": "0", "volume": "0" }, "skuAttrMap": { "240547181": { "key": "1286820181", }, "226420181": { "key": "1210461181", } } },{ "outerSkuCode": "023-3602711B", "salePrice": "135.00", "editStockNum": "0", "b2cSku": { "weight": "0", "volume": "0" }, "skuAttrMap": { "240547181": { "key": "1286823181", }, "226420181": { "key": "1210459181", } } }, { "outerSkuCode": "023-3602711C", "salePrice": "135.00", "editStockNum": "0", "b2cSku": { "weight": "0", "volume": "0" }, "skuAttrMap": { "240547181": { "key": "1286823181", }, "226420181": { "key": "1210461181", } } }], "selectedSaleAttrList": [{ "attrValueList": [{ "key": "1286820181" }, { "key": "1286823181" }], "attributeId": "240547181" }, { "attrValueList": [{ "key": "1210459181" }, { "key": "1210461181" }], "attributeId": "226420181" }], "goodsVideoUrl":null, "goodsVideoImageUrl":null, "sellModelType":1, "selectedGoodsPropList":[ { "id":522201, "propValList":[ { "id":1288401, "propId":522201, "propValue":"小" } ], "sort":10, "supportModule":[ 1, 2 ], "title":"打发打发" }, { "id":14201, "propValList":[ { "id":30001, "propId":14201, "propValue":"4" } ], "sort":8, "supportModule":[ 1, 2 ], "title":"属性" } ], "selectedInnerGoodsPropList":[ { "id":713101, "propValList":[ { "id":1857101, "propId":713101, "propValue":"欧美" } ], "sort":0, "supportModule":[ ], "title":"风格" }, { "id":713201, "propValList":[ { "id":1857601, "propId":713201, "propValue":"红色" } ], "sort":0, "supportModule":[ ], "title":"颜色" } ], "selectedGoodsAttrList":[ { "attrValueList":[ { "imageUrl":null, "isCustomDefined":1, "key":10605101, "value":"山西" } ], "attrValueMap":null, "attributeId":2000, "goodsSelectedAttrValue":null, "isCustomDefined":0, "isMulti":null, "isRequired":null, "name":"产地" } ], "selectedGoodsRightsList":[ { "goodsRightsValueList":[ { "goodsRightsId":100601, "goodsRightsValue":"24", "id":102701 } ], "id":100601, "title":"汪下川" }, { "goodsRightsValueList":[ { "goodsRightsId":103001, "goodsRightsValue":"0301", "id":107001 } ], "id":103001, "title":"第三个" } ], "goodsImageUrl":[ "https://image-c.weimobwmc.com/saas-wxbiz/0cd3a50f48f64377b83e3d0071ebad5c.jpg" ], "selectedClassifyIdList":[ 980811201 ], "brandId":1234566778, "goodsCertificateUrl": [ "https://image-c.weimobwmc.com/saas-wxbiz/0cd3a50f48f64377b83e3d0071ebad5c.jpg" ] } }
响应示例
json
点击复制
{
  "goodsId": 70255970101,
  "outerSkuCode": "3456726",
  "skuId": 1420940122
}
Copyright © 2011-2021 www.weimobcloud.com. All Rights Reserved 上海微盟企业发展有限公司版权所有
立即扫码咨询
公众号在线客服