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.


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
anddate_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:
- GET /history/getIntakesList → ⚫ 🔴 🔵 List all intakes with nutrients & ingredients between
date_from
anddate_to
. - GET /intake → ⚫ 🔴 🔵 Retrieve all info for a specific intake including nutrients, ingredients, etc.
- GET /history/getDailySummary → ⚫ 🔴 🔵 Daily summary for a given
date
("%Y/%m/%d"
). - GET /history/getWeeklySummary → ⚫ 🔴 🔵 Weekly summary starting at
date
("%Y/%m/%d"
). - GET /history/getTotalIntakeByDay → ⚫ 🔴 🔵 Totals for today (24h window).
- GET /history/getTotalIntakeByDay/{date} → ⚫ 🔴 🔵 Totals for a specific date (
YYYY-MM-DD
). - GET /history/hasIntake → ⚫ 🔴 🔵 Check presence/number of intakes on a date or date range.
Typical Workflow
- Choose the view: list (date range), summary (day/week), or total (by day).
- Call the endpoint with the appropriate parameters (
date_from
/date_to
,date
,user_id
,language
). - Parse response: render intake cards or aggregated totals in charts.
- Store & analyze: persist results to power streaks, reminders, and trend analytics.
Updated about 11 hours ago