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.

FridgeRadar models the physical layout of your home as a structured three-level hierarchy. At the top sits the Hogar (household) — a shared space that multiple users can belong to. Within each hogar you define Zonas (zones) that represent distinct storage areas such as a refrigerator, pantry, or freezer. Each zona is then subdivided into Estantes (shelves) that map to a concrete location where an item physically lives. Every inventory entry is ultimately anchored to a specific estante, making it straightforward to answer the question “where exactly did I put that?”

The Three-Level Hierarchy

Hogar (household)
└── Zona (zone — fridge, pantry, freezer…)
    └── Estante (shelf — top shelf, door rack, drawer…)
        └── Inventario item

Hogar

A hogar is the root of all FridgeRadar data. When you create a hogar you become its admin, and you can invite others to join through a unique invitation code.
FieldTypeDescription
id_hogarintAuto-generated primary key
nombrestrDisplay name for the household
codigo_invitacionstr | nullUnique code others use to join
fecha_creaciondatetimeTimestamp of household creation

Creating a Hogar

POST /api/v1/hogares/
Authorization: Bearer <token>
Content-Type: application/json

{
  "nombre": "Casa Familia García"
}
{
  "id_hogar": 1,
  "nombre": "Casa Familia García",
  "codigo_invitacion": "XK9-2MQ",
  "fecha_creacion": "2024-11-01T10:30:00"
}

Member Management

Users are linked to hogares through the UsuarioHogar join record. Every membership carries a role that controls what the member can do.

Creating a Membership (UsuarioHogarCreate)

FieldTypeDescription
id_usuariointThe user to add
id_hogarintThe target household
rolstrRole assigned to the member (default "miembro")

Membership Record (UsuarioHogarResponse)

FieldTypeDescription
id_usuario_hogarintPrimary key of the membership record
id_usuariointForeign key to the user
id_hogarintForeign key to the household
rolstr"admin" or "miembro"
fecha_uniondatetimeWhen the user joined
Only a member with rol: "admin" can rename the hogar, remove other members, or delete the household entirely.

Member endpoints

MethodPathDescription
POST/api/v1/hogares/{id_hogar}/miembrosAdd a member to the household
GET/api/v1/hogares/{id_hogar}/miembrosList all members
DELETE/api/v1/hogares/{id_hogar}/miembros/{id_usuario_hogar}Remove a member

Invitation Code System

Every hogar is assigned a short, human-readable codigo_invitacion at creation time. Share this code with household members so they can join without needing an admin to manually add them.
1

Share the code

The hogar admin copies the codigo_invitacion from the household detail screen and sends it to the person they want to invite.
2

Recipient joins

The recipient calls POST /api/v1/hogares/unirse with the code. They are added as a "miembro" automatically.
3

Admin can promote

Any existing admin can later call PATCH /api/v1/hogares/{id_hogar}/miembros/{id_usuario_hogar} to elevate the new member to "admin".

Zona

A zona represents a named storage area inside the hogar. The tipo field categorises it (e.g. "heladera", "despensa", "freezer"), while the optional temperature fields let you record the operating range of refrigerated or frozen spaces.
FieldTypeDescription
id_zonaintAuto-generated primary key
id_hogarintThe parent household
nombrestrHuman-readable name (e.g. “Heladera Principal”)
tipostrCategory of storage area
iconostr | nullIcon identifier for the UI
temperatura_minfloat | nullMinimum operating temperature (°C)
temperatura_maxfloat | nullMaximum operating temperature (°C)
POST /api/v1/zonas/
Authorization: Bearer <token>
Content-Type: application/json

{
  "id_hogar": 1,
  "nombre": "Heladera Principal",
  "tipo": "heladera",
  "icono": "fridge",
  "temperatura_min": 2.0,
  "temperatura_max": 8.0
}

Estante

An estante is a specific shelf within a zona. The posicion_vertical integer defines its stacking order from top to bottom, so the UI can render shelves in the correct physical sequence. color_ui accepts any valid CSS colour string and is used to visually distinguish shelves in the interface.
FieldTypeDescription
id_estanteintAuto-generated primary key
id_zonaintThe parent zone
nombrestrShelf name (e.g. “Cajón de verduras”)
posicion_verticalintStacking order (lower = higher up)
color_uistr | nullCSS colour for visual identification
POST /api/v1/estantes/
Authorization: Bearer <token>
Content-Type: application/json

{
  "id_zona": 3,
  "nombre": "Estante superior",
  "posicion_vertical": 1,
  "color_ui": "#A8D5BA"
}
Use distinct color_ui values for each shelf in a zone. The frontend uses this colour as a visual tag on every inventory card assigned to that shelf.

API Overview

MethodPathDescription
POST/api/v1/hogares/Create a household
GET/api/v1/hogares/List my households
GET/api/v1/hogares/{id_hogar}Get household details
PATCH/api/v1/hogares/{id_hogar}Update household name
DELETE/api/v1/hogares/{id_hogar}Delete a household

Authentication

Learn how to obtain and use Bearer tokens to authenticate all household API calls.

Hogares API

Full reference for every household, member, and invitation endpoint.

Zonas & Estantes API

Reference for creating, listing, updating, and deleting zones and shelves.

Build docs developers (and LLMs) love