Favorite Meals

Save a user's go‑to meals and reuse them in one tap. Favorites speed up logging by re‑applying saved dishes, ingredients and quantities to new intakes.

Plan & Token Requirements

Feature available in the following LogMeal Plans:

Analyse
Monitor
Recommend
Custom

Accessible by the following User Types:

🔴 APIUser


What It Does

Favorite Meals let users save a finalized meal configuration (dishes, ingredients and serving sizes) and reuse it later without re‑entering the details. Favorites are personal recipes only available for the user that creates them. Favorites can then be assigned to a brand‑new intake (manual intake) so diaries stay consistent and fast to maintain.


When to Use It / Outcomes

  • Users eat similar meals regularly and want one‑tap logging.
  • You want to increase diary adherence by reducing friction.
  • Output: JSON containing the user’s favorites list, create/edit/delete confirmations, or assignment result when applying a favorite to an intake.

Feature-Specific Details

  • A Favorite stores: a name, the saved meal composition (dishes, ingredients & quantities), and an internal favorite_image_id.
  • Create a favorite from an existing imageId (confirmed meal) and optionally set a custom name.
  • Assigning a favorite to an intake reuses all stored info (no need to re‑enter dishes/ingredients/amounts).
  • Edit lets you rename an existing favorite; Delete removes it from the user account.
  • List returns all favorites for the authenticated user.

Related Endpoints

Use the following endpoints to manage and reuse favorites:

  • GET /favorites → 🔴 List all favorites for the authenticated user.
  • POST /favorites → 🔴 Create a favorite from an existing imageId (optionally set a name).
  • PATCH /favorites → 🔴 Rename an existing favorite (favorite_image_id, name).
  • DELETE /favorites → 🔴 Delete a favorite by favorite_image_id.
  • POST /favorites/intake → 🔴 Assign a favorite to an intake by providing favorite_image_id and the target imageId (manual or image‑based).

Typical Workflow

  1. Create a favorite from a confirmed meal using POST /favorites.
  2. List favorites with GET /favorites.
  3. Assign a selected favorite to a new intake via POST /favorites/intake.
  4. (Optional) Rename or delete using PATCH /favorites or DELETE /favorites.
  5. Display the updated diary entry and nutrition in your app.