Log food

Add a product or meal from the database to a meal on a day.

POST https://cotlet.dev/api/v1/fitatu/foods/{food_id}

write

Adds one product or meal from search_food to the chosen meal and day, in grams, milliliters or a handy measure the product offers, such as a slice or a package. It reaches no one and is undone with one call, delete_diary_item, so it runs without asking first.

Parameters

Parameters: log_food
NameTypeDescription
food_id string required string Product or meal ID from search_food.
meal string required string Meal name from your Fitatu meal scheme. By default: breakfast, second breakfast, lunch, dinner, snack or supper.
amount number required number How much, in the unit below.
unit string required string gram, milliliter or a measure the product lists, e.g. slice, teaspoon, handful or package.
date date date Day to log on, YYYY-MM-DD. Default: today.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/fitatu/foods/food_8c41d2 \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"meal":"meal","amount":1,"unit":"unit"}'
Python
result = client.call("fitatu", "log_food", {"food_id":"food_8c41d2","meal":"meal","amount":1,"unit":"unit"})
Node.js
const result = await cotlet.call('fitatu', 'log_food', {"food_id":"food_8c41d2","meal":"meal","amount":1,"unit":"unit"});
CLI
cotlet call fitatu log_food --data '{"food_id":"food_8c41d2","meal":"meal","amount":1,"unit":"unit"}'

Example response

JSON

{
  "item_id": "it_5c20",
  "date": "2026-10-13",
  "meal": "breakfast",
  "name": "Rye bread",
  "amount": "2 slices",
  "kcal": 160,
  "status": "logged"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.