Passa al contenuto principale

Create or update a batch of recipes

POST 

/recipes/batch

Batch operations allow you to create, update or delete multiple recipes at once. They are the most efficient way to work with the Eaternity API.

Non-atomic operations: Each recipe in the batch is processed independently. If one recipe fails validation or processing, other recipes in the batch will still be processed. Check the statuscode in each response item to identify failures.

Sub-recipe handling: If a recipe references a sub-recipe (ingredient with type: "recipes"), the sub-recipe must either:

  • Be included in the same batch request, OR
  • Already exist in the database from a previous request

The batch operations validate dependencies within the batch. If a sub-recipe is missing, you'll receive error code 612 (Referenced Sub-Recipe Not Found).

Recommended maximum: 100 recipes per request (not a hard limit).

Transient recipes: Set transient: true for sub-recipes that should not appear in monthly summaries. They only contribute to statistics when used as ingredients in non-transient recipes.

Request

Responses

Batch operation completed