Skip to main content

Errors

The API answers with standard HTTP status codes and a few Eaternity-specific codes. In a batch, each item has its own statuscode.

Success Codes​

CodeDescription
200Request succeeded
201Resource created successfully
202Request accepted for async processing (Products)
204Resource deleted successfully (no content)

Client Error Codes​

CodeDescription
400Bad request - malformed JSON or invalid content
401No authorization - valid API key not provided
403Forbidden - kitchen not authorized for calculations
404Not found - requested resource does not exist
405Method not allowed
413Payload Too Large

Server Error Codes​

CodeDescriptionAction
500Server ErrorRetry the request, or contact support

Validation Error Codes​

CodeDescriptionAction
422Request Validation Error — request does not match the expected schema (e.g., integer where string was expected)Fix the request format

Processing Error Codes (Eaternity-specific)​

These custom status codes indicate specific processing issues:

CodeNameDescriptionAction
601Manual Matching MissingNo longer returned. An unmatched ingredient returns 602.—
602No Automatic MatchAt least one ingredient name could not be automatically matched in the Eaternity DatabaseRetry once daily or try a different ingredient name
610Missing Required PropertyA required resource property was not given in the requestProvide the required field
611Wrong Property ValueA resource property was not provided according to the documentation — wrong format or invalid valueFix the property value
612Reference Not FoundAn ingredient references a recipe (type: recipes) or a product (type: products) that is not storedCreate it first, or include the sub-recipe in the same batch
613Write To A Product DeniedEither a recipe/supply tried to define an ingredient under an id that belongs to a product, or a product write would convert an existing ingredient into oneReference the product with type: "products" instead of defining it. To convert an ingredient on purpose, add convert-ingredient-to-product=true.
670Recipe Has No IngredientsA sub-recipe was referenced with a positive quantity but has no ingredients itselfAdd ingredients to the sub-recipe

Additional implementation-specific codes​

The following codes are returned by the calculation engine for specific processing failures. They are not documented in the canonical API specification but may appear in practice.

CodeNameDescriptionAction
671Missing LCA InventoryNo life cycle inventory found for ingredientContact support with term details
672Missing NutrientsNo nutrient data found for ingredientContact support with term details
673Failed Amount EstimationCould not estimate ingredient amountCheck declaration format
674Failed Ingredient SplitterCould not parse ingredient declarationSimplify ingredient declaration
675Unknown UnitIngredient unit not recognizedUse standard units (gram, liter)
678CO2 Calculation FailedCannot calculate CO2 valueCheck ingredient data completeness
679VitaScore Calculation FailedCannot calculate VitaScoreCheck nutrient data availability
680Environment Score FailedCannot calculate environment scoreCheck environmental data availability

Handling 6xx Errors​

The 6xx error codes are specific to Eaternity's calculation system:

  • 602: Occurs when an ingredient cannot be matched to the Eaternity database. The matching process runs daily, so retry after 24 hours or try a more common ingredient name.

  • 610/611: These relate to missing or invalid request properties. Check the request against the API documentation.

  • 612: Verify that sub-recipes and products are created before referencing them, or include sub-recipes in the same batch request.

  • 613: Products are write-protected — only the product endpoints may change them. Reference a product from a recipe with type: "products" rather than redefining it under the same id.

  • 670: Ensure sub-recipes contain at least one ingredient before referencing them.

  • 671-680: These indicate calculation engine issues. Check that ingredient declarations are properly formatted and use standard units.