Occasion Detection

Automatically assign a meal occasion (Breakfast, Lunch, Dinner, Snack) to each intake based on registration time. Supports custom occasion groups and manual overrides.

See also: Custom Occasions to define personalized occasions your users.


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

Occasion Detection labels each intake with an occasion according to the time of food registration (e.g., Breakfast, Lunch, Dinner, Snack). Default time windows are provided out‑of‑the‑box and you can customize occasions to fit your product. Users (or your app) can also manually change the occasion of an existing intake.


When to Use It / Outcomes

  • You want to group meals by time of day (breakfast/lunch/dinner/snack) in calendars and diaries.
  • You need occasion‑aware analytics (e.g., Nutri‑Score by meal, variety by occasion).
  • You want to trigger reminders or coaching based on missing/intense intake at certain times.
  • Output: Each intake stores an occasion label; it is visible in history endpoints and can be modified later.

Feature-Specific Details

  • Default mapping (server‑side):

    • 06:00–10:00 → Breakfast
    • 12:00–15:00 → Lunch
    • 18:00–23:00 → Dinner
    • Outside these windows → Snack
  • Customization: Define custom occasion groups and translations for your app.

  • Manual override: You can modify the occasion of a previously uploaded intake.

  • Timezone aware: Detection takes the user's assigned timezone into account.

  • Downstream use: Occasions can be used to group daily intakes and power per‑occasion scores.


Related Endpoints

Remember to check applicable request limitations inside each of the endpoints.


Typical Workflow

  1. Create an intake using your preferred intake input flow (image, barcode, manual).
  2. The system assigns an occasion automatically from the registration time (considering timezone and custom groups).
  3. Optionally override the detected occasion via POST /intake/modifyOccasion.
  4. Query history with GET /history/getIntakesList to display meals grouped by occasion.
  5. Compute per‑occasion insights (e.g., Nutri‑Score) using the related scoring endpoints if desired.