Update nutrition profile
update_profileChanges- What it does
- Changes or deletes something you had. Your assistant can ask you to confirm first. Safe to retry: the same call twice changes nothing more.
- Permission
- Profile, change
profile:write
What your assistant is told
Update one or more fields on the calling user's Nutrition profile. Sparse patch — only pass fields you want to change; omitted fields are left alone. Idempotent. Use this when the user tells you something durable about how they eat ("I went vegetarian", "I'm just tracking calories now", "I never eat before lunch", "add peanuts to my allergies"). Do NOT use this to log meals or bodyweight — those have their own tools. Listed fields accept only the values shown; a value outside a list or range rejects the whole call (nothing is saved) with an error naming the field. Returns the profile after the patch.
Parameters
primaryGoaltext, optionallose-fat | maintain | gain-muscle | general-healthdietaryStyletext, optionalomnivore | vegetarian | vegan | pescatarian | keto | mediterranean | othermealsPerDaytext, optional1 | 2 | 3 | 4-5 | 6+ — including snackseatingTimeslist of text, optionalThe parts of the day the user usually gets to eat, any of: early | morning | midday | afternoon | evening | night | varies — but "varies" (their days differ) only on its own. Replaces the whole list. It does not change mealsPerDay; set that as well when the count changed.trackingDepthtext, optionalcalories-only | calories-protein | full-macrosenergyUnittext, optionalkcal | kj — display boundary only, storage is always kcalunitstext, optionalmetric | imperialsextext, optionalmale | female | prefer-notbirthYearwhole number, optionalFour-digit year, e.g. 1990. 1900 to the current year, and at least 16 years ago — Loki Nutrition is for people aged 16 and over.heightCmwhole number, optionalHeight in whole centimetres, e.g. 178. 50-300.restrictionstext, optionalFree text for allergies, foods to avoid, medical notes. Replace the whole note when set. At most 2000 characters.activityLeveltext, optionalsedentary | light | moderate | very-active — how much the user moves on a normal day. It does not change the targets; use set_target for that.weeklyPacePctnumber, optionalThe weekly pace the user chose for their goal, as % of body weight a week, e.g. 0.5. 0.1-1.0. Only for lose-fat or gain-muscle. It does not change the targets; use set_target for that.