新建目录,名称 1 到 80 个字符,货币默认 CNY

POST/api/v1/catalogs

认证请求头 Authorization: Bearer <访问令牌>,访问令牌用设备码换取,不要向用户要密码、短信验证码或 API Key
权限商家,需要 product:write 才能修改商品、图片或店铺介绍

请求体

application/json

新建目录

namestring必填

目录名称

取值范围: 1 <= 字符数 <= 80

currencystring

省略时为 CNY,必须是三位字母

请求示例

{
  "name": "示例",
  "currency": "CNY"
}

响应

201

application/json

成功时 code 为 200,资源在 data

idstring必填

目录 ID,以 cat_ 开头

namestring必填

目录名称

currencystring必填

三位字母货币代码

schema_revisioninteger必填

字段定义版本

created_atstring必填

创建时间,ISO-8601

updated_atstring必填

更新时间,ISO-8601

响应示例

{
  "id": "cat_example",
  "name": "示例",
  "currency": "CNY",
  "schema_revision": 1,
  "created_at": "2026-05-16T00:00:00.000Z",
  "updated_at": "2026-05-16T00:00:00.000Z"
}