The Products API manages the BodegaX beer catalog — every brand stocked in the warehouse is represented as aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Edwin950821/BodegaX/llms.txt
Use this file to discover all available pages before exploring further.
producto record with a name, price per crate, and current stock count. These two endpoints are used across nearly every frontend view: the Home page builds its sales table from the product list, the Management page displays total inventory, the Despachar Caja dialog lets admins select quantities to dispatch, and the RecibirCaja dialog increments stock when a new shipment arrives.
GET /productos/all
Returns the complete list of beer products in the warehouse along with their current stock counts and prices. This is the primary read endpoint and is called on initialization by the Home, Management, History, and TerminarJornada components.Response
An array of product objects.Universally unique identifier for the product. Used as the reference key in product-sale line items (
uuid_producto) and in stock update requests.The beer brand or product name (for example,
"Club Colombia" or "Águila"). Displayed in the sales table, inventory view, and PDF reports.Price per crate, in the warehouse’s local currency. Used by the frontend to compute
total_parcial and total_venta when creating a sale.Current number of crates available in the warehouse. Decremented automatically after each successful dispatch (Despachar Caja) and incremented when a shipment is received (RecibirCaja).
PUT /productos/edit
Updates a product record. This endpoint is used for two distinct operations in BodegaX:- Stock decrement after a sale — called by the Despachar Caja dialog for each dispatched product. The new stock is computed as
p.stock - p.quantitybefore the request is sent. - Stock increment after receiving inventory — called by the RecibirCaja dialog. The new stock is computed as
selected.stock + quantityand the entire updated product object is sent as the body.
This endpoint replaces the entire product record on the server. Always pass
uuid, nombre, precio, and stock together — omitting any field may result in that field being cleared or overwritten with a default value on the server side.Despachar Caja — Stock Decrement
RecibirCaja — Stock Increment
Request Body
The unique identifier of the product to update. Obtained from the
GET /productos/all response.The product’s brand name. Pass the existing value unchanged if only stock is being updated.
Price per crate. Pass the existing value unchanged if only stock is being updated.
The new total stock count. The frontend calculates this value before sending — the API accepts the final count, not a delta.