#### 接口版本: |版本号|制定人|修订日期|说明| |:----|:----|:---- |:----| |1.0 |Karen |2021-10-26 |建立文档| #### 请求URL: - {{HOST}}/api/product/category #### 请求方式: - POST #### 请求头: |参数名|是否必须|类型|说明| |:---- |:---|:----- |----- | |Content-Type |是 |string |application/json | |Accept |是 |string |application/json | |Authorization|否|string|Bearer {token},`登录`接口获取| |uuid |否 |string |uuid,每个接口都会通过 headers 头返回 | |locale |否 |string |语言,默认 en,更多配置查看文件 `/config/strongshop.php` 中 `langs`| |currency |否 |string |货币,默认 USD,更多配置查看文件 `/config/strongshop.php` 中 `currencies`| #### 请求参数: |参数名|是否必须|类型|说明| |:---- |:---|:----- |----- | #### 返回示例: **正确时返回:** ``` { "code": 200, "message": "Success", "data": [ { "id": 5, "name": "女装", "children": [ { "id": 6, "parent_id": 5, "name": "连衣裙", "children": [ { "id": 9, "parent_id": 6, "name": "短袖连衣裙" }, { "id": 10, "parent_id": 6, "name": "牛仔连衣裙" } ] }, { "id": 7, "parent_id": 5, "name": "上衣", "children": [ { "id": 11, "parent_id": 7, "name": "卫衣" }, { "id": 12, "parent_id": 7, "name": "毛衣" }, { "id": 13, "parent_id": 7, "name": "针织衫" } ] }, { "id": 8, "parent_id": 5, "name": "外套", "children": [] } ] } ] } ``` #### 返回CODE说明: |参数名|说明| |:----- |----- | |200 |成功 | |3001 |字段验证错误 | |5001|服务内部错误| #### 备注: - 更多返回错误代码请看首页的错误代码描述