Barcode Scanner

Scan a product's barcode to instantly fetch its matched dish and (optionally) create a new intake for the user.

You can combine barcode‑based intakes with image recognition flows and user confirmations.


Plan & Token Requirements

Feature available in the following LogMeal Plans:

Analyse
Monitor
Recommend
Custom

Accessible by the following User Types:

🔴 APIUser


What It Does

Barcode Scanner lets you identify packaged foods by EAN/UPC barcode and either retrieve the mapped dish or create an intake for the current user. Our product database includes millions of items across many countries and is periodically updated as new products appear.


When to Use It / Outcomes

  • You want a fast lookup for packaged products without taking a photo.
  • You need to add items to a food diary by scanning barcodes at the point of consumption.
  • You are building inventory or pantry flows that sync with user intakes.
  • Output: JSON containing matched dish/product name and, when creating an intake, the imageId/occasion/userId for the stored entry.

Feature-Specific Details

  • Two actions:

    • Lookup only → returns the dish id and product name from a barcode.
    • Create intakestores a new intake tied to the user and returns identifiers.
  • Input: barcode_id as an integer path parameter (e.g., 3029330022428).

  • Localization: Product coverage spans multiple countries; names depend on product sources and may vary by region.

  • Best paired with Ingredients/Nutrition features if you want per‑item nutrient breakdown after confirmation.


Related Endpoints

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


Typical Workflow

  1. Capture barcode in your app (camera or hardware scanner) and extract the numeric barcode_id.
  2. Choose one option:
  3. Show confirmation to the user and proceed to ingredient/quantity edits if needed.