Skip to main content

Products

The Product API calculates environmental impact for packaged retail products based on their mandatory ingredient and nutrient declarations.

Overview

Use the Product API to:

  • Calculate CO2 footprint for retail products using ingredient declarations
  • Assess packaged foods based on nutrient information
  • Get environmental ratings for consumer products
Coordination Required

We only recommend using the Product Resources in tight coordination with the Eaternity team, as the calculations require additional supervision. Products are processed asynchronously — the API parses the ingredient declaration and builds a recipe-like structure to serve the usual indicators.

Product vs Recipe

Products are for retail items with ingredient declarations on their packaging (e.g., packaged carrot puree). The API parses the declaration text to derive composition. Recipes are for meals prepared in kitchens where you know the exact ingredients and amounts.

Product Properties

Request Properties

PropertyTypeRequiredDescription
idStringYesYour unique product identifier
gtinStringBest practiceGlobal Trade Item Number (www.gtin.info)
namesArrayYesProduct name as array of language objects: [{"language": "de", "value": "Karottenpuree"}]
amountFloatBest practiceAmount of the product in the specified unit. Default: 100
unitStringNoUnit: kg, gram, or liter. Default: gram
producerStringBest practiceThe producer or brand of the product
dateStringNoProduction date for seasonal calculations. Format: YYYY-MM-DD
ingredients-declarationStringYesList of ingredients as declared on packaging (in German). The API parses this text to determine product composition.
nutrient-valuesObjectYesNutrient values per 100g as declared on packaging (see Reference)
originStringBest practiceProduction location: postal address or country
transportStringBest practiceMeans of transport: air or ground
productionStringBest practiceProduction method: standard, greenhouse, organic, fair-trade, farm, wild-caught, sustainable-fish
processingStringNoProcessing level: raw, unboned, boned, skinned, beheaded, fillet, cut, boiled, peeled
conservationStringBest practiceStorage method: fresh, frozen, dried, conserved, canned, boiled-down
packagingStringNoPackaging type: none, plastic, paper, pet, tin, alu, glas, cardboard, tetra

Request Example

{
"id": "180320201",
"date": "2020-02-02",
"gtin": "00123456789023",
"names": [
{
"language": "de",
"value": "Karottenpuree"
}
],
"amount": 20,
"unit": "gram",
"producer": "hipp",
"ingredients-declaration": "Karotten, Tomaten",
"nutrient-values": {
"energy-kcal": 200,
"fat-gram": 12.3,
"saturated-fat-gram": 2.5,
"carbohydrates-gram": 8.4,
"sucrose-gram": 3.2,
"protein-gram": 2.2,
"sodium-chloride-gram": 0.3
},
"origin": "paris, frankreich",
"transport": "ground",
"production": "standard",
"processing": "raw",
"conservation": "fresh",
"packaging": "none"
}

Async Processing

Products are processed asynchronously:

  1. Create a product via PUT /products/{id} — returns 202 Accepted
  2. Retrieve results via GET /products/{id}:
    • Returns 601 with message "This product has not yet been processed." if still processing
    • Returns 202 with full results once processing is complete

Response Properties

PropertyTypeDescription
namesArrayProduct names as array of language objects
idStringProduct identifier
co2-valueIntegerCO₂ emissions in grams CO₂e for the specified amount
ratingStringCO₂ rating (A-E). A is best, E is worst.
eaternity-awardBooleantrue if the product is climate friendly
co2-value-improvement-percentageFloatComparison of this product's CO₂ footprint per food unit to the average
co2-value-reduction-valueFloatGrams of CO₂ saved compared to an average product providing the same nutritional value
foodUnitFloatNutritional value of the product for the given amount
amountFloatProduct amount
gtinStringGlobal Trade Item Number
unitStringUnit of measurement
dateStringProduction date
info-textStringNotes on the calculation (e.g., "No cooking date was provided.")
ingredients-declarationStringThe original ingredient declaration text
ingredientsArrayParsed ingredients with individual ratings and CO₂ values
nutrient-values-estimated-per-specified-amountObjectBackend-estimated nutrient values scaled to the specified amount (when nutrient-values=true parameter is set)
indicatorsObjectEnvironmental indicators (when indicators=true parameter is set)

Response Example

{
"names": [
{
"language": "de",
"value": "Karottenpuree"
}
],
"id": "180320201",
"co2-value": 478,
"co2-value-improvement-percentage": -41.0,
"co2-value-reduction-value": -140.0,
"foodUnit": 0.3,
"amount": 20,
"gtin": "00123456789023",
"unit": "gram",
"info-text": "No cooking date was provided.",
"eaternity-award": true,
"rating": "A",
"date": "2020-02-02",
"ingredients-declaration": "Karotten, Tomaten",
"ingredients": [
{
"id": "FoodServiceb7a7f176-690b-11ea-9516-ae471177f174",
"names": [
{
"language": "de",
"value": "Karotten"
}
],
"amount": 100.0,
"unit": "gram",
"origin": "",
"transport": "",
"gtin": "",
"rating": "A",
"bar-chart": 100,
"co2-value": 32,
"foodUnit": 0.11
}
]
}

Endpoints