文档中心

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

能力中心

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

注册
微商城 > 商品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
      }
    ]
  }
}
Copyright © 2011-2021 www.weimobcloud.com. All Rights Reserved 上海微盟企业发展有限公司版权所有
立即扫码咨询
公众号在线客服