This endpoint creates a row in theDocumentation 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.
menu_alimentos join table, associating a pre-existing Alimento with a Menu. No new food record is created — both the menu and the food item must already exist in the database before calling this endpoint. If you need to create the food item from scratch and add it to the menu in a single request, use POST /api/menu/{menuId}/alimento-completo instead.
Endpoint
POST/api/menu/{menuId}/alimentos/{alimentoId}
Path parameters
The primary key of the menu to which the food item will be linked.
The primary key of the existing food item to add to the menu.
Request body
None. All information is provided via path parameters.Responses
| Status | Body | Description |
|---|---|---|
200 OK | "Alimento agregado correctamente" | The food item was successfully linked to the menu. |
400 Bad Request | "No se pudo agregar alimento" | Either the menu ID or the food item ID was not found in the database. |
Example request
Example responses
Success — 200 OKTo create a brand-new food item with a recipe, chef, and ingredients and add it to the menu in one atomic operation, use POST /api/menu/{menuId}/alimento-completo instead. That endpoint handles the full object graph inside a single transaction.