Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/teofilobetancourt/Restaurant-Equis/llms.txt

Use this file to discover all available pages before exploring further.

The Inventory API manages the Inventario.Insumos table — the raw supply items (insumos) that the kitchen tracks for stock control. Each insumo records a current stock level (Stock_Actual), a minimum threshold (Stock_Minimo), and a reorder point (Punto_Reorden) used to trigger procurement alerts. The API is available under /api/inventario.
Every response object includes dual field names for each attribute: a short camelCase alias (e.g. nombre, stock, unidad) and the original PascalCase database column name (e.g. Nombre_Insumo, Stock_Actual, Unidad_Medida). Both names refer to the same value. The aliases exist for frontend compatibility with code that predates the current schema. You may use either form when building request bodies — the API accepts both.

List All Inventory Items

curl -X GET https://your-api.com/api/inventario
Returns all inventory items ordered alphabetically by Nombre_Insumo. No pagination or filtering is applied.

Response

Returns an array of insumo objects:
id_inventario
integer
Alias for ID_Insumos. The auto-incremented primary key used in path parameters for update and delete operations.
ID_Insumos
integer
Primary key of the insumo record in the Inventario.Insumos table.
nombre
string
Alias for Nombre_Insumo. Human-readable name of the supply item, e.g. "Harina de Trigo".
Nombre_Insumo
string
Full name of the insumo as stored in the database. Unique across all insumos.
stock
number
Alias for Stock_Actual. Current quantity in stock as a floating-point number.
Stock_Actual
number
Current stock level. Stored as NUMERIC(12, 4).
unidad
string
Alias for Unidad_Medida. Unit of measurement, e.g. "Kg", "L", "Unidades".
Unidad_Medida
string
Unit of measurement for this insumo.
precio_costo
number
Always 0.0 in the current implementation. Reserved for future cost-tracking features.
stock_minimo
number
Alias for Stock_Minimo. The minimum acceptable stock level before a restock warning is triggered.
Stock_Minimo
number
Minimum stock threshold. Stored as NUMERIC(12, 4).
Punto_Reorden
number
The stock level at which a new purchase order should be placed. If not explicitly provided on creation, defaults to Stock_Minimo × 1.5. Stored as NUMERIC(12, 4).

Create Inventory Item

curl -X POST https://your-api.com/api/inventario \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Aceite de Girasol",
    "unidad": "L",
    "stock": 50.0,
    "stock_minimo": 10.0,
    "Punto_Reorden": 20.0
  }'
Creates a new inventory item. Returns 201 Created with the full insumo object. If Punto_Reorden is not provided, it is automatically set to Stock_Minimo × 1.5.

Request Body

nombre
string
Name of the supply item. Alias: Nombre_Insumo. Defaults to "Insumo Nuevo" if omitted. Must be unique across all insumos.
unidad
string
Unit of measurement. Alias: Unidad_Medida. Defaults to "Kg" if omitted. Examples: "Kg", "L", "Unidades", "g".
stock
number
Starting stock quantity. Alias: Stock_Actual. Defaults to 0 if omitted.
stock_minimo
number
Minimum stock threshold below which a restock is needed. Alias: Stock_Minimo. Defaults to 0 if omitted.
Punto_Reorden
number
Stock level at which a purchase order should be initiated. If omitted, automatically computed as stock_minimo × 1.5.

Response

Returns 201 Created with the full insumo object (same shape as the list response).
Example 201 response
{
  "id_inventario": 7,
  "ID_Insumos": 7,
  "nombre": "Aceite de Girasol",
  "Nombre_Insumo": "Aceite de Girasol",
  "stock": 50.0,
  "Stock_Actual": 50.0,
  "unidad": "L",
  "Unidad_Medida": "L",
  "precio_costo": 0.0,
  "stock_minimo": 10.0,
  "Stock_Minimo": 10.0,
  "Punto_Reorden": 20.0
}

Update Inventory Item

curl -X PUT https://your-api.com/api/inventario/7 \
  -H "Content-Type: application/json" \
  -d '{ "stock": 75.5 }'
Partially updates an existing inventory item. Only the fields provided in the request body are changed; all other fields remain unchanged. Returns the updated insumo object on success. Raises 404 if no item with the given ID exists.

Path Parameters

id_inventario
integer
required
The ID_Insumos / id_inventario of the item to update.

Request Body

All fields are optional. Include only the fields you want to change. Both alias and PascalCase names are accepted for each field.
nombre
string
New name for the item. Alias: Nombre_Insumo.
stock
number
Updated current stock level. Alias: Stock_Actual.
unidad
string
Updated unit of measurement. Alias: Unidad_Medida.
stock_minimo
number
Updated minimum stock threshold. Alias: Stock_Minimo.

Response

Returns the updated insumo object (same shape as the list response).

Delete Inventory Item

curl -X DELETE https://your-api.com/api/inventario/7
Permanently removes an inventory item from the database. Returns 204 No Content on success. Raises 404 if no item with the given ID exists.

Path Parameters

id_inventario
integer
required
The ID_Insumos / id_inventario of the item to delete.

Response

Returns 204 No Content with an empty body on success.
Deletion is permanent and cannot be undone. Ensure you have confirmed the correct id_inventario before issuing this request.

Build docs developers (and LLMs) love