商品列表

根据条件搜素商品

请求地址

POST https://{host}/openapi/product/list

请求参数

属性 类型 默认值 必填 说明
x-token String 用户token

body

属性 类型 默认值 必填 说明
pageNum int 分页页码,默认1
pageSize int 分页大小,默认10,
categoryId int 分类类目ID,可选
brandId int 品牌商ID,可选
keyword string 关键字,可选
isNew int 是否新品,可选
isHot int 是否热卖,可选
sort string 排序方式,支持"create_time", "retail_price"或"name"
order string 排序类型,顺序"asc"或者降序"desc",默认desc

返回值

{
  "errcode": "0",
  "errmsg": "",
  "data": {
    "list": [
      {
        "id": 1057036,
        "goodsSn": "1057036",
        "name": "日式纯色水洗亚麻抱枕",
        "categoryId": 1008002,
        "brandId": 1001000,
        "galleryList": [
          "http://yanxuan.nosdn.127.net/bec107bf0cc86dcf90fa084584d68c76.jpg",
          "http://yanxuan.nosdn.127.net/d5da1d907ce3e5dcc8cf72e925d9494b.jpg",
          "http://yanxuan.nosdn.127.net/2f82661892afb0fd5efa8ff343f9941e.jpg",
          "http://yanxuan.nosdn.127.net/fd1d9edc261fb68844c0fb65f0c1a4a4.jpg"
        ],
        "keywords": "",
        "brief": "水洗亚麻,透气亲肤",
        "isOnSale": 1,
        "picUrl": "http://yanxuan.nosdn.127.net/8a9ee5ba08929cc9e40b973607d2f633.png",
        "shareUrl": "",
        "unit": "件",
        "counterPrice": 99.00,
        "retailPrice": 79.00,
        "detail": null
      }
    ],
    "filterCategoryList": [
      {
        "id": 1005007,
        "name": "锅具",
        "keywordList": [],
        "categoryDesc": "一口好锅,炖煮生活一日三餐",
        "pid": 1005001,
        "iconUrl": "http://yanxuan.nosdn.127.net/4aab4598017b5749e3b63309d25e9f6b.png",
        "picUrl": "http://yanxuan.nosdn.127.net/d2db0d1d0622c621a8aa5a7c06b0fc6d.png",
        "level": "L2",
        "sortOrder": 1
      }
    ]
  }
}

参数说明

属性 类型 说明
data DATA 包含返回的数据
errcode number 错误码
errmsg string 错误信息

DATA

属性 类型 说明
list list(product) 商品数据列表
filterCategoryList list 子类目,作为筛选条件

product

属性 类型 说明
id int 商品id
goodsSn String 商品编号
name String 商品名称
categoryId int 商品所属类目ID
brandId String 品牌id
galleryList String 商品宣传图片列表
keywords String 商品关键字,采用逗号间隔
brief String 商品简介
isOnSale String 是否上架
picUrl String 商品页面商品图片
shareUrl String 商品分享朋友圈图片
unit String 商品单位,例如件、盒
counterPrice BigDecimal 专柜价格
retailPrice BigDecimal 零售价格
detail String 商品详细介绍,是富文本格式

category

属性 类型 说明
id int id
name String 类目名称
keywordList List 类目关键字,列表
brandDesc String 类目广告语介绍
pid int 品牌图片
iconUrl BigDecimal 类目图标
picUrl String 类目图片
level String 层级
sortOrder int 排序

errcode 的合法值

说明 最低版本
-1 系统错误
0 请求成功
20001 参数为空
20003 参数错误

results matching ""

    No results matching ""