Skip to main content

Documentation 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.

The Inventory endpoints let you maintain a real-time picture of everything inside a household’s pantry. Each item is linked to a specific shelf (id_estante), carries optional purchase and expiry dates, and is automatically assigned an estado_caducidad color code (verde, amarillo, rojo, or vencido) so your UI can surface expiring products at a glance. All endpoints require a valid Bearer token.

List inventory items

id_hogar
integer
required
The numeric ID of the household whose inventory you want to list.
estado
string
Filter items by expiry status. Accepted values: verde, amarillo, rojo, vencido.
Retrieves every inventory entry for the given household. Pass ?estado= to narrow results to a specific freshness band — useful for building “things about to expire” dashboards.
# List all items in household 3
curl -X GET "https://api.fridgeradar.app/api/v1/inventario/hogar/3" \
  -H "Authorization: Bearer <token>"

# Only items that have already expired
curl -X GET "https://api.fridgeradar.app/api/v1/inventario/hogar/3?estado=vencido" \
  -H "Authorization: Bearer <token>"
GET /api/v1/inventario/hogar/{id_hogar}200 OK — returns an array of InventarioResponse objects.

Add an item to inventory

id_hogar
integer
required
The household that will own this inventory entry.
Request body — InventarioCreate
id_producto
integer
required
ID of the product (from the product catalog) being added to the pantry.
id_estante
integer
required
ID of the shelf within the household where the item is physically stored.
cantidad
number
Quantity of the product. Accepts decimals (e.g. 0.5 for half a pack). Defaults to 1.0.
fecha_compra
string (date)
Purchase date in YYYY-MM-DD format. Optional — used for reporting and movement history.
fecha_vencimiento
string (date)
Expiry date in YYYY-MM-DD format. When provided, the API computes estado_caducidad automatically.
abierto
boolean
Whether the packaging has been opened. Defaults to false. Some products spoil faster once opened.
observaciones
string
Free-text notes about the item (e.g. “opened bag, keep sealed”). Optional.
Adds a new product entry to a household’s pantry and records the authenticated user as id_usuario_agrego. Returns 201 Created with the full InventarioResponse.
curl -X POST "https://api.fridgeradar.app/api/v1/inventario/hogar/3" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id_producto": 12,
    "id_estante": 5,
    "cantidad": 2.0,
    "fecha_compra": "2025-06-01",
    "fecha_vencimiento": "2025-07-15",
    "abierto": false,
    "observaciones": "Organic whole milk"
  }'
POST /api/v1/inventario/hogar/{id_hogar}201 Created

Get a single inventory item

id_inventario
integer
required
The unique ID of the inventory entry to retrieve.
Fetches a single pantry entry by its id_inventario, returning the complete InventarioResponse including the computed expiry status.
curl -X GET "https://api.fridgeradar.app/api/v1/inventario/47" \
  -H "Authorization: Bearer <token>"
GET /api/v1/inventario/{id_inventario}200 OK

Update an inventory item

id_inventario
integer
required
ID of the inventory entry to update.
Request body — InventarioUpdate (all fields optional)
id_estante
integer
Move the item to a different shelf within the same household.
cantidad
number
New quantity after consumption or restocking.
fecha_vencimiento
string (date)
Corrected or updated expiry date in YYYY-MM-DD format.
abierto
boolean
Update the opened/unopened state of the item’s packaging.
observaciones
string
Replace or clear the free-text notes on this item.
Applies a partial update to an existing inventory entry. Only the fields you include are modified — omitted fields retain their current values.
curl -X PATCH "https://api.fridgeradar.app/api/v1/inventario/47" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "cantidad": 1.5,
    "abierto": true
  }'
PATCH /api/v1/inventario/{id_inventario}200 OK

Delete an inventory item

id_inventario
integer
required
ID of the inventory entry to permanently remove.
Permanently removes an inventory entry from the household pantry. This action cannot be undone; a movement record is created internally to maintain the audit trail.
curl -X DELETE "https://api.fridgeradar.app/api/v1/inventario/47" \
  -H "Authorization: Bearer <token>"
DELETE /api/v1/inventario/{id_inventario}204 No Content

Response schema — InventarioResponse

Every write operation and single-item read returns an InventarioResponse object. The list endpoint returns an array of the same shape.
id_inventario
integer
Unique identifier for this inventory entry.
id_hogar
integer
Household that owns this entry.
id_producto
integer
Product catalog ID of the stored item.
id_estante
integer
Shelf within the household where the item is stored.
id_usuario_agrego
integer
ID of the user who originally added the item.
cantidad
number
Current quantity on hand.
fecha_compra
string | null
Purchase date (YYYY-MM-DD), or null if not recorded.
fecha_vencimiento
string | null
Expiry date (YYYY-MM-DD), or null if not set.
abierto
boolean
Whether the item’s packaging is currently open.
observaciones
string | null
Free-text notes attached to this entry.
estado_caducidad
string
Computed freshness band: verde (fresh), amarillo (expiring soon), rojo (very close to expiry), or vencido (expired).
fecha_registro
string (datetime)
ISO 8601 timestamp of when the entry was first created.

Build docs developers (and LLMs) love