Overview
Retrieves a list of all categories in the system, ordered by ID in descending order (newest first).Authentication
This endpoint requires:- Valid JWT token in the
Authorizationheader - User must have ADMIN role
Request
No parameters required.Response
Indicates if the request was successful
Success message indicating categories were retrieved
Array of category objects
Unique identifier for the category
Category name (max 255 characters)
Optional category description (max 255 characters)
Timestamp when the category was created
Timestamp when the category was last updated
Timestamp when the category was soft deleted (null if active)
Code Examples
Response Examples
Success Response (200 OK)
Unauthorized Response (401 Unauthorized)
Forbidden Response (403 Forbidden)
Returned when the authenticated user does not have ADMIN role:Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Categories retrieved |
| 401 | Unauthorized - Invalid or missing JWT token |
| 403 | Forbidden - User does not have ADMIN role |
| 500 | Internal Server Error |