Skip to main content

POST /v1/categories

Scope

write_items

Request parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringrequired冪等キー(必須・ADR-010)。UUID v4 推奨
namebodystringrequired
parent_idbodystringoptional親カテゴリー ID(省略=親カテゴリーとして作成)。2 階層まで
statusbodyenum(activeinactive)optional

Response example

{
"data": {
"id": "1",
"parent_id": "string",
"name": "string",
"status": "active",
"sort": 0
}
}

Description

カテゴリーを作成する(sort は同一階層末尾に自動採番)(write_items)

Error response example

{
"error": {
"code": "insufficient_scope",
"message": "requires scope 'read_orders'",
"request_id": "req_01H..."
}
}

Possible errors: 400 / 401 / 403 / 422 / 503