Barcode Scanner
You can combine barcode‑based intakes with image recognition flows and user confirmations.
Plan & Token Requirements
Feature available in the following LogMeal Plans:
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 intake → stores 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
- POST /barcode_scan/{barcode_id} → 🔴 Scan & lookup a barcode and return dish id and product name.
- POST /intake/barcode_scan/{barcode_id} → 🔴 Scan & create a new intake for the user.
Remember to check applicable request limitations inside each of the endpoints.
Typical Workflow
- Capture barcode in your app (camera or hardware scanner) and extract the numeric barcode_id.
- Choose one option:
- For lookup, call POST /barcode_scan/{barcode_id} and display the matched product/dish.
- To log it, call POST /intake/barcode_scan/{barcode_id} to create the intake.
- Show confirmation to the user and proceed to ingredient/quantity edits if needed.
Updated about 11 hours ago