Households (hogares) are the top-level organizational unit in FridgeRadar. Each household contains zones, shelves, and products, and can be shared between multiple users via the membership (miembros) sub-resource. Every request to these endpoints must carry a validDocumentation 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.
Authorization: Bearer <token> header.
POST /api/v1/hogares
Creates a new household owned by the authenticated user. The service automatically records the creator as the first member. Authentication:Authorization: Bearer <token> required.
Display name for the household (e.g.
"Casa Principal").Optional invite code that other users can quote when requesting to join. If omitted the field is stored as
null.Response — 201 Created
Auto-assigned primary key.
Household name as stored.
Invite code, or
null if not set.ISO 8601 timestamp of when the household was created.
| Status | Meaning |
|---|---|
201 Created | Household created; object returned. |
401 Unauthorized | Token missing, expired, or invalid. |
422 Unprocessable Entity | Validation error — nombre is required. |
GET /api/v1/hogares
Returns all households that the authenticated user belongs to. Authentication:Authorization: Bearer <token> required.
Response — 200 OK
Returns a JSON array ofHogarResponse objects.
Household primary key.
Household name.
Invite code, or
null.Creation timestamp.
| Status | Meaning |
|---|---|
200 OK | Array returned (may be empty if the user belongs to no households). |
401 Unauthorized | Token missing, expired, or invalid. |
GET /api/v1/hogares/{id_hogar}
Fetches a single household by its ID.
Authentication: Authorization: Bearer <token> required.
The primary key of the household to retrieve.
Response — 200 OK
Household primary key.
Household name.
Invite code, or
null.Creation timestamp.
| Status | Meaning |
|---|---|
200 OK | Household object returned. |
401 Unauthorized | Token missing, expired, or invalid. |
404 Not Found | No household exists with that ID. |
PATCH /api/v1/hogares/{id_hogar}
Partially updates a household’s mutable fields. Only the fields included in the request body are changed.
Authentication: Authorization: Bearer <token> required.
The primary key of the household to update.
New display name for the household. Optional.
Response — 200 OK
Returns the full updatedHogarResponse object.
Unchanged primary key.
Name after the update.
Invite code (unchanged by this endpoint).
Original creation timestamp.
| Status | Meaning |
|---|---|
200 OK | Updated household returned. |
401 Unauthorized | Token missing, expired, or invalid. |
404 Not Found | No household with that ID. |
422 Unprocessable Entity | Validation error. |
DELETE /api/v1/hogares/{id_hogar}
Permanently deletes a household and all its associated data.
Authentication: Authorization: Bearer <token> required.
The primary key of the household to delete.
| Status | Meaning |
|---|---|
204 No Content | Household deleted; no response body. |
401 Unauthorized | Token missing, expired, or invalid. |
404 Not Found | No household with that ID. |
POST /api/v1/hogares/{id_hogar}/miembros
Adds a user to a household with a specified role.
Authentication: Authorization: Bearer <token> required.
The primary key of the target household.
Primary key of the user to add.
Must match the
id_hogar path parameter.Role to assign to the new member. Defaults to
"miembro" if omitted. Common values: "admin", "miembro".Response — 201 Created
Auto-assigned primary key for this membership record.
User that was added.
Household they were added to.
Role assigned to this member.
ISO 8601 timestamp of when the user joined the household.
| Status | Meaning |
|---|---|
201 Created | Membership created; record returned. |
401 Unauthorized | Token missing, expired, or invalid. |
404 Not Found | Household or user not found. |
422 Unprocessable Entity | Validation error. |
GET /api/v1/hogares/{id_hogar}/miembros
Returns all membership records for the specified household.
Authentication: Authorization: Bearer <token> required.
The primary key of the household whose members to list.
Response — 200 OK
Returns a JSON array ofUsuarioHogarResponse objects.
Membership record primary key.
User’s primary key.
Household’s primary key.
Role assigned to this member.
When the user joined the household.
| Status | Meaning |
|---|---|
200 OK | Array of membership records returned. |
401 Unauthorized | Token missing, expired, or invalid. |
404 Not Found | No household with that ID. |
DELETE /api/v1/hogares/{id_hogar}/miembros/{id_usuario_hogar}
Removes a specific membership record from a household, effectively revoking that user’s access.
Authentication: Authorization: Bearer <token> required.
The primary key of the household.
The primary key of the membership record to remove (not the user’s ID, but the join-table row ID).
| Status | Meaning |
|---|---|
204 No Content | Member removed; no response body. |
401 Unauthorized | Token missing, expired, or invalid. |
404 Not Found | Household or membership record not found. |