Edit a recipe for a company dish. If the dish doesn't have a recipe, a new one will be created.
This endpoint allows you to modify the default dish name (used for display purposes) and add new translations.
The ingredient and nutritional information follows these rules:
-
If both
ingredient_listandnutritional_indicatorsare provided, both are stored using the supplied values.
In this case,auto_computed_nutritional_indicatorsindicates whether the nutritional information was automatically calculated.
If this field is omitted, it defaults tofalse, meaning the nutritional information is considered manually provided. -
If only
ingredient_listis provided, the nutritional information is automatically calculated from the valid
LogMeal ingredients included in the recipe, andauto_computed_nutritional_indicatorsis set totrue.
Ingredients provided usingingredientNameinstead ofingredientIdare not considered for this calculation.
Only valid and existing LogMeal ingredient IDs are used. -
If only
nutritional_indicatorsis provided, the recipe's ingredient and nutritional information is not updated.
Nutritional indicators must be provided together with an ingredient list to apply a manual nutritional update.
The origin of ingredient and nutritional data can be specified using ingredients_source and nutrition_source.
These fields are optional and indicate how the data was obtained (for example, LogMeal database, import, or an external provider).
You can also assign a sample image to the dish, which will be associated with it for display purposes.
The image file must be in JPG or JPEG format.
The request can be sent in two formats:
application/json: use this format when updating recipe data without uploading an image.multipart/form-data: serialize the recipe payload in thedatafield and optionally provide an image in theimagefield.
The JSON object contained in data follows the same structure as the application/json payload.
Legacy multipart requests that provide the recipe fields directly as form fields remain supported for backwards compatibility, but new integrations should use the data field.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
401Unauthorized
403Access denied
404Dish not found.
