Skip to main content

Documentation 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.

The Recommendations API generates fully personalized tips by combining the authenticated user’s health profile, biometric data (weight, height, birth date), and 30-day consumption history. All routes require a valid Bearer token.
The recommendation engine reads only healthProfile.condiciones and healthProfile.categorias. It does not read alergias or preferencias — those fields are chat-only and have no effect on recommendations.

How the engine works

TDEE calculation

The engine derives a daily calorie target (TDEE) from the user’s weight (kg), height (cm), and birthDate using a gender-neutral Mifflin-St Jeor approximation. The activity factor is inferred from the user’s BMI category as a statistical proxy for sedentariness:
BMI categoryActivity factor
bajo_peso (underweight)1.45
normal1.55
sobrepeso (overweight)1.48
obesidad (obese)1.375
A metabolic aging correction is also applied: −3% after age 40, −7% after age 60.

30-day history analysis

The engine queries consumption records from the last 30 days to compute:
  • Daily calorie averages compared to the calculated TDEE
  • Average macronutrient intake (protein, carbs, fat, sodium, fiber, sugar)
  • Skipped-meal detection — if a meal type appears on fewer than 50% of logged days, a comidasSaltadas warning is generated
  • Real-time micronutrient alerts for today’s cumulative intake

Health condition identifiers

The engine recognises the following string identifiers for healthProfile.condiciones:
IdentifierFocus
diabetesLow-GI foods, carb distribution, insulin sensitivity
hipertensionSodium < 1,500 mg/day, DASH diet, potassium
bajo-sodioSodium < 1,500 mg/day, label reading
enfermedad-renalSodium, potassium, phosphorus limits; protein moderation
colesterol-altoSaturated fat < 15 g/day, dietary cholesterol < 200 mg/day
ketoNet carbs < 50 g/day, high fat macros
bajo-carbohidratosTotal carbs < 100 g/day
sin-azucarSugar < 10 g/day
bajo-grasaFat < 50 g/day
paleoWhole foods, no grains or legumes
veganoPlant-only, B12 supplementation, protein combining
vegetarianoNo meat, adequate B12 and zinc from eggs/dairy
celiacoStrict gluten elimination
intolerancia-lactosaLactase-friendly substitutes
gastritisSmall frequent meals, no fasting > 4 hours
sindrome-intestinoLow-FODMAP guidance, stress management
sin-frutos-secosNut-free label warnings
sin-mariscosShellfish-free guidance, omega-3 alternatives

Endpoints

GET /api/recomendaciones

Generates and returns a full personalised recommendation set for the authenticated user. Response
{
  "ok": true,
  "nombre": "María",
  "recomendaciones": {
    "imc": { "valor": 23.4, "categoria": "normal" },
    "caloriasObjetivo": 1850,
    "caloriasHoy": 1100,
    "caloriasRestantes": 750,
    "progresoHoy": 59,
    "alertas": [
      { "tipo": "imc", "mensaje": "Tu IMC es 23.4 (rango saludable)...", "nivel": "ok" },
      { "tipo": "meta_proteina", "mensaje": "Tu objetivo de proteína diaria es 56g...", "nivel": "info" }
    ],
    "alertasHoy": [
      { "tipo": "sodio_hoy", "mensaje": "Llevas 1600mg de sodio hoy...", "nivel": "advertencia" }
    ],
    "contextoHorario": [
      { "texto": "Aún no registras desayuno...", "nivel": "info" }
    ],
    "alimentacion": [
      "Prioriza alimentos con índice glucémico bajo: avena, lentejas, vegetales sin almidón."
    ],
    "ejercicio": [
      "Caminar 30 minutos después de las comidas principales reduce la glucosa postprandial."
    ],
    "ejercicioHoy": [
      "Tu balance calórico está equilibrado. Mantén tu rutina habitual de actividad física."
    ],
    "hidratacion": {
      "litros": 2.5,
      "vasos": 10,
      "nota": "Distribuye el agua a lo largo del día; no la consumas toda de una vez."
    },
    "comidasSaltadas": [
      { "tipo": "desayuno", "mensaje": "Registras desayuno solo el 30% de los días..." }
    ],
    "condicionesDetectadas": ["diabetes"],
    "categoriasActivas": ["almuerzo"],
    "nutriPromedio": {
      "calPromedio": 1780,
      "protPromedio": 62,
      "carbPromedio": 215,
      "grasaPromedio": 58,
      "sodioPromedio": 1820,
      "fibraPromedio": 18
    },
    "macrosHoy": { "carbPct": 52, "protPct": 20, "grasPct": 28 },
    "coberturaAlimentacion": true,
    "coberturaEjercicio": true
  }
}

Response fields

FieldTypeDescription
okbooleanAlways true on success
nombrestringAuthenticated user’s display name
recomendaciones.imcobjectBMI value and category (bajo_peso, normal, sobrepeso, obesidad)
recomendaciones.caloriasObjetivonumber | nullCalculated TDEE in kcal; null if biometrics are missing
recomendaciones.caloriasHoynumberTotal kcal logged today
recomendaciones.caloriasRestantesnumber | nullRemaining kcal budget for the day
recomendaciones.progresoHoynumberPercentage of TDEE consumed today (capped at 150)
recomendaciones.alertasarrayGeneral alerts — BMI, historical calorie/sodium/sugar balance, protein target, condition conflict warnings
recomendaciones.alertasHoyarrayReal-time micronutrient alerts based on today’s intake
recomendaciones.contextoHorarioarrayTime-of-day contextual messages (skipped meals, meal timing advice)
recomendaciones.alimentacionarrayDeduplicated list of dietary tips driven by conditions and categories
recomendaciones.ejercicioarrayDeduplicated list of exercise tips
recomendaciones.ejercicioHoyarrayExercise recommendation calibrated to today’s calorie surplus or deficit
recomendaciones.hidratacionobjectDaily water target (litros, vasos, nota)
recomendaciones.comidasSaltadasarrayMeal types skipped on > 50% of logged days in the last 30 days
recomendaciones.condicionesDetectadasarrayConditions read from healthProfile.condiciones
recomendaciones.categoriasActivasarrayCategories read from healthProfile.categorias
recomendaciones.nutriPromedioobject30-day daily averages for key nutrients
recomendaciones.macrosHoyobjectToday’s macronutrient split as percentages of total kcal
recomendaciones.coberturaAlimentacionbooleantrue if the engine produced at least one dietary tip
recomendaciones.coberturaEjerciciobooleantrue if the engine produced at least one exercise tip

Alert and message nivel values

nivelMeaning
okWithin healthy range
infoInformational note
advertenciaWarning — action suggested
atencionAttention required — clinically relevant
curl https://api.healtyhelp.com/api/recomendaciones \
  -H "Authorization: Bearer <token>"

GET /api/recomendaciones/filtros

Returns only the two health-profile fields that drive the recommendation engine. Use this endpoint to read the current active conditions and categories without fetching the full recommendation set. Response
{
  "condiciones": ["diabetes", "hipertension"],
  "categorias": ["almuerzo", "cena"]
}
FieldTypeDescription
condicionesstring[]Active health condition identifiers from healthProfile.condiciones
categoriasstring[]Active meal category filters from healthProfile.categorias
This endpoint deliberately omits alergias and preferencias. Those fields belong exclusively to the NutriBot chat context and do not influence recipe recommendations. Use GET /api/chat/filtros to read the full chat health profile.
curl https://api.healtyhelp.com/api/recomendaciones/filtros \
  -H "Authorization: Bearer <token>"

Build docs developers (and LLMs) love