Files
app-padel/apps/web/app/api
Ivan c298b23b35 feat(api): add products and categories endpoints
Add API endpoints for the POS module:
- GET/POST /api/products/categories - List and create product categories
- GET/POST /api/products - List products with filters and create new products
- GET/PUT/DELETE /api/products/[id] - CRUD operations for individual products
- POST /api/products/[id]/stock - Adjust product stock with validation

Features include:
- Zod validation for all inputs
- Organization-scoped access control
- Low stock indicator (stock < minStock)
- Soft delete for products (isActive = false)
- Stock adjustment with reason tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 06:54:35 +00:00
..