跳转至

商城商品详情

功能说明

  • 查询商城商品详情

接口地址

HTTP请求方式

  • Method: POST
  • Content-Type: application/x-www-form-urlencoded

参数说明

  • 公有参数

    发送请求是必须传入公共参数,详见公共参数

  • 私有参数

参数名称 是否必须 参数类型 长度限制 描述
spu_code string 商品code

请求示例(HTTP)

 POST /tenant/commerce/product/detail?access_token=43c3bc29ec9324daf5791d831b76a8be&appid=25001707&spu_code=PC22051100000002&timestamp=1667887995&version=1.0.0&sign=6ccbf84b97f53ee5d967e109694101ddb8fe1880 HTTP/1.1
Host: https://openapi.guanaitong.tech

返回参数说明

参数名称 描述
code 返回码。详见错误代码
msg 如果错误,返回错误信息。
data 如果没有错误,返回商城商品详情,对象
data.spu_code String类型,商品code
data.spu_name String类型,商品名称
data.product_title String类型,商品标题
data.master_category_name String类型,一级类目名称
data.second_category_name String类型,二级类目名称
data.third_category_name String类型,三级类目名称
data.brand_name String类型,品牌名称
data.type Integer类型,商品类型 1-实物 2-虚拟
data.picture_list List集合,图片集合
data.sku_list List集合,sku集合
data.supply_status 供货状态 0-停止供货 1-供货中

图片列表(picture_list)

参数名称 描述
pic_type Integer类型,图片类型
1-商品主图
2-商品详情图
3-单品图
4-属性图
5-商品标题图
6-拼团spu图
7-拼团sku图
8-拼团详情图
pic_size_type Integer类型,图片大小类型
1-小图
2-中图(移动端图)
3-大图(PC端图
pic_module_type Integer类型,图片模块类型
1-使用范围
2-使用流程
3-商品介绍
4-其他说明
pic_url 图片地址
pic_index 图片排序
sku_code String类型,sku_code

SKU列表(sku_list)

参数名称 描述
sku_code String类型,sku_code
sku_price BigDecimal类型,售价
sku_market_price BigDecimal类型,市场价

正确返回示例

{
    "code": 0,
    "msg": "OK",
    "data": {
        "spu_name": "测试商品自营商品0511",
        "spu_code": "PC22051100000002",
        "supply_status": 1,
        "sku_list": [
            {
                "sku_market_price": 12.0,
                "sku_price": 1.0,
                "sku_code": "KC22051100000003"
            },
            {
                "sku_market_price": 11.0,
                "sku_price": 1.2,
                "sku_code": "KC22051100000004"
            }
        ],
        "master_category_name": "运营商后台一级类目",
        "third_category_name": "运营商后台三级类目",
        "brand_name": "update233",
        "picture_list": [
            {
                "pic_index": 1.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/8bf8266faeee8fe21e4f60cee4721737.jpg",
                "pic_size_type": 3,
                "pic_type": 2,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 1.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/8bf8266faeee8fe21e4f60cee4721737.jpg",
                "pic_size_type": 2,
                "pic_type": 2,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 1.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/709dad23a623a8bd0ae0211763f45794.jpg",
                "pic_size_type": 2,
                "pic_type": 1,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 1.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/709dad23a623a8bd0ae0211763f45794.jpg",
                "pic_size_type": 3,
                "pic_type": 1,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 1.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-06-24/0701b6330e00ae67938c7dbae26c4392.jpg",
                "pic_size_type": 2,
                "pic_type": 3,
                "sku_code": "KC22051100000003",
                "pic_module_type": 0
            },
            {
                "pic_index": 1.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/709dad23a623a8bd0ae0211763f45794.jpg",
                "pic_size_type": 2,
                "pic_type": 3,
                "sku_code": "KC22051100000004",
                "pic_module_type": 0
            },
            {
                "pic_index": 2.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/6b19c440bec4a58a476bf71ab824439f.jpg",
                "pic_size_type": 3,
                "pic_type": 2,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 2.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/6b19c440bec4a58a476bf71ab824439f.jpg",
                "pic_size_type": 2,
                "pic_type": 2,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 2.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/e363cb4d7fe7fbed6333dc6921c1018d.jpg",
                "pic_size_type": 2,
                "pic_type": 1,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 2.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/e363cb4d7fe7fbed6333dc6921c1018d.jpg",
                "pic_size_type": 3,
                "pic_type": 1,
                "sku_code": "",
                "pic_module_type": 0
            },
            {
                "pic_index": 2.0,
                "pic_url": "https://img1.guanaitong.com/grus-gfs/test/gmall-seller-mgr/by-days/2022-05-11/e363cb4d7fe7fbed6333dc6921c1018d.jpg",
                "pic_size_type": 2,
                "pic_type": 3,
                "sku_code": "KC22051100000004",
                "pic_module_type": 0
            }
        ],
        "type": 1,
        "product_title": "测试商品自营商品0511",
        "second_category_name": "运营商后台二级类目"
    }
}

错误返回示例

{
    "code": 1000240002,
    "data": null,
    "msg": "参数校验失败"
}

常见错误码

错误码 错误信息
1000240002 参数校验失败
其他公共错误码 其他公共错误码
回到页面顶部