https://www.westmonth.com/openapi/productCategory/getAllhttps://testing.westmonth.com/openapi/productCategory/getAll| 参数名 | 类型 | 必填 | 示例值 | 说明 |
|---|---|---|---|---|
| Authorization | string | 是 | authorization | 身份验证Token |
| Content-Type | string | 是 | application/json | 建议固定传此值 |
| 参数名 | 类型 | 必填 | 默认值 | 可选值 | 说明 |
|---|---|---|---|---|---|
| locale | string | 否 | zh_cn | zh_cn、en | 语言类型,默认中文,可传英文 |
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务状态码(0表示成功) |
| msg | string | 提示信息(成功时为空) |
| data | object | 业务数据 |
| 字段 | 类型 | 说明 |
|---|---|---|
| classification | array | 商品分类列表(树形结构) |
| 字段 | 类型 | 说明 |
|---|---|---|
| id | integer | 分类ID |
| parent_id | integer | 父级分类ID(0表示顶级分类) |
| icon | string | 分类默认图标URL |
| change_icon | string | 分类交互状态图标URL |
| image | string | 分类展示图片URL |
| image_url | string | 图片跳转链接 |
| position | integer | 分类排序序号 |
| description | object | 分类描述信息(多语言) |
| children | array | 子分类列表(同classification结构) |
| 字段 | 类型 | 说明 |
|---|---|---|
| id | integer | 描述信息ID |
| category_id | integer | 关联的分类ID |
| locale | string | 语言 类型(zh_cn:中文,en:英文) |
| name | string | 分类名称 |
| content | string | 分类描述内容 |
| meta_title | string | 元标题(SEO用) |
| meta_description | string | 元描述(SEO用) |
| meta_keywords | string | 元关键词(SEO用) |
| created_at | string | 创建时间 |
| updated_at | string | 更新时间 |
{
"code": 0,
"msg": "",
"data": {
"classification": [
{
"id": 100121,
"parent_id": 0,
"icon": "https://catalog/cosmetics/slices-icon/17252580218_美容护理.svg",
"change_icon": "https://catalog/cosmetics/slices-icon/172525802155_美容护理hover.svg",
"image": "https://catalog/17274191047_16美容护理.png",
"image_url": "",
"position": 99,
"description": {
"id": 1062,
"category_id": 100121,
"locale": "zh_cn",
"name": "美容护理",
"content": "美容护理",
"meta_title": "",
"meta_description": "",
"meta_keywords": "",
"created_at": "2024-09-27 14:39:12",
"updated_at": "2024-09-27 14:39:12"
},
"children": [
{
"id": 100226,
"parent_id": 100121,
"icon": "",
"change_icon": "",
"image": "https://catalog/newImage/beauty.png",
"image_url": null,
"position": 0,
"description": {
"id": 410,
"category_id": 100226,
"locale": "zh_cn",
"name": "美体护理",
"content": "美体护理",
"meta_title": "",
"meta_description": "",
"meta_keywords": "",
"created_at": "2023-10-07 08:12:35",
"updated_at": "2023-10-07 08:12:35"
},
"children": [
{
"id": 100241,
"parent_id": 100226,
"icon": "",
"change_icon": "",
"image": "https://catalog/newImage/beauty.png",
"image_url": null,
"position": 0,
"description": {
"id": 440,
"category_id": 100241,
"locale": "zh_cn",
"name": "防晒霜",
"content": "防晒霜",
"meta_title": "",
"meta_description": "",
"meta_keywords": "",
"created_at": "2023-10-07 08:12:35",
"updated_at": "2023-10-07 08:12:35"
}
}
]
}
]
}
]
}
}{
"code": 3,
"msg": "授权无效 authorization timestamp error",
"data": []
}| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|
| 版本 | 日期 | 修改说明 |
|---|---|---|
| v1.0 | 2025-01-01 | 初始版本 |