You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance the API by adding the ability to update product categories. Currently, the API supports creating, retrieving and deleting product categories via GET, POST and DELETE methods but lacks endpoints for updating them. This enhancement will allow administrators to manage product categories more effectively.
Endpoints
1. Update Product Category
Method:PUT
URL:/api/v1/products/categories/{category_id}
Requirements
1. Input Validation
Validate the incoming data (e.g., category name, description) to ensure data integrity.
2. Error Handling
Return a 400 error for invalid input data.
Return a 404 error if the specified product category does not exist.
Description
Enhance the API by adding the ability to update product categories. Currently, the API supports creating, retrieving and deleting product categories via
GET
,POST
andDELETE
methods but lacks endpoints for updating them. This enhancement will allow administrators to manage product categories more effectively.Endpoints
1. Update Product Category
PUT
/api/v1/products/categories/{category_id}
Requirements
1. Input Validation
2. Error Handling
400
error for invalid input data.404
error if the specified product category does not exist.500
error for unexpected server issues.Success Response
HTTP 200 OK
Error Responses
400 BAD REQUEST
404 NOT FOUND
500 INTERNAL SERVER ERROR
Testing
Unit Tests
404
error.400 BAD REQUEST
response.Integration Tests
The text was updated successfully, but these errors were encountered: