šŸ”“šŸ”µ Confirm food quantities, modifiers and preferred measures.

Updates food quantity and, when the user's plan allows it, recipe modifiers or preferred measures for an existing intake.

The accepted structure depends on whether the intake is itemized.

Recognition-only intake

For a normal recognition-only image without individual food-item positions, quantity represents the total intake quantity and must be provided as a positive integer.

salt and sugar may also be provided using the existing recognition format.

Itemized intake

For segmentation and mixed/manual intakes, fields are objects keyed by food_item_position.

Segmentation positions commonly use:

1, 2, 3, ...

Mixed/manual intakes use:

manual1, manual2, manual3, ...

This also applies to manual intakes that are internally represented as an APIImage because they contain favorites, custom recipes or barcode products.

Only the positions supplied in the request are modified.

For itemized intakes:

  • quantity values must be positive integers or floats expressed in grams;
  • salt, sugar and oil use the levels none, low, medium, high;
  • measures selects the preferred display measurement system.

Item-level salt, sugar, oil and preferred measures require a LogMeal Monitor plan or higher.

If the target APIUser does not have access to these features, submitted values are ignored.

salt, sugar and oil modify the corresponding recipe components and are taken into account when nutritional information is recalculated.

Note: sugar modulation is only applied to dishes that LogMeal considers likely to contain added sugars.

Quantity scaling

Changing the quantity of an item proportionally rescales its recipe so the final serving size matches the requested quantity.

This means that a mixed item such as manual2 continues to reference the same recipe components, but their weights and nutritional information are recalculated for the new serving size.

Nutrition

Nutritional information is automatically recalculated after the requested changes have been applied.

The updated quantities and recipe modifiers are reflected in subsequent calls to POST /v2/nutrition/recipe/ingredients and POST /v2/nutrition/recipe/nutritionalInfo.

When this operation is executed internally as part of POST /v2/image/confirm/dish, intermediate recalculation is suppressed so nutrition is calculated only once from the final confirmed intake.

If none of the optional fields is provided, no quantity, modifier or measure changes are applied.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Use the scalar recognition format for non-itemized recognition images, or the per-position format for segmentation and mixed/manual intakes.

Quantity/modifier feedback for a non-itemized recognition-only intake.

integer
required
integer
≄ 1

Total intake quantity in grams.

integer
≄ 1

Salt amount in milligrams.

number
> 0

Sugar amount in grams.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json