The Order Details API manages the individual line items that make up each bakery order. Each record links a product (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_producto) to an order (id_pedido), capturing both the quantity and the unit price at the moment of purchase. All endpoints on this resource require a valid JWT Bearer token.
Price snapshot: The
precio_unitario field stores the product’s price at the time the order detail was created. This value is independent of any future changes to the product’s current price, preserving an accurate record for invoicing and reporting.GET /api/detalles-pedido
Returns a list of all order detail records across all orders.Auto-incremented unique identifier for the order detail record.
ID of the parent order this line item belongs to. References the
Pedidos table.ID of the product included in this line item. References the
Productos table.Quantity of the product ordered.
Unit price of the product at the time of purchase, stored as a decimal (e.g.,
"35.00").GET /api/detalles-pedido/:id
Returns a single order detail record by its unique ID.POST /api/detalles-pedido
Creates a new line item record and associates it with an existing order. Theprecio_unitario must be explicitly provided to capture the price at the time of purchase.
ID of the order this line item belongs to. Must reference an existing record in the
Pedidos table.ID of the product being ordered. Must reference an existing record in the
Productos table.Quantity of the product being ordered. Must be a positive integer.
Unit price of the product at the time of purchase. This value is stored as a snapshot and does not change if the product price is updated later.
The
id_detalle of the newly created order detail record.Confirmation message.
PUT /api/detalles-pedido/:id
Updates all fields of an existing order detail record. Use this endpoint to correct quantities or price values on a line item.The unique ID of the order detail record to update.
ID of the parent order for this line item.
ID of the product for this line item.
Updated quantity of the product.
Updated unit price snapshot for this line item.
DELETE /api/detalles-pedido/:id
Permanently deletes an order detail record by ID.The unique ID of the order detail record to delete.