Bulk reorder categories.
Applies a list of `{ id, sortOrder }` pairs atomically. Any id missing from the list keeps its current order — so partial reorders are safe.
Authorization
bearerAuth AdonisJS access-token guard (middleware.auth({ guards: ["api"] })). Send Authorization: Bearer <oat_…> (issued by /auth/register, /auth/login, /auth/social/{google,apple}, or /auth/guest).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/admin/categories/sort" \ -H "Content-Type: application/json" \ -d '{ "orders": [ { "id": "cat_01jq8z2c4r6n8p0q2s4u6w8y0a", "sortOrder": 1 }, { "id": "cat_01jq8z2e6t8r0s2u4w6y8a0c2d", "sortOrder": 2 }, { "id": "cat_01jq8z2d5s7p9q1r3t5v7x9z1b", "sortOrder": 3 } ] }'{ "data": { "reordered": [ { "id": "cat_01jq8z2c4r6n8p0q2s4u6w8y0a", "sortOrder": 1 }, { "id": "cat_01jq8z2e6t8r0s2u4w6y8a0c2d", "sortOrder": 2 }, { "id": "cat_01jq8z2d5s7p9q1r3t5v7x9z1b", "sortOrder": 3 } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "AUTH_REQUIRED", "message": "Authentication is required to access this resource." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "FORBIDDEN", "message": "You are not allowed to perform this action." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "VALIDATION_ERROR", "message": "One or more fields are invalid.", "fields": [ { "path": "email", "rule": "email", "message": "Must be a valid email address." } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}Restore a soft-deleted category. POST
Reverses a previous `DELETE /admin/categories/:id`. Clears `deletedAt` and re-enables the row. No-op (`alreadyActive: true`) when the category is not deleted.
List legal & informational documents. GET
Returns the available legal/info documents (privacy, terms, about, account-deletion, support) for the requested locale — slug, title, and version only, no bodies. Anonymous. Locale is taken from `Accept-Language`; documents not yet translated fall back to English.