Intakes History

Query a user's food diary between dates and retrieve totals and summaries per day or week. Power calendars, streaks, and progress dashboards.

Plan & Token Requirements

Feature available in the following LogMeal Plans:

Analyse
Monitor
Recommend
Custom

Accessible by the following User Types:

⚫ APICompany | šŸ”“ APIUser | šŸ”µ APIUserManager

What It Does

Intakes History provides access to a user's logged meals (intakes) over time and their nutritional roll‑ups.
You can fetch the list of intakes between two datetimes (including per‑intake nutrients and ingredients), get daily/weekly summaries, and compute total intake by day to drive progress UIs.
Food intakes include image-based food recognition requests, manual inputs, intakes based on barcode scans, personal favorites or custom recipes. See the complete list of ways to insert food intakes.

dishes to be included in the nutritional history calendar
intake history food diary list card

When to Use It / Outcomes

  • You’re building a food diary.
  • You want daily or weekly dashboards showing totals and trends.
  • You need to check if a user has any intake on a given day (for reminders/streaks).
  • Output: JSON containing intake entries with nutrients and ingredients; or summaries/totals for the requested period.

Feature-Specific Details

  • Date/Time filters: Use date_from and date_to (format "%Y/%m/%d, %H:%M:%S") to list intakes in a period.
  • Daily/Weekly summaries: Provide aggregated nutrient values for a specific date ("%Y/%m/%d") or week starting from a given date.
  • Totals by day: Compute the sum of nutrients consumed from images uploaded on a date (24‑hour span).
  • Language: Localize dish and ingredient labels with the language parameter (e.g., eng, spa, ita, etc.). If no language is provided, the user-specific language will be used.
  • User scope: For šŸ”µ APIUserManager and ⚫ APICompany, pass user_id to query a specific user; for šŸ”“ APIUser, it defaults to the token’s user.
  • Timezone: History endpoints apply the platform’s date boundaries; align UI with the user’s timezone for consistent ā€œtoday/this weekā€ views.

Related Endpoints

Use the following endpoints to retrieve intakes history and summaries:

Energy contribution fields

In /history/getIntakesList and /intake/\{imageId\}, energy-contributing nutrients include %EC (energy contribution) fields inside nutritional_info.totalNutrients.

For example:

"PROCNT": {
  "label": "Protein",
  "quantity": 34.75,
  "unit": "g",
  "energy_kcal": 139.0,
  "energy_factor_kcal_per_g": 4.0,
  "energy_contribution_percentage": 10.63
}

The percentage is calculated against the calories of that individual intake.


Typical Workflow

  1. Choose the view: list (date range), summary (day/week), or total (by day).
  2. Call the endpoint with the appropriate parameters (date_from/date_to, date, user_id, language).
  3. Parse response: render intake cards or aggregated totals in charts.
  4. Store & analyze: persist results to power streaks, reminders, and trend analytics.

Did this page help you?