Endpoint
GET
/api/category/
This endpoint does not require authentication. It is publicly accessible.
Path Parameters
The ID of the category to retrieve
Response
Returns a JSON object containing the requested category or an error if not found.Success Response
HTTP status code (200 for success)
Response status (‘success’)
Error Response
HTTP status code (404 for not found)
Response status (‘error’)
Error message describing what went wrong
Example Request
cURL
Example Responses
Success Response (200)
Error Response (404)
Implementation Details
This endpoint is defined inCategoryController.php:30 and uses Laravel’s find() method to retrieve a category by its ID. If the category is not found, it returns a 404 error with a Spanish message.