AllDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSebasSV/healtyhelp/llms.txt
Use this file to discover all available pages before exploring further.
/api/consumos routes require a valid Bearer token in the Authorization header. Dates and times are always stored and returned in the Bogotá timezone (UTC-5).
HealtyHelp stores every date as a plain
YYYY-MM-DD string and every time as HH:mm in Bogotá time (UTC-5). Pass date parameters in this format and interpret all fechaBogota / horaBogota fields accordingly.The Consumo object
Every endpoint that returns consumption records uses the following shape:| Field | Type | Description |
|---|---|---|
_id | string | MongoDB ObjectId of this consumption entry |
userId | string | ObjectId of the owning user |
recetaId | string | ObjectId of the logged recipe |
recetaSnapshot.nombre | string | Recipe name at the time of logging |
recetaSnapshot.img | string | Recipe image URL at the time of logging |
recetaSnapshot.desc | string | Recipe short description at the time of logging |
tipo | string | Meal slot: desayuno, almuerzo, cena, or snack |
fechaBogota | string | Date in Bogotá time — YYYY-MM-DD |
horaBogota | string | Time of logging in Bogotá time — HH:mm |
nutri | object | Nutritional snapshot copied from the recipe at log time (fields vary by recipe) |
createdAt | string | ISO 8601 UTC timestamp of document creation |
Meal type auto-detection
When logging viaPOST /api/consumos/:recetaId, the tipo is inferred automatically:
| Bogotá hour | Assigned tipo |
|---|---|
| 06:00 – 11:59 | desayuno |
| 12:00 – 16:59 | almuerzo |
| 17:00 – 05:59 | cena |
any (recipe category postres-snacks) | snack |
desayuno, almuerzo, cena) allow multiple entries per slot per day.
Endpoints
GET /api/consumos/hoy
Returns all consumption entries logged today in Bogotá time, sorted byhoraBogota ascending.
Response
GET /api/consumos/dias
Returns a deduplicated, descending-sorted list of every date (YYYY-MM-DD) that has at least one consumption record for the authenticated user.
Response
GET /api/consumos/dia/:fecha
Returns all consumptions for the specified day, sorted byhoraBogota ascending.
Path parameter
Target date in
YYYY-MM-DD format (Bogotá timezone).GET /api/consumos/semana/:lunes
Returns all consumptions for the 7-day week beginning on the given Monday date. Path parameterMonday date in
YYYY-MM-DD format. The window spans from this date to the following Sunday (inclusive).GET /api/consumos/mes/:yearMes
Returns all consumptions for the given calendar month. Path parameterMonth in
YYYY-MM format (e.g. 2024-05).GET /api/consumos/receta/:recetaId/hoy
Checks whether a specific recipe has already been logged today, and whether it can still be logged at the current Bogotá hour. Path parameterMongoDB ObjectId of the recipe to check.
| Field | Type | Description |
|---|---|---|
tipoActual | string | Meal slot that would be assigned right now |
registrado | boolean | true if this recipe has already been logged today |
consumoId | string | null | ObjectId of the existing entry, or null |
tipo | string | null | Meal type of the existing entry, or null |
bloqueado | boolean | true when the recipe cannot be logged again right now |
motivoBloqueado | string | null | Human-readable reason when bloqueado is true |
POST /api/consumos/:recetaId
Logs a recipe as consumed right now. Thetipo is inferred automatically from the current Bogotá hour (see auto-detection table above). No request body is accepted — the meal slot cannot be overridden on this endpoint. Use POST /api/consumos/manual if you need to choose the slot explicitly.
Path parameter
MongoDB ObjectId of the recipe to log.
201 Created
| Status | Condition |
|---|---|
404 | Recipe not found |
409 | Snack limit reached (max 3 per day) |
POST /api/consumos/manual
Logs a recipe manually, choosing any meal slot and any past or current date. Useful for retroactively recording meals. Request bodyMongoDB ObjectId of the recipe to log.
Meal slot:
desayuno, almuerzo, cena, or snack.Date in
YYYY-MM-DD format (Bogotá timezone). Must be a valid calendar date.201 Created
| Status | Condition |
|---|---|
400 | Invalid tipo or malformed fecha |
404 | Recipe not found |
409 | Snack limit reached (max 3/day) |
DELETE /api/consumos/:consumoId
Removes a consumption entry owned by the authenticated user. Path parameterMongoDB ObjectId of the consumption entry to delete.
200 OK
| Status | Condition |
|---|---|
400 | Invalid ObjectId format |
404 | Entry not found or does not belong to the authenticated user |
PUT /api/consumos/:consumoId/tipo
Updates the meal type of an existing consumption entry. Enforces the same snack cap and duplicate-slot rules as creation. Path parameterMongoDB ObjectId of the consumption entry to update.
New meal slot:
desayuno, almuerzo, cena, or snack.200 OK
| Status | Condition |
|---|---|
400 | tipo is not a valid value or ObjectId is malformed |
404 | Entry not found or not owned by the authenticated user |
409 | Changing to snack would exceed the 3-per-day cap, or the target meal slot is already occupied for that day |