上传商品图片到商品管理后台

接口调用基本参数 参数
协议 https
http请求方式 POST
请求URL https://api.weixin.qq.com/mall/uploaditemimage?access_token=ACCESS_TOKEN
POST数据格式/上传文件的表单格式 multipart/form-data;charset=utf-8;boundary=xxxxxxxxxxxxxxx

请求数据样例

POST /mall/uploaditemimage HTTP/1.1
Host: api.weixin.qq.com
Cache-Control: no-cache
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="access_token"
8_OEXnN9I4sNoKtC2oJZ5eedkKzOsmtoNVg6Ceuq4ifbiJQsdQggSkFOS
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="filePath"; filename="gxg.jpg"
Content-Type: image/jpeg
----WebKitFormBoundaryE19zNvXGzXaLvS5C
数据类型 请求字段 必填 说明
string item_codes 商品编码

回包数据样例

{
  "errcode":0,
  "errmsg":"",
  "image_url":"https://shp.qpic.cn/wechat_bs/0/025dd259cedc334d12f3fb61291b34d4"
}
字段类型 返回字段 说明
uint32 errcode 错误码
string errmsg 错误信息
string image_url 上传后的图片URL