Edit a recipe
Edits one of the account’s recipes. New ingredients or portions recompute the nutrition. If the recipe is already used in a meal plan, template or exchange group and its nutrition changes, the answer is a copy with a new _id that replaces it from now on, and existing plans keep the old values.
Requires the library:write permission.
/recipes/{recipe_id}AuthorizationToken Bearer (API Key) · headerobligatorioAlmendra API key, bound to one professional account. Send it as Authorization: Bearer YOUR_API_KEY.
library:writerecipe_idstringobligatorioRecipe ID
application/jsonnamestringportionsintegeringredientsIngredientInput[]Mostrar propiedadesOcultar propiedades
IngredientInputfoodstringobligatorioFood ID (GET /foods)
quantitynumberobligatoriounitstringGrams (g, the default) or one of the food's measures (measures[].description in GET /foods/{food_id}).
instructionsstring[]tagsstring[]preparationTimeMinutesintegercookingTimeMinutesintegerdifficultystringeasymediumhardisPublicbooleanRecipe edited
_idstringobligatorionamestringobligatorioportionsnumberpreparationTimeMinutesnumbercookingTimeMinutesnumbercaloriesKcalnumberproteinGnumbercarbsGnumberfatGnumbertagsstring[]obligatorioimageUrlstringisPublicbooleanobligatorioShared with every Almendra account
isDraftbooleanobligatorioStill being written (not yet offered in meal plans)
createdByThisAccountbooleanobligatoriodifficultystringingredientsRecipeIngredient[]obligatorioMostrar propiedadesOcultar propiedades
RecipeIngredientfoodstringFood ID (left out in other accounts' public recipes)
foodNamestringobligatorioquantitynumberobligatoriounitstringobligatorioinstructionsstring[]obligatorionutrientsobjectobligatorioEvery other nutrient the food has, per 100 g, keyed by name and unit (sodium_mg, vitaminB12_ug, …).
measuresFoodMeasure[]obligatorioHousehold measures and their weight in grams, including the account's own measures for this food. A meal plan's unit is one of these (or grams).
Mostrar propiedadesOcultar propiedades
FoodMeasureamountnumberobligatoriodescriptionstringobligatoriogramsnumberobligatorioInvalid path parameter, query parameter or request body
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.
Missing or invalid API key
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.
The account behind the API key has no active paid plan, or the key lacks the permission this operation needs
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.
Not one of the account's recipes, or an ingredient was not found
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.
Request body sent without Content-Type: application/json
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.
Rate limit exceeded (600 requests per 60 seconds); retry after Retry-After seconds
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.
Unexpected server error
successbooleanobligatoriofalsemessagestringobligatorioSame as error.message.
errorobjectobligatorioMostrar propiedadesOcultar propiedades
statusintegerobligatorioHTTP status code of the response.
codestringobligatorioMachine-readable error code, stable across versions; branch on this rather than on message.
bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeoutmessagestringobligatorioHuman-readable explanation of what went wrong.