šŸ”“šŸ”µ 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.

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

The type of nutritional plan to simulate.

Allowed:
integer
required

ID of the user whose profile will be used for simulation.

float | null

Target weight in kilograms.

Used in weight_loss simulations to calculate timeframes needed to reach that goal.

Optional, but must not be used together with date.

date | null

Target date to reach the goal (format: YYYY-MM-DD).

Must be a future date.

Used in weight_loss and gain_muscle simulations to estimate what weight is realistically achievable by then.

Optional, but must not be used together with weight_goal in weight_loss simulations. In the case of gain_muscle, it is also optional, but if growth_intensity is provided, both must be passed.

float | null

Weekly muscle gain intensity in kg/week.

Only used for gain_muscle simulations.

When used together with date, it will return a projected weight goal.

Responses

400

Bad request

401

Unauthorized, invalid token.

403

Forbidden

404

Not found

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json