ApiResponse<T>. See the API Overview for the full envelope schema.
GET /api/inventario
Returns all inventory records.Example request
Example response
GET /api/inventario/caducados
Returns inventory records whosefechaCaducidad is before the given limite date (i.e. already expired as of that date).
Query parameters
Cut-off date in
yyyy-MM-dd format. Records with fechaCaducidad before this date are returned.Example request
Example response
GET /api/inventario/por-caducar
Returns inventory records whosefechaCaducidad is before the given limite date. Use this endpoint to find products that will expire soon by passing a future date as limite.
This endpoint delegates to the same service method as
/caducados. Pass a future date (e.g. today + 7 days) to find items expiring within that window.Query parameters
Upper-bound date in
yyyy-MM-dd format. Records with fechaCaducidad before this date are returned.Example request
Example response
GET /api/inventario/alertas
Generates automatic expiry alerts for all inventory items. Each alert includes days remaining and a severity label.Response fields
Array of alert objects.
Example request
Example response
GET /api/inventario/buscar
Returns inventory records matching a specific barcode.Query parameters
Exact barcode string to search for.
Example request
Example response
GET /api/inventario/division
Returns all inventory records belonging to a specific division.Query parameters
Division name. Must be one of:
PERECEDEROS, NO_PERECEDEROS.Example request
Example response
GET /api/inventario/departamento
Returns all inventory records belonging to a specific department.Query parameters
Department name. Must be one of:
FRUTAS, VERDURAS, LACTEOS, CARNES, EMBUTIDOS, MULTIPLE, FARMACIA.Example request
Example response
Inventario object schema
Auto-generated primary key.
Product barcode.
Human-readable product description.
Current stock quantity.
Expiry date in
yyyy-MM-dd format.Lot or batch identifier.
Date the item was received, in
yyyy-MM-dd format. Assigned automatically on creation.Division enum:
PERECEDEROS or NO_PERECEDEROS.Department enum:
FRUTAS, VERDURAS, LACTEOS, CARNES, EMBUTIDOS, MULTIPLE, or FARMACIA.