The inventory module is the core of FridgeRadar. Every product stored in a household is represented as an inventory item that records where it lives (which shelf), how much is left, when it was bought, and when it expires. FridgeRadar automatically calculates anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/EstefanoARG/FridgeRadar/llms.txt
Use this file to discover all available pages before exploring further.
estado_caducidad (freshness state) for each item — ranging from verde (fresh) through amarillo (expiring soon) and rojo (expiring very soon) to vencido (expired) — so you always know what needs to be used first. All inventory endpoints require a valid bearer token in the Authorization header.
Adding an item to the pantry
Send aPOST request to /api/v1/inventario/hogar/{id_hogar} with an InventarioCreate body.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id_producto | int | ✅ | — | Product catalogue ID |
id_estante | int | ✅ | — | Shelf ID where the item is stored |
cantidad | float | ❌ | 1.0 | Quantity on hand |
fecha_compra | date | ❌ | null | Purchase date (YYYY-MM-DD) |
fecha_vencimiento | date | ❌ | null | Expiry date — drives the semáforo state |
abierto | bool | ❌ | false | Whether the package has been opened |
observaciones | str | ❌ | null | Free-text notes |
201 Created with an InventarioResponse:
Listing inventory items
Retrieve all items for a household with an optional freshness filter:estado filter values
verde
Fresh items with plenty of time before expiry.
amarillo
Items approaching their expiry date — use soon.
rojo
Items very close to expiry — use immediately.
vencido
Items that have already passed their expiry date.
Getting a single item
InventarioResponse for that item, or 404 Not Found if it does not exist.
Updating an item
Send aPATCH request to /api/v1/inventario/{id_inventario} with an InventarioUpdate body. All fields are optional — only include the fields you want to change.
| Field | Type | Description |
|---|---|---|
id_estante | int | null | Move item to a different shelf |
cantidad | float | null | Update the quantity on hand |
fecha_vencimiento | date | null | Correct or set the expiry date |
abierto | bool | null | Mark the package as opened |
observaciones | str | null | Update free-text notes |
Deleting an item
204 No Content on success. Deletion is permanent — consider logging a waste event first if the item is being discarded.
The estado_caducidad field
Every InventarioResponse includes an estado_caducidad string. This value is computed automatically by the backend based on the fecha_vencimiento and the current date. You never set it directly — it updates itself each time the semáforo recalculation task runs (daily at 00:05) or when you call the manual recalculation endpoint.