Given an imageId you can specify the quantity consumed by the user (in grams). After specifying the quantity, the output of the endpoints /nutrition/recipe/ingredients and /nutrition/recipe/nutritionalInfo will be recalculated accordingly.
If food segmentation was applied to the image, quantities for each food item should be specified in an object structure. The object's key is the identifier for the segment (food_item_position) and the value its new quantity. You can confirm quantity for as many food items as you want in a single call to the endpoint.
In the case food recognition was applied to the image, quantity can only be specified for all food in the image at once by providing an integer with the total weight of all predicted or confirmed items.
You can also specify the quantity of sugar, salt and oil consumed by the user. If the user does not use salt in any of their recipes for example, modifying this will be considered when retrieving the nutritional information of the image (requires a LogMeal Plan Measures endpoints).
Note: Sugar modulation is only applied to dishes we consider to often include added sugars.
Also, the preferred measurement system and specific measure for each food item can be specified with a LogMeal Monitor plan or higher.
If none of the optional parameters is provided, no changes will be applied.
post https://api.logmeal.com/v2/nutrition/confirm/quantity