Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EduCabrera-k/Menu_Hamburguesas/llms.txt

Use this file to discover all available pages before exploring further.

The kitchen endpoints are used by restaurant staff through the kitchen dashboard to manage the live state of the menu and order queue. POST /toggle_disponibilidad lets staff mark any menu item as unavailable or restore it, and POST /marcar_listo permanently moves a completed order from the active queue to the sales history.

POST /toggle_disponibilidad

Toggle a menu item’s availability in the inventario_stock collection. If no record exists for the item, one is created with disponible: false. If a record already exists, its value is inverted.

Request body

id
integer
required
The menu item ID to toggle. This must match the item_id used in the menu and cart.

Response

status
string
required
Always "success" when the toggle is applied.

Behavior

  • If the item has no existing record in inventario_stock, a new document is inserted with disponible: false.
  • If the item has an existing record, the current disponible value is inverted (truefalse, falsetrue).
  • The updated availability is immediately reflected in GET /api/stock.

Example

Request
{ "id": 4 }
Response
{ "status": "success" }
cURL
curl -X POST http://localhost:5000/toggle_disponibilidad \
  -H "Content-Type: application/json" \
  -d '{"id": 4}'

POST /marcar_listo

Mark an active order as complete. The order is moved from pedidos_activos to historial_ventas with a fecha_finalizado timestamp added.

Request body

id
integer
required
The order ID to dispatch. Must correspond to an order currently in pedidos_activos.

Response

status
string
required
"success" if the order was found and dispatched. "error" if no order with the given ID exists in pedidos_activos.

What this does

1

Find the order

The order is looked up in pedidos_activos by its numeric id.
2

Add a completion timestamp

A fecha_finalizado field is added to the order document with the current date and time in YYYY-MM-DD HH:MM:SS format.
3

Insert into history

The updated order document is inserted into the historial_ventas collection.
4

Remove from active queue

The order is deleted from pedidos_activos.
This operation is irreversible. Once an order is dispatched with marcar_listo, it is permanently moved to historial_ventas and will no longer appear in the kitchen queue. There is no undo.

HTTP 404

A 404 status is returned when the provided id does not match any order in pedidos_activos.

Examples

Request
{ "id": 3 }
Success response
{ "status": "success" }
Error response (order not found)
{ "status": "error" }
cURL
curl -X POST http://localhost:5000/marcar_listo \
  -H "Content-Type: application/json" \
  -d '{"id": 3}'

Build docs developers (and LLMs) love