The Inventory API manages theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/teofilobetancourt/Tradiciones-y-Sabores/llms.txt
Use this file to discover all available pages before exploring further.
Inventario.Insumos table — the master list of every raw supply or ingredient the kitchen relies on. Each insumo record tracks its current stock level, a safety minimum, and a reorder point that signals when a new purchase order is needed. The API is intentionally flexible: all write endpoints accept both camelCase (nombre, stock, unidad) and PascalCase (Nombre_Insumo, Stock_Actual, Unidad_Medida) field names, so integrations written against either convention work without modification.
GET /api/inventario
Returns the complete list of supply items, ordered alphabetically byNombre_Insumo. No filtering or pagination is applied — all records are returned in a single response.
Response
Returns an array of insumo objects. Each object contains both a camelCase alias and its original PascalCase database column name for every field.Supply item ID, mirrored from
ID_Insumos. Use this value as the id_inventario path parameter in PUT and DELETE requests.Primary key of the record in the
Inventario.Insumos table. Same value as id_inventario.Supply item name in camelCase alias form, e.g.
"Harina de maíz". Same value as Nombre_Insumo.Supply item name as stored in the database column.
Current stock level as a floating-point number, e.g.
24.5. Same value as Stock_Actual. Stored with up to 4 decimal places.Current stock level from the database column.
Unit of measurement abbreviation, e.g.
"Kg", "L", "und". Same value as Unidad_Medida.Unit of measurement as stored in the database column.
Always returns
0.0 in the current implementation. Cost pricing is not tracked at the insumo level in this version of the API.Minimum safe stock level. If
stock drops below this value, operations should initiate a restock. Same value as Stock_Minimo.Minimum safe stock level from the database column.
The stock level at which a purchase order should be triggered, typically
Stock_Minimo × 1.5. No camelCase alias is provided for this field.Every response object contains both camelCase and PascalCase versions of the same field (e.g.
nombre and Nombre_Insumo, stock and Stock_Actual). This dual-key format is intentional and ensures backward compatibility with clients built against either naming convention. The values in each pair are always identical.POST /api/inventario
Creates a new supply item in the inventory. The endpoint accepts either camelCase or PascalCase key names for all fields — use whichever convention matches your client.Punto_Reorden defaults to stock_minimo × 1.5 if not explicitly provided.
Response status: 201 Created
Request Body
Name of the supply item. Also accepted as
Nombre_Insumo. Maximum 100 characters, must be unique. Defaults to "Insumo Nuevo" if omitted entirely, though providing a meaningful name is strongly recommended.Unit of measurement for this supply. Also accepted as
Unidad_Medida. Maximum 20 characters. Common values are "Kg", "g", "L", "ml", "und". Defaults to "Kg" if omitted.Initial stock level on hand. Also accepted as
Stock_Actual. Defaults to 0 if omitted.Minimum safe stock threshold. Also accepted as
Stock_Minimo. Defaults to 0 if omitted. This value is used to auto-calculate Punto_Reorden when that field is not provided.Stock level at which a reorder should be triggered. Defaults to
stock_minimo × 1.5 when not provided. Supply this field explicitly to override the automatic calculation.Response
Returns the newly created insumo object with the full dual-key response shape described in GET /api/inventario.PUT /api/inventario/
Updates one or more fields of an existing supply item. Only the fields included in the request body are modified — omitted fields retain their current values. Both camelCase and PascalCase key names are accepted for all updatable fields.Path Parameters
The ID of the insumo to update. This is the
id_inventario (or ID_Insumos) value from the GET response.Request Body
All fields are optional. Include only the fields you want to change.Updated supply item name. Also accepted as
Nombre_Insumo.Updated unit of measurement. Also accepted as
Unidad_Medida.Updated current stock level. Also accepted as
Stock_Actual. Use this field to record deliveries or consumption adjustments.Updated minimum stock threshold. Also accepted as
Stock_Minimo. Note: updating stock_minimo does not automatically recalculate Punto_Reorden on existing records — update Punto_Reorden via a subsequent request if needed.Response
Returns the full updated insumo object with the dual-key response shape. Returns404 with {"detail": "Insumo no encontrado"} if no record with that ID exists.
DELETE /api/inventario/
Permanently removes a supply item from the inventory. This operation returns no response body on success. Response status:204 No Content
Path Parameters
The ID of the insumo to delete. This is the
id_inventario (or ID_Insumos) value from the GET response.Response
Returns204 No Content with an empty body on success. Returns 404 with {"detail": "Insumo no encontrado"} if no record with that ID exists.
Deleting an insumo is permanent and cannot be undone. If the item is temporarily out of stock, consider setting
stock to 0 and updating Punto_Reorden to trigger reorder workflows rather than deleting the record entirely.