POST /api/platos
Creates a new dish. After creating a dish, use the ingredient endpoints to define its recipe.
Authentication: Bearer JWT requiredRequired role:
admin
Request
Body
Dish name. Maximum 60 characters.
Dish price in BOB (min: 0). Accepts a numeric value; stored as a decimal.
Response
Success (201)
Returns the createdplatos record.
Unique dish ID (nanoid, 10 characters)
Dish name
Dish price as a decimal string (e.g.
"25.00")Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
Soft-delete timestamp —
null for active dishesError responses
| Status | Description |
|---|---|
| 400 | Validation error — check nombre and precio |
| 401 | Unauthorized — missing or invalid JWT |
| 403 | Forbidden — role is not admin |