Admin/merchant/goods/product/detail (o2o)

来自ECJiaWiki
跳转至: 导航搜索

应用场景

 获取货品详情信息

接口名称

 admin/merchant/goods/product/detail

请求参数

字段名 变量名 必填 类型 示例值 描述
token token string d122e3c72332c5af12a71d77c9f1462f5901d276 token
商品id goods_id Int 商品id
货品id product_id Int 货品id

举例如下

{
      "token" : "d122e3c72332c5af12a71d77c9f1462f5901d276",
      "goods_id":1325,
      "product_id" : 1,
}

返回参数

字段名 变量名 必填 类型 示例值 描述
返回状态码 status status字典 {"succeed" : 1} 返回请求接口后的数据,succeed为1代表成功,0则为失败,失败后则返回error_code(错误code)及error_desc(错误说明)
返回信息 data data字典 请求接口提供的返回信息
└货品id product_id Int 货品id
└货品名称 product_name string 货品名称
└商品id goods_id Int 商品id
└货品编号 product_sn String 货品编号
└货品价格 product_shop_price float 货品价格
└货品库存 product_number int 货品库存
└货品属性id product_attr string 货品属性id
└货品条形码 product_bar_code string 货品条形码
└货品属性(中文) label_product_attr string 货品属性
└货品图片信息 img img字典 货品图片信息
   └货品小图 small String http://test.b2b2c.ecjia.com/content/uploads/data/afficheimg/144969589105797566.png” 货品小图
   └货品缩略图 thumb String http://test.b2b2c.ecjia.com/content/uploads/data/afficheimg/144969589105797566.png” 货品缩略图
   └货品原图 url String http://test.b2b2c.ecjia.com/content/uploads/data/afficheimg/144969589105797566.png” 货品原图
└货品相册信息 product_gallery Array 货品相册信息
   └货品相册id img_id Int 货品相册id
   └货品相册小图small small String http://test.b2b2c.ecjia.com/content/uploads/data/afficheimg/144969589105797566.png” 货品相册小图small
   └货品相册缩略图 thumb String http://test.b2b2c.ecjia.com/content/uploads/data/afficheimg/144969589105797566.png” 货品相册缩略图
   └货品相册原图 url String http://test.b2b2c.ecjia.com/content/uploads/data/afficheimg/144969589105797566.png” 货品相册原图

成功举例如下

{
    "data": {
        "goods_id": 404,
        "product_id":100,
        "product_name": "高邮咸蛋-特级10只装",
        "product_sn": "ECS000404",
        "product_shop_price":11.00,
        "product_number":1000,
        "product_attr":"4362|4364|4365|4367",
        "product_bar_code":"",
        "label_product_attr":"150g/翡翠/简装/国产",
        "img": {
            "thumb": "http://10.10.10.47/o2o/content/uploads/images/201603/goods_img/404_G_1459132249372.jpg",
            "url": "http://10.10.10.47/o2o/content/uploads/images/201603/source_img/404_G_1459132249214.jpg",
            "small": "http://10.10.10.47/o2o/content/uploads/images/201603/thumb_img/404_thumb_G_1459132249439.jpg"
        },
        "product_gallery": [
            {
                "img_id": "1912",
                "thumb": "http://10.10.10.47/o2o/content/uploads/images/201603/thumb_img/404_thumb_P_1459219910691.jpg",
                "url": "http://10.10.10.47/o2o/content/uploads/images/201603/goods_img/404_P_1459219910274.jpg",
                "small": "http://10.10.10.47/o2o/content/uploads/images/201603/source_img/404_P_1459219910035.jpg?1"
            },
            {
                "img_id": "1913",
                "thumb": "http://10.10.10.47/o2o/content/uploads/images/201603/thumb_img/404_thumb_P_1459219910531.jpg",
                "url": "http://10.10.10.47/o2o/content/uploads/images/201603/goods_img/404_P_1459219910380.jpg",
                "small": "http://10.10.10.47/o2o/content/uploads/images/201603/source_img/404_P_1459219910811.jpg?2"
            }
        ],
    },
    "status": {
        "succeed": 1
    }
}

失败举例如下

{
      "status" : {
            "succeed" : 0,
            "error_code" : 100,
            "error_desc" : "Invalid session",
      }
}
{
      "status" : {
            "succeed" : 0,
            "error_code" : 101,
            "error_desc" : "错误的参数提交",
      }
}
{
      "status" : {
            "succeed" : 0,
            "error_code" : 13,
            "error_desc" : "不存在的信息",
      }
}

注:错误编码