šŸ”“šŸ”µ Create a manual intake (without image-based prediction).

Creates a manual intake for the specified APIUser without running food recognition or segmentation.

The endpoint supports two request contracts:

  • Legacy manual input: each item in dishes uses the existing id / ingredients format.
  • Unified mixed input: every item in dishes declares a type and may represent a dish, ingredient-only item, favorite, custom recipe or barcode food item.

Legacy and unified items cannot be mixed in the same dishes array. If one item contains type, every item must use the unified contract.

Unified top-level types:

  • dish: a regular LogMeal dish identified by a GeneralClass ID.
  • ingredient: an ingredient-only food item with no top-level id.
  • favorite: a favorite owned by the target APIUser. The complete saved favorite is expanded as a template and may contain multiple food items.
  • custom_recipe: a custom recipe belonging to the target APIUser's APICompany.
  • barcode_food_item: a barcode product previously resolved through POST /v2/barcode_scan/{barcode_id} and stored as a BarcodeClass.

Nested ingredients in the unified contract use:

  • ingredient: a regular LogMeal ingredient referenced through ingredientId, or a free-text ingredient referenced through ingredientName.
  • barcode_ingredient: a barcode product referenced through barcodeClassId.

For regular catalog ingredients, ingredientAmount is optional and the existing default quantity is used when it is omitted. Free-text ingredients identified through ingredientName require ingredientAmount.

For barcode ingredients, ingredientAmount is also optional. When it is omitted, the product's stored OpenFoodFacts nutritional reference/serving quantity is used as fallback.

Regular catalog references can be obtained through:

  • GET /v2/dataset/dishes for LogMeal dish IDs;
  • GET /v2/dataset/ingredients for regular LogMeal ingredient IDs.

When ingredients, levels and quantity are provided for the same food item, they are applied in this order:

  1. ingredients define or replace the food item's recipe;
  2. levels modify the salt, sugar and oil ingredients in that recipe;
  3. quantity proportionally scales the resulting recipe to the requested serving size.

A favorite is reused as the saved intake template. It does not accept one aggregate quantity or an ingredients override because the favorite may contain several food items, each with its own recipe and quantity.

quantity, when provided, scales the selected food item's recipe proportionally.

The target APIUser may call this endpoint for themselves. An APIUserManager may call it for an APIUser they are authorized to manage. Favorites and custom recipes are always resolved using the target APIUser's context.

The request may be sent as application/json, or as multipart/form-data when attaching an optional display image at intake creation time.

For multipart/form-data, the manual-input JSON must be serialized in the data field and the image must be provided in the optional image field.

An uploaded image is a display-only image. It does not trigger food recognition or segmentation and does not modify the selected foods, recipes or nutritional information. The maximum uploaded image size is 1 MB.

If the intake is created without an image, a display image can be attached later through POST /v2/intake/{image_id}/display_image.

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

ID of the APIUser.

Body Params

Manual-intake payload.

Use application/json when no image is uploaded.

Use multipart/form-data when attaching an optional display image. In that case, the same JSON payload must be serialized into the data field.

string

Optional user-provided label for the complete intake/meal. This is independent from the optional dishes[].name label used for an individual ingredient-only item.

dishes
array of objects
required
length ≄ 1

Legacy manual-input items.

Every item in this array must use the existing legacy contract and must not contain the unified type discriminator.

dishes*
string

Timestamp assigned to the intake in the target user's timezone, using the format %Y/%m/%d, %H:%M:%S.

When omitted, the target APIUser's current localized time is used.

Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
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