Move a category under a new parent
PUT/categories/:categoryId/parent
MoveCategory. Replaces the parent of the category; the subtree moves with it. Moving never creates a cycle and never exceeds depth four. Publishes a new tree version. PUT is idempotent by method and takes no Idempotency-Key.
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 500
The moved category.
malformed-request: the body is empty, not valid JSON, has an unknown field, a field of the wrong type, trailing data, is larger than 64 KiB or contains a NUL character (U+0000, also as the escape \u0000).
not-found (the resource does not exist, or the path id is empty or longer than 128 characters). A NUL character in the path is a 404 resource-not-found.
concurrent-update (another writer got in between the load and the save; RETRYABLE: not stored, the key is released and a retry executes again), a business conflict, or idempotency-key-reused (the Idempotency-Key was already used with a different method, path or body).
validation-failed, unknown-category (the new parent is not in the tree), category-cycle (ErrCategoryCycle), max-depth (ErrMaxDepth) or duplicate-sibling-name (ErrDuplicateSiblingName).
internal-error. The detail never leaks the cause ("an unexpected error occurred"); a 5xx is never stored under an Idempotency-Key.