The Orders API manages the full lifecycle of customer orders across Don Mamino’s bakery locations. Every endpoint — including read operations — requires a valid JWT Bearer token. Orders are assigned to a specific client (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino/llms.txt
Use this file to discover all available pages before exploring further.
id_cliente), handled by a user (id_usuario), and fulfilled by a location (id_sede).
Order lifecycle: Orders progress through the following states in sequence:
procesando → en preparación → enviado → entregadoThe estado field defaults to procesando when a new order is created. Use PUT /api/pedidos/:id to advance an order through these stages.GET /api/pedidos
Returns a list of all orders across all bakery locations.Auto-incremented unique identifier for the order.
ISO 8601 datetime when the order was created. Set automatically by the database.
Current status of the order. One of:
procesando, en preparación, enviado, entregado.ID of the client who placed the order. References the
Clientes table.ID of the user who processed the order. References the
Usuarios table.ID of the bakery location that fulfilled the order. References the
Sedes table.GET /api/pedidos/:id
Returns a single order by its unique ID.POST /api/pedidos
Creates a new order. Thefecha_pedido field is set automatically by the database. The estado defaults to procesando if not provided.
Initial status of the order. Must be one of:
procesando, en preparación, enviado, entregado. Defaults to procesando.ID of the client placing the order. Must reference an existing record in the
Clientes table.ID of the user managing the order. Must reference an existing record in the
Usuarios table.ID of the bakery location handling the order. Must reference an existing record in the
Sedes table.The
id_pedido of the newly created order.Confirmation message.
PUT /api/pedidos/:id
Updates all fields of an existing order. Use this endpoint to advance an order through the status lifecycle.The unique ID of the order to update.
New status for the order. Must be one of:
procesando, en preparación, enviado, entregado.ID of the client associated with the order.
ID of the user managing the order.
ID of the bakery location handling the order.
DELETE /api/pedidos/:id
Permanently deletes an order by ID. Deleting an order also removes all associatedDetalle_Pedido records due to the ON DELETE CASCADE constraint in the database.
The unique ID of the order to delete.