商品列表 #

描述 #

使用此接口获取商户的商品列表。

接口说明 #

授权对象 APP

请求地址 GET /open/cps/goodsList

请求规则 请查阅开发必读

请求参数 #

参数名称 变量名称 参数类型[长度限制] 是否必填 描述
商户ID id uint32 query

示例值:12345

订单类型 order_type int32 query0:打包 3:堂食

示例值:0

请求示例 #

{
  "id": 12345,
  "order_type": 0
}

响应参数 #

参数名称 变量名称 参数类型 是否必填 描述
商品分类列表 list object[] 商品分类信息列表

商品分类信息 list #

参数名称 变量名称 参数类型 是否必填 描述
分类ID id uint32

示例值:1

分类名称 title string

示例值:热销

排序 sort uint32

示例值:1

描述 description string

示例值:分类描述

最低消费 min double

示例值:19.9

是否必选 is_must int32

示例值:0

图标 icon string

示例值:https://example.com/icon.png

商品列表 goods object[] 该分类下的商品列表

商品信息 goods #

参数名称 变量名称 参数类型 是否必填 描述
商品ID id uint32

示例值:1001

商品标题 title string

示例值:不二云微奶茶

商品图片 thumb string

示例值:https://bool.dev/images/products/milk-tea.jpg

商品描述 describe string

示例值:精选茶底,搭配香浓奶精,口感丝滑

商品价格 price double

示例值:24

商品类型 is_type int32 1:单规格 2:多规格

示例值:1

商品类型 types uint32 0 平台商品 其他皆为开发平台商品cps_mch_id

示例值:1

包装费 box_fee double

示例值:1.5

库存 inventory uint32

示例值:100

库存限制 limit int32 1 限制库存(库存为0 则售罄) 2 不限库存

示例值:1

商品详细 content string

示例值:商品详细介绍

商品图片列表 images string[]

示例值:["https://example.com/image1.jpg", "https://example.com/image2.jpg"]

是否推荐 is_recommend int32 0:否 1:是

示例值:1

是否热门 is_hot int32 0:否 1:是

示例值:1

是否新品 is_new int32 0:否 1:是

示例值:1

活动商品 goods_activity bool

示例值:false

活动类型 goods_activity_types int32

示例值:2

活动折扣 goods_activity_discount double

示例值:0.9

原价 original_price double

示例值:27

单次限购 order_limit uint32

示例值:5

原材料列表 raw_material_list string[]

示例值:["茶叶", "奶精"]

重量 weight double 单位:克

示例值:500

加料材料 attach_material string[]

示例值:["珍珠", "椰果"]

起始数量 start_num uint32

示例值:1

步长 unit_num uint32

示例值:1

推荐理由 reason string

示例值:商品缺货

视频 video string

示例值:https://example.com/video.mp4

单点不送 single_limit int32

示例值:3

会员价 vip_price double

示例值:22

会员类型 vip_type int32 0:无 1:超级会员 2:企微 3:群友价

示例值:1

单位 unit string

示例值:杯

限购数量 limit_num uint32

示例值:10

限购类型 limit_type uint32

示例值:1

活动价 activity_price double

示例值:21.5

响应示例 #

{
  "code": 200,
  "msg": "success",
  "data": {
    "list": [
      {
        "id": 1,
        "title": "人气推荐",
        "sort": 1,
        "status": 1,
        "description": "不二云微最受欢迎的饮品",
        "min": 0,
        "is_must": 1,
        "goods": [
          {
            "id": 1001,
            "title": "不二云微拿铁",
            "thumb": "https://bool.dev/images/products/latte.jpg",
            "description": "使用优质阿拉比卡咖啡豆,搭配新鲜牛奶,口感顺滑",
            "price": 22,
            "original_price": 25,
            "is_type": 1,
            "inventory": 100,
            "status": 1
          },
          {
            "id": 1002,
            "title": "BOOL特调咖啡",
            "thumb": "https://bool.dev/images/products/special-coffee.jpg",
            "description": "独特配方,融合多种风味,是BOOL的招牌饮品",
            "price": 26,
            "original_price": 29,
            "is_type": 2,
            "inventory": 100,
            "status": 1
          }
        ]
      },
      {
        "id": 2,
        "title": "经典咖啡",
        "sort": 2,
        "status": 1,
        "description": "传统咖啡的经典呈现",
        "min": 0,
        "is_must": 1,
        "goods": [
          {
            "id": 1003,
            "title": "美式咖啡",
            "thumb": "https://bool.dev/images/products/americano.jpg",
            "description": "纯粹的咖啡香,简单而不简单",
            "price": 18,
            "original_price": 20,
            "is_type": 1,
            "inventory": 100,
            "status": 1
          }
        ]
      }
    ],
    "total": 2,
    "page": 1,
    "limit": 10
  }
}
上次更新: 2/21/2025, 3:53:48 PM