# 电商

# 获取第一级分类接口

TIP

接口仅返回启用的数据

接口地址:https://openapi10.mallcoo.cn/Shopping/Category/v1/Parent/GetList (opens new window)
请求类型:POST
数据格式:application/json; charset=utf-8
参数类型:JSON

# 接口调用参数

名称 数据类型 必填 说明

# 返回结果

名称 数据类型 必填 说明
Code int 是 状态码
Data Json 是 返回数据
Message string 是 返回状态描述
# Data
名称 数据类型 必填 说明
ID long 是 分类Id
Name string 是 分类名称
Picture string 否 分类推荐位图片
IsSupportJumpOtherUrl bool 是 是否支持跳转其他链接 ,true 表示支持
SysfunctionResUrl string 否 支持跳转其它链接地址
# 返回示例

{
  "Code": 1,
  "Data": 
  [
    {
      "ID": 1,
      "Name": "美妆护肤",
      "Picture": "https://i1.mallcoo.cn/mc/66jcu140-5e05-484d-9e50-a5489871956b_288x290_0_0_100.png",
	  "IsSupportJumpOtherUrl": true,
      "SysfunctionResUrl": "https://m.mallcoo.cn/a/shopping/10008"
    }
  ],
  "Message": "成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# 获取第二级分类接口

TIP

接口仅返回启用的数据

接口地址:https://openapi10.mallcoo.cn/Shopping/Category/v1/Child/GetList (opens new window)
请求类型:POST
数据格式:application/json; charset=utf-8
参数类型:JSON

# 接口调用参数

名称 数据类型 必填 说明
ParentID long 否 上级分类ID,0 为获取所有二级分类,否则为对应上级分类子节点

# 返回结果

名称 数据类型 必填 说明
Code int 是 状态码
Data Json 是 返回数据
Message string 是 返回状态描述
# Data
名称 数据类型 必填 说明
ID long 是 分类Id
Name string 是 分类名称
ParentID long 是 上级分类Id
Picture string 否 分类图片
IsSupportJumpOtherUrl bool 是 是否支持跳转其他链接, true 表示支持
SysfunctionResUrl string 否 支持跳转其它链接地址
IsChosen bool 是 是否为精选分类 true 是精选分类 false 不是精选分类
# 返回示例
{
  "Code": 1,
  "Data": 
  [
    {
      "ID": 2,
      "Name": "彩妆",
      "ParentID":1,
      "Picture": "https://i1.mallcoo.cn/mc/66jcu140-5e05-484d-9e50-a5489871956b_288x290_0_0_100.png",
	  "IsSupportJumpOtherUrl": true,
      "SysfunctionResUrl": "https://m.mallcoo.cn/a/shopping/10008"
    }
  ],
  "Message": "成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# 获取商品列表接口

TIP

1、商品只能根据二级分类来查询
2、只返回已经上架的商品

接口地址:https://openapi10.mallcoo.cn/Shopping/Product/v1/GetList (opens new window)
请求类型:POST
数据格式:application/json; charset=utf-8
参数类型:JSON

# 接口调用参数

名称 数据类型 必填 说明
CategoryID long 否 二级分类Id
PageIndex int 否 当前页码 默认为1
PageSize int 否 每页条数(默认20条,最多100条)

# 返回结果

名称 数据类型 必填 说明
Code int 是 状态码
Data Json 是 返回数据
Message string 是 返回状态描述
# Data
名称 数据类型 必填 说明
ID long 是 商品Id
Name string 是 商品名称
Code string 是 商品编码
PropertyValueNames string 是 商品规格属性值(返回最低销售价对应规格属性)
PropertyValueIds string 是 商品规格属性值ID(返回最低销售价对应规格属性值ID)
SkuCode string 否 商品sku编码(非必填项,有就返回;返回最低销售价对应规格属性)
Photo string 是 商品图片;
MarketPrice decimal 是 商品划线价(最低销售价对应规格属性的划线价)
SumPrice decimal 是 商品销售价(最低销售价对应规格属性的销售价)
Price decimal 是 商品需支付金额(最低销售价对应规格属性的需支付金额)
Bonus decimal 是 商品需支付积分(最低销售价对应规格属性的需支付积分)
HaveStock bool 是 是否含有库存; true 表示有库存 ,false表示没有库存(根据商品所有sku库存判断)
# 返回示例
{
  "Code": 1,
  "Data": 
  [
    {
      "ID": 2,
      "Name": "XXX保湿面霜",
      "Code":"CJKNGH",
      "ProductPropertyName":"200ML",
      "ProductPropertyID": "123",
      "SkuCode":"KIJIJI",
	  "Photo": "https://i1.mallcoo.cn/mc/66jcu140-5e05-484d-9e50-a5489871956b_288x290_0_0_100.png",
      "MarketPrice":500.00,
      "SumPrice":109.99,
      "Price": 99.99,
      "Bonus":100.00,
      "HaveStock":true
    }
  ],
  "Message": "成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# 获取商品详情接口

TIP

仅返回上架状态数据

接口地址:https://openapi10.mallcoo.cn/Shopping/Product/v1/GetDetail (opens new window)
请求类型:POST
数据格式:application/json; charset=utf-8
参数类型:JSON

# 接口调用参数

名称 数据类型 必填 说明
ProductID long 是 商品ID

# 返回结果

名称 数据类型 必填 说明
Code int 是 状态码
Data Json 是 返回数据
Message string 是 返回状态描述
# Data
名称 数据类型 必填 说明
ID long 是 商品Id
Name string 是 商品名称
Code string 否 商品编码
PropertyValueNames string 是 商品规格属性值(返回最低销售价对应规格属性)
PropertyValueIds string 是 商品规格属性值ID(返回最低销售价对应规格属性值ID)
SkuCode string 否 商品sku编码(非必填项,有就返回;返回最低销售价对应规格属性)
Photo string 是 商品图片
MarketPrice decimal 是 商品划线价(最低销售价对应规格属性的划线价)
SumPrice decimal 是 商品销售价(最低销售价对应规格属性的销售价)
Price decimal 是 商品需支付金额(最低销售价对应规格属性的需支付金额)
Bonus decimal 是 商品需支付积分(最低销售价对应规格属性的需支付积分)
HaveStock bool 是 是否含有库存; true 表示有库存 ,false表示没有库存(根据商品所有sku库存判断)
Desc text 是 商品介绍 (富文本)
# 返回示例
{
  "Code": 1,
  "Data": 
  [
    {
      "ID": 2,
      "Name": "XXX保湿面霜",
      "Code":"CJKNGH",
      "ProductPropertyName":"200ML",
      "ProductPropertyID": "123",
      "SkuCode":"KIJIJI",
	  "Photo": "https://i1.mallcoo.cn/mc/66jcu140-5e05-484d-9e50-a5489871956b_288x290_0_0_100.png",
      "MarketPrice":500.00,
      "SumPrice":109.99,
      "Price": 99.99,
      "Bonus":100.00,
      "HaveStock":true
    }
  ],
  "Message": "成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# 获取商品小程序二维码

接口地址:https://openapi10.mallcoo.cn/Shopping/Product/v1/Wx/GetQRCode (opens new window)
请求类型:POST
数据格式:application/json; charset=utf-8
参数类型:JSON

# 接口调用参数

名称 数据类型 必填 说明
AppID string 是 微信小程序appId
ProductID long 是 商品ID
PropertyValueIds string 是 商品规格属性值ID
ChannelCode string 是 大屏渠道码

# 返回结果

名称 数据类型 必填 说明
Code int 是 状态码
Data Json 是 返回数据
Message string 是 返回状态描述
# Data
名称 数据类型 必填 说明
ImgUrl string 是 图片连接地址 目前二维码时效是一年时间
# 返回示例
{
  "Code": 1,
  "Data": 
 	{
      "ImgUrl": "https://i1-t.mallcoo.cn/sp_mall/68xfhfa0-97bf-4306-ac7b-b6fafa2101bd.png"
    },
  "Message": "成功"
}
1
2
3
4
5
6
7
8

# 获取商品活动价格

TIP

一个商品可能有多个活动价格,按需提取

接口地址:https://openapi10.mallcoo.cn/Shopping/Product/v1/Activity/Price (opens new window)
请求类型:POST
数据格式:application/json; charset=utf-8
参数类型:JSON

# 接口调用参数

名称 数据类型 必填 说明
ProductIDs List(long) 是 商品ID集合

# 返回结果

名称 数据类型 必填 说明
Code int 是 状态码
Data Json 是 返回数据
Message string 是 返回状态描述
# Data
名称 数据类型 必填 说明
ProductId long 是 商品Id
PriceList List<ProductPriceDTO> 否 商品所有sku参与的活动价格
JoinTypeList List(int) 否 商品参与活动类型 100 秒杀  200 优惠券   300 满减   500 拼团
# ProductPriceDTO
名称 数据类型 必填 说明
Type int 是 营销活动类型:100 秒杀  500拼团  目前只有秒杀与拼团活动有活动价格
PropertyValueIds string 是 商品规格属性值ID
OrlSumPrice decimal 是 原销售价格
SumPrice decimal 是 活动销售价格
Price decimal 是 活动需支付价格
Bonus decimal 是 活动需支付积分
# 返回示例
{
  "Code": 1,
  "Data": 
   [
        {
            "ProductId":1001114,
            "PriceList": [
                {
                    "Type": 100,
                    "PropertyValueIds": "4438",
                    "OrlSumPrice":5,
                    "SumPrice":2,
                    "Price": 0.01,
                    "Bonus": 20.0
                }
            ],
            "JoinTypeList": [
                100,
                300,
                200
            ]
        },
        {
            "ProductId": 1001207,
            "PriceList": [
                {
                    "Type": 500,
                    "PropertyValueIds": "4623",
                    "OrlSumPrice":5,
                    "SumPrice":2,
                    "Price": 0.1,
                    "Bonus": 0.0
                }
            ],
            "JoinTypeList": [
                500,
                300,
                200
            ]
        }
    ],
  "Message": "成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Last Updated: 2021/8/26 上午9:49:10