šŸ”“šŸ”µ Simulates a nutritional plan and returns personalized estimations.

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).

Additionally, depending on the parameters provided in the payload, the endpoint may also perform a nutritional goals simulation. This simulation calculates the daily caloric and macronutrient targets required to reach the intended outcome, using either the target weight supplied by the user or the weight recommendation generated during the plan simulation, depending on the plan type and the fields provided.


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 or date provided:

    • Returns ideal healthy weight range and estimated timeframe to reach it.
    • No nutritional simulation will be performed.
  • weight_goal provided:

    • Returns estimated timeframes to reach the target weight.
    • No nutritional simulation will be performed.
  • date provided:

    • Returns the lowest achievable weight by the given date, based on the maximum healthy caloric deficit.
    • Nutritional simulation is performed using the weight recommendation generated in the plan simulation.
  • Both weight_goal and date are provided:

    • No weight-loss plan simulation will be performed, as we already have both the target date and target weight, which is the purpose of the endpoint.
    • Nutritional simulation is performed using the target weight provided in the payload.

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 or date:

    • Returns suggested presets for intensity and duration.
    • No nutritional simulation will be performed.
  • Both provided:

    • Returns estimated weight goal, maximum weight gain, and BMI alert if unhealthy.
    • Nutritional simulation is performed using the weight recommendation generated in the plan simulation.
  • Only growth_intensity or date is provided:

    • Causes an error because both values are required for internal calculations.

Type: BALANCED_DIET

  • Optional Fields: None

Description:

  • This plan doesn't require any parameters as no further calculations or simulations are needed.
    • Returns an object containing only the nutritional goals simulation to maintain the user's current weight.

Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!