外观
商品分类
GET /categories
| 权限范围 | 幂等 | operationId |
|---|---|---|
catalog:read | 只读 | Catalog_categories |
示例
js
const res = await client.get("/categories");http
GET /open/v1/categories HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…响应 200:
json
{
"items": [
{
"categoryId": "cat_1Yrxlo5gHYwz6FCJlUWBjrD",
"parentId": "cat_11zIbieRYMZrlCbiDviPxJj",
"name": "周末双排体验券",
"iconUrl": "https://example.com/icon.png",
"enabled": true,
"sort": 1,
"standardServiceCount": 1
}
]
}响应
CategoryView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
categoryId | string | 商品分类 ID(cat_…) | |
parentId | string | 商品分类 ID(cat_…) | |
name | string | 名称 | |
iconUrl | string | 图标 URL | |
enabled | boolean | 是 | 是否启用 |
sort | integer | 排序(小的在前) | |
standardServiceCount | integer | 标准服务数量(如时长、局数) |
错误
签名、权限、限流等通用错误见错误处理。