Update User Defined Recipe

This API available only for user access-token integration
PUT
/v1beta/:recipeId

Endpoint allows to update user defined recipe.

Updating a recipe is atomic. You need to override the whole recipe. If some fields are skipped they will be deleted from a recipe.

Request parameters

ATTRIBUTETYPEDESCRIPTION
fieldsarray [string]

Extra fields to return on recipe

Possible values: normalizedIngredients, instructions, nutrition.

Request Body

ATTRIBUTETYPEDESCRIPTION
payloadRecipePayload

Recipe Payload

ATTRIBUTETYPEDESCRIPTION
name*string

recipe name

descriptionstring

recipe description

ingredientsarray [RawIngredient]

recipe ingredients

imagesarray [OriginalImage]

recipe images

instructionsRecipeInstructions

recipe instuction steps

durationsRecipeDurations

recipe cooking timing

sourceManualRecipeSource

source of the recipe, e.g. web site

servingsnumber

number of servings

Sample Request

curl -X PUT "https://graph.whisk.com/v1beta/1070c26c320ce194efca97093e72517b4e7" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Token Access-Token>" \ -d '{ "payload": { "name": "Home made pasta", "description": "Pasta with tomato souce", "ingredients": [ { "text": "Pappardelle pasta" }, { "text": "5 tomatoes" }, { "text": "3tbs of olive oil" } ] } }'

Response

ATTRIBUTETYPEDESCRIPTION
id*string
name*string
descriptionstring
numberOfServingsnumber

Original number of servings

ingredientsarray [RawIngredient]
normalizedIngredientsarray [NormalizedIngredient]
instructionsRecipeInstructions
imagesarray [ImageContainer]
sourceRecipeSource
durationsRecipeDurations
nutritionRecipeNutrition
constraintsRecipeConstraints
savedRecipeSaved

Information about collections

RawIngredient

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring

NormalizedIngredient

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring
analysisRecipeIngredientAnalysis

RawIngredient

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring

RecipeIngredientAnalysis

ATTRIBUTETYPEDESCRIPTION
product*string
canonicalName*string
quantitynumber
unitstring
multipliernumber
brandstring
commentstring
categorystring

RecipeInstruction

ATTRIBUTETYPEDESCRIPTION
text*string
groupstring
imagesarray [ImageContainer]

RecipeInstructions

ATTRIBUTETYPEDESCRIPTION
steps*array [RecipeInstruction]

ProductCategory

ATTRIBUTETYPEDESCRIPTION
name*string

ImageContainer

ATTRIBUTETYPEDESCRIPTION
url*string

original image url, depricated. Please use field original instead

originalOriginalImage

original image information, e.g. image url

responsive*ResponsiveImage

ResponsiveImage

ATTRIBUTETYPEDESCRIPTION
url*string

Hosted url of an image

width*integer

Image width

height*integer

Image height

OriginalImage

ATTRIBUTETYPEDESCRIPTION
url*string

URL of the image

RecipeSource

ATTRIBUTETYPEDESCRIPTION
name*string
displayNamestring
sourceRecipeUrlstring
licensestring
imageImageContainer

RecipeLabels

ATTRIBUTETYPEDESCRIPTION
mealType*array [RecipeLabel]
cuisine*array [RecipeLabel]
category*array [RecipeLabel]

RecipeLabel

Some RecipeLabel description

ATTRIBUTETYPEDESCRIPTION
name*string
displayName*string

RecipeDurations

ATTRIBUTETYPEDESCRIPTION
cookTimenumber

Cooking time in minutes

prepTimenumber

Preparation time in minutes

totalTimenumber

Total time in minutes

RecipeConstraints

ATTRIBUTETYPEDESCRIPTION
violates*ConstraintsCollection

Constraints which are violated in a recipe

ConstraintsCollection

ATTRIBUTETYPEDESCRIPTION
diets*array

List of diets

Possible values: lacto-vegetarian, ovo-vegetarian, ovo-lacto-vegetarian, pescatarian, vegan, vegetarian.
avoidances*array

List of avoidances and intolerances

Possible values: celery, crustacean, egg, fish, groundnut, milk, mollusc, mustard, sesame, soybean, sulphites, tree-nut, wheat.

RecipeSaved

ATTRIBUTETYPEDESCRIPTION
valueboolean

True if this recipe is saved to favorites

collectionIdsarray [string]
ownerboolean

If current user is owner of the recipe

typeenum

Recipe type

Possible values: manual, imported.

RecipeAuthor

ATTRIBUTETYPEDESCRIPTION
name*string
imageImageContainer

Sample Response

{ "recipe": { "id": "1070c26c320ce194efca97093e72517b4e7", "name": "Home made pasta", "description": "Pasta with tomato souce", "ingredients": [ { "text": "Pappardelle pasta" }, { "text": "5 tomatoes" }, { "text": "3tbs of olive oil" } ], "saved": { "value": true, "collectionIds": [ "cd037513c9e149a1b707e85eab1fc7f6" ], "owner": true, "type": "manual" } }, "status": "success" }