The Ingredientes API manages the shared pool of ingredients used by recipes and the pantry (despensa). All ingredient records live in a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/NicolasMPP/restorante-springboot/llms.txt
Use this file to discover all available pages before exploring further.
ingredientes table and can be referenced by multiple recipes simultaneously through a many-to-many join. The base path for ingredient management is /api/ingredientes. This page also covers the Alimentos standalone API at /api/alimentos, which handles the food-item catalogue independently of the full menu workflow.
Both APIs are CORS-enabled with no authentication required.
Ingredientes API — /api/ingredientes
List all ingredients
GET /api/ingredientes
Returns the complete list of Ingrediente records. Each record exposes only its own scalar fields; back-references to recipes and pantry entries are suppressed (@JsonIgnore) to avoid circular serialisation.
200 OK
Response fields
Auto-generated primary key of the ingredient.
Human-readable name or description of the ingredient (max 100 characters).
Current stock level on hand (must be ≥ 0).
Create an ingredient
POST /api/ingredientes
Persists a new Ingrediente record. The response body is the saved entity including the database-assigned id.
Request body
Name or description of the ingredient. Must not be blank and must be 100 characters or fewer.
Initial stock quantity. Must be zero or greater.
200 OK
Update stock level
PUT /api/ingredientes/{id}/stock
Replaces the cantidadStock value of an existing ingredient with the value supplied via query parameter. This is the preferred way to record deliveries or inventory corrections without needing to re-POST the full entity.
Path parameters
The primary key of the ingredient whose stock should be updated.
Query parameters
The new absolute stock quantity to set (must be ≥ 0).
200 OK
400 Bad Request (ingredient not found or update failed)
Alimentos API — /api/alimentos
The Alimentos API gives direct CRUD access to food items without going through the full menu workflow. Use it for simple lookups, lightweight admin tasks, or when you need to delete a food item entirely from the system.
List all food items
GET /api/alimentos
Returns every Alimento record, including subtypes (PlatoFuerte, Postres, Bebida, Adicionales) stored under SINGLE_TABLE inheritance. The discriminator column (tipo_alimento) is not serialised in the JSON response.
200 OK
Get food item by ID
GET /api/alimentos/{id}
Fetches a single Alimento by its primary key.
Path parameters
The numeric identifier of the food item to retrieve.
404 Not Found when no food item exists with the given id.
Search food items by name
GET /api/alimentos/buscar
Returns all food items whose nombre field contains the provided search string, case-insensitive. Useful for autocomplete inputs and admin search bars.
Query parameters
Substring to search for within food item names. The match is case-insensitive and does not require an exact word boundary.
200 OK — array of matching Alimento objects (empty array [] if no match found).
Create a basic food item
POST /api/alimentos
Persists a new Alimento directly, bypassing the recipe-creation workflow. The receta field is optional; if omitted the food item will have no linked recipe.
Request body
Display name of the food item (max 100 characters).
Unit price with up to two decimal places. Must be greater than zero.
Optional linked recipe object. Provide at minimum
{ "id": <recetaId> } to associate an existing recipe.200 OK — the saved Alimento with its assigned id.
Delete a food item
DELETE /api/alimentos/{id}
Permanently removes an Alimento record from the database.
Path parameters
The numeric identifier of the food item to delete.
200 OK
400 Bad Request when no food item with the given id exists.