Intakes History
Plan & Token Requirements
Feature available in the following LogMeal Plans:
Accessible by the following User Types:
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_fromanddate_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
languageparameter (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_idto 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_fromanddate_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.
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
- 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 2 months ago
