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 desperdicio (waste) module lets households record exactly when and why food is thrown away. Each waste event is linked to an inventory item and may include the quantity discarded, a reason code, and a free-text comment. Aggregate metrics are also available to surface waste trends over time, helping households understand which products they discard most often. All routes require a valid Bearer token.

Log a Waste Event

Records a new waste event for an inventory item. Returns 201 Created with the saved event.
id_inventario
integer
required
ID of the inventory item that was discarded.
cantidad
float
Optional quantity discarded. Leave null if the full remaining amount was thrown away or the quantity is unknown.
motivo
string
Optional reason for the waste, e.g. vencimiento, deterioro, or exceso.
comentario
string
Optional free-text comment providing additional context about the waste event.
curl -X POST "https://api.fridgeradar.app/api/v1/desperdicio" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id_inventario": 103,
    "cantidad": 0.5,
    "motivo": "vencimiento",
    "comentario": "Se venció antes de poder usarla"
  }'
Response fields — DesperdicioResponse
id_desperdicio
integer
required
Unique identifier for the waste event.
id_inventario
integer
required
ID of the inventory item that was discarded.
cantidad
float | null
Quantity discarded, or null if not recorded.
motivo
string | null
Reason for the waste, or null if not provided.
comentario
string | null
Free-text comment, or null if not provided.
fecha_desperdicio
string (datetime)
required
ISO 8601 timestamp of when the waste event was registered.

List Waste Events for a Household

Returns all waste events associated with inventory items belonging to the specified household, ordered by most recent first.
id_hogar
integer
required
ID of the household whose waste events to retrieve.
curl -X GET "https://api.fridgeradar.app/api/v1/desperdicio?id_hogar=3" \
  -H "Authorization: Bearer <token>"

Get Waste Metrics for a Household

Returns aggregated waste metrics for a household. The response shape is determined by the service layer and may include totals by product, totals by reason, waste frequency over time, and similar analytics. This endpoint is useful for building waste dashboards or surfacing insights to household members.
id_hogar
integer
required
The unique identifier of the household whose waste metrics to compute.
curl -X GET "https://api.fridgeradar.app/api/v1/desperdicio/metricas/3" \
  -H "Authorization: Bearer <token>"
The exact fields returned by the metrics endpoint depend on the DesperdicioService.obtener_metricas implementation and may evolve as new analytics are added. Treat unknown keys as additive and non-breaking.

Build docs developers (and LLMs) love