šŸ”µ Create multiple manual intakes for managed APIUsers.

Creates several manual intakes in one request.

This endpoint is available only to APIUserManagers. Every target userId must belong to an APIUser accessible by the authenticated manager.

Each entry in intakes is validated independently and may use either:

  • the existing legacy manual-input contract, or
  • the unified typed contract.

Different intakes in the same bulk request may use different contracts.
For example, one intake may be legacy and the next one unified.

However, legacy and unified food items cannot be mixed inside the same dishes array.
If any food item in an intake provides type, every item in that intake must use the unified contract.

The unified contract supports:

  • dish
  • ingredient
  • favorite
  • custom_recipe
  • barcode_food_item

Nested ingredients may use:

  • ingredient
  • barcode_ingredient

Favorites and custom recipes are resolved using the target APIUser's context, not the authenticated APIUserManager's context.

This means:

  • a favorite must belong to the APIUser receiving that intake;
  • a custom recipe must belong to the target APIUser's APICompany.

Timestamp and occasion

timestamp is required for every intake and must use the format %Y/%m/%d, %H:%M:%S.

Every intake may optionally provide either occasion or occasion_id, but never both.

occasion identifies an occasion by name. occasion_id identifies a custom company occasion.

Explicit occasion selection takes precedence over the occasion that would otherwise be inferred from the intake timestamp.

If neither field is provided, the occasion continues to be determined automatically from the target APIUser's timestamp and occasion configuration.

Occasion validation uses the occasion configuration that was active for the target APIUser's company at the supplied timestamp.

Optional display image

Requests without an image can use application/json.

To attach one display image to all intakes created by the request, use multipart/form-data with:

  • data: the JSON-serialized bulk request;
  • image: the optional display image file.

The uploaded image is display-only. It does not trigger food recognition or segmentation and does not change the supplied foods or nutritional information.

The same uploaded file is processed independently for every intake. Each resulting intake therefore receives its own display-image record even though all of them originate from the same uploaded file.

The maximum uploaded image size is 1 MB.

If no image is supplied during creation, each intake's display image can still be attached or replaced later through POST /v2/intake/{image_id}/display_image.

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

Manual intakes to assign to APIUsers managed by the authenticated APIUserManager.

Use application/json when no display image is uploaded.

Use multipart/form-data to apply one display image to every intake created by the request. In that case, serialize the same bulk JSON payload into the data field and provide the image in the optional image field.

intakes
array
required
length ≄ 1

Manual intakes to create.

Every entry independently uses either the legacy manual-input contract or the unified typed contract.
Different entries in the same array may use different contracts.

intakes*

One legacy manual intake in a bulk-assignment request.

All items in dishes must use the existing legacy format and must not use the unified type discriminator.

An explicit occasion or occasion_id may optionally be supplied. If omitted, the occasion is inferred from the timestamp as usual.

integer
required

ID of the APIUser that will receive the intake.

The authenticated APIUserManager must have access to this APIUser.

string
required

Date and time assigned to the intake in the target APIUser's timezone.

Required format: %Y/%m/%d, %H:%M:%S.

string

Optional explicit occasion name.

When supplied, it overrides the occasion that would otherwise be inferred from timestamp.

If a custom occasion group was active for the target APIUser's company at the supplied timestamp, the name must belong to that group. Otherwise, a valid default occasion name must be used.

occasion and occasion_id cannot be provided together.

integer

Optional identifier of a custom company occasion.

The ID must belong to the occasion group active for the target APIUser's company at the supplied timestamp.

When supplied, it overrides timestamp-based occasion inference.

occasion and occasion_id cannot be provided together.

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 food items.

Ingredient-only legacy items without a catalog id remain supported according to the existing manual-input contract.

dishes*
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