Summary: Updates existing foods with the FoodEdit instances provided.
Request Type: UpdateFoodRequest
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
POST http://localhost:80/rest/FoodEditService.svc/UpdateFood HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={ "IngredientsEdits":[{ "Ingredients":[{ "Id":"752eb9c2-e240-0001-bede-d3a51c0fdeba", "Name":{"en-US":"Updated Ingredient Name"}, "CommonName":{"en-US":"Updated Ingredient Common Name"}, "UserCode":"xyz-12", "Brand":{ "Supplier":"Am Sweeteners - Middlesex", "Product":"Product X" }, "DefiningAmount":{ "Quantity":{ "Type":"Double", "Value":100 }, "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6" }, "AllergenStatements":[{ "AllergenGroupIds":[ "f01975c0-0191-0000-ff88-2a01e505d63d", ] }], "IngredientStatementSettings":[ { "ItemsOverrideText":{"en-US":"Item One, Item Two, Item Three"}, "StatementNameOverride":{"en-US":"Custom Ingredient Statement"}Item One, Item Two, Item Three", "CompositionBehavior "es-MX":"Override" Artículo Uno, Artículo Dos, Artículo Tres", } ]"fr-CA":"Article Un, Article Deux, Article Trois" "GroupsIds":[ "6748e1fb-0002-0000-1900-705b14f8f910"}, ], "AmountCostStatementNameOverride":{ "Amount":{ "en-US":"Custom "Quantity":{Ingredient Statement", "Typees-MX":"DoubleDeclaración de ingredientes personalizada", "Valuefr-CA":100"Déclaration d'ingrédients personnalisée" }, "UnitIdCompositionBehavior":"a7df0af5-0008-0000-7484-751e8eaf05c6Override" }, ], "CostGroupsIds":"5"[ "6748e1fb-0002-0000-1900-705b14f8f910" } }], "NutrientProfileAmountCost":{ "IdAmount":"b6fa0af5-0008-0000-7484-751e8eaf05c6",{ "DefiningAmount":{ "Quantity":{ "Type":"Double", "Value":100 }, "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6" }, "NutrientIdVectorCost":[{"5" } "NutrientId":"84a8709a-0000-0000-ebf9-90cea7d9d44f"}], "NutrientProfile":{ "QuantityId":{"b6fa0af5-0008-0000-7484-751e8eaf05c6", "DefiningAmount":{ "TypeQuantity":"Double",{ "Type":"Double", "Value":4100 }, }, "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6" }, }, "NutrientIdVector":[{ "NutrientId":"84a8709a-00010000-0000-ebf9-90cea7d9d44f", "Quantity":{ "Type":"Double", "Value":14 }, }, { ] }, "NutrientId":"84a8709a-0001-0000-ebf9-90cea7d9d44f", "EditDetails":{ "EditMessageQuantity":"Updating Ingredient",{ "EditCaller":{ "Type":"Double", "Name":"Our PLM System" "Value":1 } } }] } | ||||||||
Code Block | ||||||||
| ||||||||
POST http://localhost:80/rest/FoodEditService.svc/UpdateFood HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={ }, "RecipeEdits":[{ } "Recipe":{ "Id":"8980ff36-e240-0001-5ef8-ee69ecb67fee", "Name":{"en-US":"Updated Recipe Name"}, ] "CommonName":{"en-US":"Updated Recipe Common Name"}, "UserCodeEditDetails":"REC-987",{ "BrandEditMessage":{ "Updating Ingredient", "SupplierEditCaller":"Am{ Sweeteners - Middlesex", "ProductName":"ProductOur PLM XSystem" }, } "AllergenStatements":[{ "AllergenGroupIds":[ }] } |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
POST http://localhost:80/rest/FoodEditService.svc/UpdateFood HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={ "RecipeEdits":[{ "Recipe":{ "7d52c4c5-e396-4e8c-ae8e-ca5dd9ddc307 "Id":"8980ff36-e240-0001-5ef8-ee69ecb67fee", "Name":{"en-US":"Updated Recipe Name"}, ] }], "IngredientStatementSettings":[ "CommonName":{"en-US":"Updated Recipe Common Name"}, { "UserCode":"REC-987", "ItemsOverrideTextBrand":{"en-US":"Item One, Item Two, Item Three"}, "StatementNameOverrideSupplier":{"en-US":"Custom Ingredient Statement"}, Am Sweeteners - Middlesex", "CompositionBehaviorProduct":"OverrideProduct X" }, } "AllergenStatements":[{ ], "GroupsIdsAllergenGroupIds":[ "021c021f7d52c4c5-000ae396-00004e8c-8d69ae8e-0b60293379eaca5dd9ddc307", ], "AmountCost}], "IngredientStatementSettings":{[ "Amount":{ "QuantityItemsOverrideText":{ "Typeen-US":"DoubleItem One, Item Two, Item Three", "Valuees-MX":100"Artículo Uno, Artículo Dos, Artículo Tres", }, "fr-CA":"Article Un, Article Deux, Article Trois" "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6" }, "CostStatementNameOverride":"5"{ }, "Itemsen-US":[{"Custom Ingredient Statement", "FoodId":"752eb9c2-0001-0000-bede-d3a51c0fdeba", "es-MX":"Declaración de ingredientes personalizada", "Amount":{ "Quantityfr-CA":{"Déclaration d'ingrédients personnalisée" "Value":"100","Type":"Double" }, }, "CompositionBehavior":"Override" "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6"} }], }, "GroupsIds":[ "LabelProfile":{ "Authority":{"021c021f-000a-0000-8d69-0b60293379ea" ], "IdAmountCost":"BBF4846D-8400-43BB-944D-6021FDA98225",{ "RegulationAmount":"U.S. 2016 NLEA"{ }, "Quantity":{ "LabelStyle":"Standard", "LabelFormatType":"FullDouble", "AlternateHeading":{"en-US":"Updated Heading"}, "ServingSizeValue":{"en-US":"1"},100 "ServingsPerContainer":{"en-US":"1"} }, "EditDetails":{ "EditMessageUnitId":"Updating Recipe",a7df0af5-0008-0000-7484-751e8eaf05c6" "EditCaller":{}, "NameCost":"Our PLM System5" }, } }] } | ||||||||
Code Block | ||||||||
| ||||||||
POST http://localhost:80/rest/FoodEditService.svc/UpdateFood HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={"Items":[{ "CompositeIngredientEdits":[{ FoodId":"752eb9c2-0001-0000-bede-d3a51c0fdeba", "Amount":{ "Quantity":{ "Value":"100","Type":"Double" }, "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6"} }] }, "LabelProfile":{ "Authority":{ "Id":"BBF4846D-8400-43BB-944D-6021FDA98225", "Regulation":"U.S. 2016 NLEA" }, "LabelStyle":"Standard", "LabelFormat":"Full", "AlternateHeading":{"en-US":"Updated Heading"}, "ServingSize":{"en-US":"1"}, "ServingsPerContainer":{"en-US":"1"} }, "EditDetails":{ "EditMessage":"Updating Recipe", "EditCaller":{ "Name":"Our PLM System" } } }] } |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
POST http://localhost:80/rest/FoodEditService.svc/UpdateFood HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={ "CompositeIngredientEdits":[{ "CompositeIngredient":{ "Id":"8980ff36-e240-0001-5ef8-ee69ecb67fee", "Name":{"en-US":"Updated Comp Ing"}, "CommonName":{"en-US":"Updated CompIng Common Name"}, "UserCode":"REC-987", "Brand":{ "Supplier":"Am Sweeteners - Middlesex", "Product":"Product X" }, "CompositeIngredientAllergenStatements":[{ "Id":"8980ff36-e240-0001-5ef8-ee69ecb67fee", "AllergenGroupIds":[ "7d52c4c5-e396-4e8c-ae8e-ca5dd9ddc307", ] }], "IngredientStatementSettings":[ { "Name":{"en-US":"Updated Comp Ing"}, "CommonNameItemsOverrideText":{"en-US":"Updated CompIng Common Name"}, "UserCodeen-US":"REC-987"Item One, Item Two, Item Three", "Brand":{ "Supplieres-MX":"Am Sweeteners - Middlesex",Artículo Uno, Artículo Dos, Artículo Tres", "Productfr-CA":"Product X"Article Un, Article Deux, Article Trois" }, }, "AllergenStatements":[{ "AllergenGroupIdsStatementNameOverride":[{ "7d52c4c5-e396-4e8c-ae8e-ca5dd9ddc307", "en-US":"Custom Ingredient Statement", ] }], "IngredientStatementSettings"es-MX":["Declaración de ingredientes personalizada", { "ItemsOverrideText":{"en-US"fr-CA":"Item One, Item Two, Item Three"},Déclaration d'ingrédients personnalisée" "StatementNameOverride":{"en-US":"Custom Ingredient Statement"}, "CompositionBehavior":"Override" } ], "GroupsIds":[ "021c021f-000a-0000-8d69-0b60293379ea" ], "AmountCost":{ "Amount":{ "Quantity":{ "Type":"Double", "Value":100 }, "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6" }, "Cost":"5" }, "Items":[{ "FoodId":"752eb9c2-0001-0000-bede-d3a51c0fdeba", "Amount":{ "Quantity":{ "Value":"100","Type":"Double" }, "UnitId":"a7df0af5-0008-0000-7484-751e8eaf05c6"} }] }, "EditDetails":{ "EditMessage":"Updating Composite Ingredient", "EditCaller":{ "Name":"Our PLM System" } } }] } |
...