推荐商品

商品详情页面推荐商品,返回推荐的6个商品

请求地址

GET https://{host}/openapi/product/related

请求参数

body

属性 类型 默认值 必填 说明
id int 商品ID

返回值

{
  "errcode": "0",
  "errmsg": "",
  "data": {
    "total": 0,
    "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
      }
    ]
  }
}

参数说明

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

DATA

属性 类型 说明
list 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 商品详细介绍,是富文本格式

errcode 的合法值

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

results matching ""

    No results matching ""