imageUpload (上传商品图片)


接口信息

协议 请求方式 请求地址
HTTPS POST https://open.mengdian.com/api/mname/WE_MALL/cname/imageUpload?accesstoken=ACCESS_TOKEN

请求参数

请求示例

{
  "spu_code": "358000201406300511295889",
  "is_main_img": true,
  "img_name": "1406271044574778.jpg",
  "img_data": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAACAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD2yiiiv89z/Rw//9k="
}

响应参数

响应示例

{
  "img_url": "http://hs-net-shop-img.oss-cn-hangzhou.aliyuncs.com/395834/Goods/1406271044574778.jpg"
}

全局返回码

返回码 描述 解决方案
-1 系统繁忙
0 请求成功
8000001 获取access_token失败,不经常发生
8000002 目标地址不合法
8000003 非法的参数
8000004 非法的参数格式
8000005 需要以get方式请求
8000006 需要以post方式请求
8000007 需要https请求
8000008 Xml/Json格式解析错误
8000101 不可用的accessToken
8000102 未被授权的API
8000103 超过了API调用次数
8000104 指定mname和cname没有对应的API
8000105 accessToken过期
8000106 转发超时
8000199 转发系统错误,请联系我们
8000901 全局系统错误,请联系我们
8000902 未被配置的API转发,请联系我们
8000903 其他accessToken生成错误,请联系我们