The semáforo (traffic light) system assigns a freshness state —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.
verde, amarillo, or rojo — to every inventory item based on its proximity to expiry. FridgeRadar’s scheduler runs this recalculation automatically at 00:05 every day via APScheduler. These endpoints let you trigger the same process on demand, which is useful after bulk imports, for debugging, or whenever you need freshness states to reflect real-time changes without waiting for the nightly job. Both routes require a valid Bearer token.
Recalculate All Households
Iterates over every household in the system and recalculates the semáforo state for all inventory items. Returns the total number of items updated.- POST /api/v1/semaforo/recalcular
- Response 200
Human-readable confirmation string, always
"Semáforos recalculados".Total number of inventory items whose semáforo state was updated across all households.
Recalculate One Household
Recalculates the semáforo state for all inventory items belonging to a specific household. Use this when you want to refresh freshness states for a single home without affecting the rest of the system.The unique identifier of the household to recalculate.
- POST /api/v1/semaforo/recalcular/{id_hogar}
- Response 200
Human-readable confirmation string that includes the household ID, e.g.
"Semáforos recalculados para hogar 3".Number of inventory items whose semáforo state was updated within this household.
The semáforo recalculation is idempotent — running it multiple times produces the same final state. There is no harm in calling either endpoint more frequently than the nightly schedule.