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.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.
Log a Waste Event
Records a new waste event for an inventory item. Returns201 Created with the saved event.
ID of the inventory item that was discarded.
Optional quantity discarded. Leave
null if the full remaining amount was thrown away or the quantity is unknown.Optional reason for the waste, e.g.
vencimiento, deterioro, or exceso.Optional free-text comment providing additional context about the waste event.
- POST /api/v1/desperdicio
- Response 201
DesperdicioResponse
Unique identifier for the waste event.
ID of the inventory item that was discarded.
Quantity discarded, or
null if not recorded.Reason for the waste, or
null if not provided.Free-text comment, or
null if not provided.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 of the household whose waste events to retrieve.
- GET /api/v1/desperdicio
- Response 200
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.The unique identifier of the household whose waste metrics to compute.
- GET /api/v1/desperdicio/metricas/{id_hogar}
- Response 200
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.