curl -X POST https://api.example.com/products \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Espresso Coffee", "price": 12.99, "image": "espresso.jpg", "inventory": 50, "categoryId": 1 }'
{ "id": 123, "name": "Espresso Coffee", "price": 12.99, "image": "espresso.jpg", "inventory": 50, "categoryId": 1, "category": { "id": 1, "name": "Beverages", "image": "beverages.jpg" } }
admin
{ "statusCode": 404, "message": ["Category not found"] }