- 授权
- 商品
- 地址
- 价格
- 库存
- 订单
- 售后
- 物流
- 发票
- 类目
- 员工
13.1 获取大类列表
GET
/api/v2/category/categoryone
Category
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
channel
string
可选
默认值:
benlai
shopId
string
商城id
默认值:
123
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://open-agent-branch.benlai.com/api/v2/category/categoryone' \
--header 'channel: benlai' \
--header 'shopId: 123'
返回响应
🟢200成功
text/plain
Body
category_list
array[object (Benlai.Open.Models.Product.CategoryInfo) {4}]
类目列表
category_id
integer <int32>
类目编号
category_name
string
类目名称
parent_id
integer <int32>
父级编号
level
integer <int32>
所属类目层级
示例
{
"code": 0,
"msg": "success",
"value": {
"category_list": [
{
"category_id": 13,
"category_name": "猪肉",
"parent_id": 0,
"level": 1
},
{
"category_id": 17,
"category_name": "家禽类",
"parent_id": 0,
"level": 1
},
{
"category_id": 20,
"category_name": "礼盒·礼券",
"parent_id": 0,
"level": 2
},
{
"category_id": 25,
"category_name": "肉制品",
"parent_id": 0,
"level": 1
}
]
}
}