Expand the catalog API into a full CRUD surface: create products, fetch them by ID, update fields safely, and archive records. You'll also practice mapping validation failures and conflicts to correct HTTP status codes.
Overview
Syllabus
- Unit 1: Building Products API
- Inspect the products collection endpoint
- Implement GET list and search
- Implement POST create product
- Handle Duplicate SKUs with 409 Conflict
- Unit 2: Fetching Product By ID
- Inspect fetching a product by id
- Fetch product by id with basic errors
- Return service errors consistently
- Add resilience to GET by id
- Unit 3: Updating and Archiving Products
- Inspect update and archive endpoints
- Validate PATCH body with parseJson + service validation
- Persist updates via updateProductService
- Archive products with DELETE