Create a category
Creates a category, optionally under a parent.
/v1/clients/{clientId}/categoriesCreates a category, optionally under a parent. Needs authority over the client — membership of its organization, an API key bound to this client, or tenant staff holding clients:manage; anything else is refused not_client_member or insufficient_scope (403), and an unknown client client_not_found (404). Refuses invalid_request (400) for a name outside its bounds, an unknown parent, a second level of nesting or a shop already at its category ceiling, and conflict (409) when the shop already has a category with that name.
Authorization
bearerAuth A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/clients/497f6eca-6276-4993-bfeb-53cbbbba6f08/categories" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef", "name": "string", "slug": "string", "position": 0, "created_at": "2019-08-24T14:15:22Z"}The shop's category tree, parents first
The shop's category tree, parents before their children.
Delete an unused category
Deletes a category and answers 204. Needs authority over the client — membership of its organization, an API key bound to this client, or tenant staff holding clients:manage; anything else is refus...