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 orders endpoints handle the full customer order lifecycle — from submitting a cart to checking whether a delivery or pickup order is ready. Two endpoints cover this flow: POST /ordenar creates a new order and assigns it a daily sequential ID, and GET /estado/{id} lets customers poll the preparation status of their order in real time.

POST /ordenar

Place a new customer order. The order is inserted into the pedidos_activos collection and assigned a sequential ID based on the total number of orders placed today (both active and historical).

Request body

cliente
object
required
Customer information object.
carrito
object[]
required
List of items in the customer’s cart. Each element represents one menu item.

Response

status
string
required
Always "success" on a successful order submission.
id
integer
required
The sequential order number assigned to this order for the current day.
The order ID is calculated as the count of all orders placed today (across both pedidos_activos and historial_ventas) plus one. IDs reset each day and are not globally unique across dates.

Example

Request
{
  "cliente": {
    "nombre": "Ana García",
    "telefono": "9811234567",
    "tipo": "Domicilio",
    "direccion": "Calle 20 #45, Campeche",
    "metodo_pago": "Efectivo"
  },
  "carrito": [
    { "nombre": "Tradicional", "precio": 75, "cantidad": 2, "item_id": 1 },
    { "nombre": "Coca Cola 600ml", "precio": 20, "cantidad": 2, "item_id": 12 }
  ]
}
Response
{ "status": "success", "id": 3 }

GET /estado/

Check the current preparation status of an order using its numeric ID.

Path parameters

id
integer
required
The order ID returned by POST /ordenar.

Response

status
string
required
Current state of the order. One of: "preparando", "listo", or "no_encontrado".
detalle
string
required
Human-readable message describing the order state.

Possible responses

statusdetalleMeaning
"preparando""Preparando..."Order is in pedidos_activos — still being prepared
"listo""¡Tu orden está en camino! 🛵"Order was dispatched as a Domicilio delivery
"listo""¡Tu orden está lista para recoger! 🍔"Order was dispatched as a Sucursal pickup
"no_encontrado""Buscando..."ID was not found in either collection

Example

Request
curl http://localhost:5000/estado/3
Response
{ "status": "preparando", "detalle": "Preparando..." }

Build docs developers (and LLMs) love