WalletD developers
Catalog

Rename or move a category

Renames a category or moves it under a different parent.

PUT/v1/clients/{clientId}/categories/{categoryId}

Renames a category or moves it under a different 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) when the move would make a category its own parent, nest deeper than one level, or move a category that has children, and conflict (409) for a name the shop already uses.

Authorization

bearerAuth
AuthorizationBearer <token>

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

clientId*string
Formatuuid
categoryId*string
Formatuuid

Request 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 PUT "https://example.com/v1/clients/497f6eca-6276-4993-bfeb-53cbbbba6f08/categories/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -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"}