Menu
Docs
/
API Reference

API Documentation

Integrate allergen detection into your marketplace with our REST API.

Introduction

The Nutriflows API allows you to analyze product ingredients for allergens in real-time. Designed for marketplaces and e-commerce platforms, it helps ensure safety and compliance for your customers.

Authentication

Authenticate your requests using the x-api-key header. You can generate an API key from your dashboard.

Authorization: Bearer YOUR_API_KEY

Analyze Ingredients

POST

Analyze a single product or a batch of products to detect allergens.

Endpoint/api/allergens/analyze
{
  "ingredients": "wheat flour, milk, eggs, soy lecithin...",
  "productId": "SKU-123",
  "productName": "Chocolate Cookies",
  "language": "en", 
  "allergensToCheck": ["gluten", "milk", "eggs"]
}

Response

{
  "success": true,
  "data": {
    "detectedAllergens": [
      {
        "id": "gluten",
        "name": "Gluten",
        "confidence": 95,
        "matchedKeywords": ["wheat flour"]
      }
    ]
  }
}

Filter Products

POST

Filter a list of products to find those safe for specific allergens.

Endpoint/api/allergens/filter
{
  "products": [
    { "productId": "1", "ingredients": "wheat..." },
    { "productId": "2", "ingredients": "rice..." }
  ],
  "excludeAllergens": ["gluten"]
}

List Allergens

GET

Get a list of all supported allergens and their localizations.

GET /api/allergens?language=en

Allergen IDs Reference

Use these IDs for filtering and analysis configuration.

gluten
peanuts
treeNuts
milk
eggs
soy
fish
shellfish
sesame
sulfites
celery
mustard
lupin