post https://api.logmeal.com/v2/nutritional_plan/simulate
Simulates a nutritional plan for a user based on their profile data and optional goal parameters.
This endpoint returns:
- Estimated timeframes to reach a weight goal.
- Ideal weight recommendations.
- Potential outcomes based on intensity/duration (for muscle gain).
Requirements
-
The user profile must contain the following data:
- Weight
- Height
- Sex
- Lifestyle
-
If missing, the request will fail with a detailed error and instructions to update the profile using:
/v2/profile/modifyUserProfileInfo
(š“ APIUSER)/v2/users/modifyUserProfileInfo
(šµ APIUSERMANAGER)
Optional Fields by Plan Type
Type: WEIGHT_LOSS
- Optional Fields: weight_goal, date
Description:
-
No
weight_goal
ordate
provided:- Returns ideal healthy weight range and estimated timeframe to reach it.
-
weight_goal
provided:- Returns estimated timeframes to reach the target weight.
-
date
provided:- Returns the lowest achievable weight by the given date, based on the maximum healthy caloric deficit.
-
Both
weight_goal
anddate
are provided:- Will cause an error.
Special Case Handling:
-
If the user is already at their ideal weight:
- The timeframe fields will return today's date.
- A
"warning"
field will be included to indicate this situation.
-
If the user is below their ideal weight:
- The timeframe fields will return today's date.
- A
"warning"
field will explain that weight loss is not necessary.
-
If the user has BMI < 18.5:
- The timeframe fields will return today's date.
- A
"warning"
field will inform that a weight loss plan is not recommended for underweight individuals.
Type: GAIN_MUSCLE
- Optional Fields: growth_intensity, date
Description:
-
No
growth_intensity
ordate
:- Returns suggested presets for intensity and duration.
-
Both provided:
- Returns estimated weight goal, maximum weight gain, and BMI alert if unhealthy.
-
Only
growth_intensity
ordate
is provided:- Will cause an error.
Type: BALANCED_DIET
- Optional Fields: None
Description:
- This plan doesn't require any parameters as no further calculations or simulations are needed.
- Returns empty object.