Skip to main content
Mutasib supports barcode lookups in two places: your shop’s own inventory, and the global OpenFood Facts database. Use the shop barcode endpoint at the point of sale to retrieve a product instantly by scanning its barcode. Use the OpenFood endpoints to look up, search, and browse product data from a crowd-sourced global database of millions of packaged goods.

Shop barcode lookup


GET /api/v1/shops/{shop_id}/products/barcode/{barcode}/ Searches your shop’s product inventory for a product matching the given barcode. This is the primary endpoint for POS barcode scanning — it returns the full product record if a match is found.
Returns 200 OK with a ProductOut object if a product with that barcode exists in your shop. Returns 404 Not Found if no match is found.
When a barcode scan returns 404 in your shop, use the OpenFood barcode lookup to check the global database, then create the product in your shop with POST /api/v1/shops/{shop_id}/products/.

OpenFood barcode lookup


GET /api/v1/products/barcode/{barcode} Looks up a barcode in the OpenFood Facts global product database. This is useful for getting product names, images, and ingredient data for packaged goods without manually entering them.

Query parameters

string
default:"\"world\""
Restrict results to products available in a specific country locale (e.g., "sa" for Saudi Arabia, "eg" for Egypt). Defaults to "world" for global results.
Returns 200 OK with the product data from OpenFood Facts, including name, brand, image URL, and nutritional information where available. Returns 404 Not Found if the barcode is not in the OpenFood database.
OpenFood Facts is a community-maintained database. Data quality varies by product and region. Always review the returned data before importing it into your shop.


GET /api/v1/products/search Searches the OpenFood Facts database by product name or keyword. Use this to browse the global catalog when you do not have a barcode available.

Query parameters

string
required
The search query (e.g., "milk", "olive oil", "rice").
integer
default:"1"
Page number for paginated results.
integer
default:"10"
Number of results per page.
string
default:"\"world\""
Filter results by country locale.
Returns 200 OK with a paginated list of OpenFood product objects matching the search query.

OpenFood browse by category


GET /api/v1/products/browse/{category} Browses the OpenFood Facts database by a category slug (e.g., dairy, beverages, snacks). Useful for discovering products to add to your shop when building a new catalog from scratch.

Path parameter

string
required
The OpenFood Facts category slug to browse (e.g., "dairy", "breads", "soft-drinks").

Query parameters

integer
default:"1"
Page number for paginated results.
integer
default:"12"
Number of results per page.
string
default:"\"world\""
Filter results by country locale (e.g., "sa" for Saudi Arabia, "eg" for Egypt). Defaults to "world" for global results.
Returns 200 OK with a paginated list of OpenFood product objects in the specified category.
Use OpenFood lookup, search, and browse to enrich your catalog. When you have the data you need, create the product in your shop with POST /api/v1/shops/{shop_id}/products/.