LogMeal Nutritional Plans API

Endpoints related to the available nutritional plans and their management.⚡ Monitor plan or above ⚡

Operations 5

GET /v2/nutritional_plan/info ⚫🔴🔵 Get all the available nutritional plans and their required fields #
GET /v2/nutritional_plan/{user_id} 🔴🔵 Retrieve all nutritional plans assigned to a user #
POST /v2/nutritional_plan 🔴🔵 Assign a new nutritional plan to a user #
DELETE /v2/nutritional_plan 🔴🔵 Delete a nutritional plan by its ID #
POST /v2/nutritional_plan/simulate 🔴🔵 Simulates a nutritional plan and returns personalized estimations #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/logmeal:logmeal-nutritional-plans-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

logmeal-nutritional-plans-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.1.0
  title: Food AI Engine API Documentation Nutritional Plans API
  description: Please, refer to https://docs.logmeal.com to find the most up-to-date version of the Food AI Engine API documentation.
  contact:
    email: support@logmeal.com
servers:
- url: https://api.logmeal.com
  description: Production
tags:
- name: Nutritional Plans
  description: 'Endpoints related to the available nutritional plans and their management.

    ⚡ Monitor plan or above ⚡'
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-nutritional-plans#/
paths:
  /v2/nutritional_plan/info:
    get:
      tags:
      - Nutritional Plans
      summary: ⚫🔴🔵 Get all the available nutritional plans and their required fields
      description: 'This endpoint provides an informative list of the available nutritional plans along with the required fields

        for each one.


        The returned information helps to understand which data is needed to assign a nutritional plan to a client,

        which is done via the endpoint: `POST /nutritional_plan`.


        Each plan includes the names and data types that should be included in the creation request,

        serving as a guide to correctly build that request.'
      responses:
        '200':
          description: Nutritional plans information successfully retrieved!
          content:
            application/json:
              schema:
                type: object
                properties:
                  nutritional_plans:
                    type: object
                    properties:
                      balanced_diet:
                        type: object
                      gain_muscle:
                        type: object
                        properties:
                          date:
                            type: string
                            format: date
                            example: '2025-01-01'
                          growth_intensity:
                            type: number
                            format: float
                            enum:
                            - 0.25
                            - 0.5
                            - 1
                            example: 0.5
                      weight_loss:
                        type: object
                        properties:
                          date:
                            type: string
                            format: date
                            example: '2025-01-01'
                          weight_goal:
                            type: number
                            format: float
                            example: 70.5
        '400':
          description: Bad request
        '401':
          description: Unauthorized, invalid token.
        '403':
          description: Forbidden
      security:
      - Bearer: []
      operationId: getV2NutritionalPlanInfo
      x-operation-id-source: derived
  /v2/nutritional_plan/{user_id}:
    get:
      tags:
      - Nutritional Plans
      summary: 🔴🔵 Retrieve all nutritional plans assigned to a user
      description: 'Returns a list of all nutritional plans associated with the specified user. Each plan contains relevant metadata such as the type of plan, whether it''s active, initial weight, associated goals, and more.


        The response allows clients to track the user’s dietary progress over time, identify which plan is currently active, and understand historical changes in their nutritional approach.'
      parameters:
      - in: path
        name: user_id
        schema:
          type: integer
          example: 21633
        required: true
        description: ID of the APIUser.
      responses:
        '200':
          description: Nutritional plans information successfully retrieved!
          content:
            application/json:
              schema:
                type: object
                properties:
                  nutritional_plans:
                    type: array
                    items:
                      type: object
                      properties:
                        active:
                          type: boolean
                          example: true
                        calorie_deficits:
                          type:
                          - integer
                          - 'null'
                          example: 438
                        calorie_surplus:
                          type:
                          - integer
                          - 'null'
                          example: 250
                        date_init:
                          type: string
                          format: date
                          example: '2025-04-15'
                        id:
                          type: integer
                          example: 5
                        measure_goal_info:
                          type: object
                          properties:
                            active:
                              type: boolean
                              example: true
                            date:
                              type: string
                              example: '2025-04-15'
                            id:
                              type: integer
                              example: 100
                            measure:
                              type: string
                              example: weight
                            unit:
                              type: string
                              example: kg
                            value:
                              type: number
                              format: float
                              example: 75.5
                        type:
                          type: string
                          example: gain_muscle
                        user_measure_goal_id:
                          type:
                          - integer
                          - 'null'
                          example: 3
                        weight_init:
                          type: number
                          format: float
                          example: 70
        '400':
          description: Bad request
        '401':
          description: Unauthorized, invalid token.
        '403':
          description: Forbidden
      security:
      - Bearer: []
      operationId: getV2NutritionalPlanByUserId
      x-operation-id-source: derived
  /v2/nutritional_plan:
    post:
      tags:
      - Nutritional Plans
      summary: 🔴🔵 Assign a new nutritional plan to a user
      description: 'Creates and assigns a new nutritional plan to the specified user.


        If a nutritional plan already exists for today''s date, it will be **deleted and replaced**. If there''s an active

        plan, it will be **deactivated**.


        ---

        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)


        ---

        **Field Requirements by Plan Type**

        ---


        - Type: **BALANCED_DIET**

        - Required Fields: **type, user_id**

        Description: No further parameters are required.


        ---


        - Type: **GAIN_MUSCLE**

        - Required Fields: **type, user_id, growth_intensity, date**

        Description: Requires both the muscle growth intensity and the goal date to be specified.


        ---


        - Type: **WEIGHT_LOSS**

        - Required Fields: **type, user_id, weight_goal, date**

        Description: Requires a target weight and future date.


        ---


        Refer to the __`v2/nutritional_plan/info`__ endpoint to retrieve required fields dynamically based on plan type.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              - user_id
              properties:
                type:
                  type: string
                  enum:
                  - balanced_diet
                  - gain_muscle
                  - weight_loss
                  description: The type of nutritional plan to assign.
                  example: gain_muscle
                user_id:
                  type: integer
                  description: ID of the user who will receive the nutritional plan.
                  example: 15070
                weight_goal:
                  type: number
                  format: float
                  description: 'Target weight in kilograms.


                    Required for `WEIGHT_LOSS` plans.

                    '
                  example: 80
                date:
                  type: string
                  format: date
                  description: 'Target date to reach the goal (YYYY-MM-DD format).


                    Must be a future date.


                    Required for `WEIGHT_LOSS` and `GAIN_MUSCLE` plans.

                    '
                  example: '2025-04-14'
                growth_intensity:
                  type: number
                  format: float
                  enum:
                  - 0.25
                  - 0.5
                  - 1
                  description: 'Desired muscle growth intensity (Kg per week).


                    Required for `GAIN_MUSCLE` plans.

                    '
                  example: 0.25
      responses:
        '200':
          description: A nutritional plan has been assigned to the user.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: A nutritional plan of type 'gain_muscle' has been assigned to the user 15070.
        '400':
          description: Bad request
        '401':
          description: Unauthorized, invalid token.
        '403':
          description: Forbidden
        '404':
          description: Not found
      security:
      - Bearer: []
      operationId: postV2NutritionalPlan
      x-operation-id-source: derived
    delete:
      tags:
      - Nutritional Plans
      summary: 🔴🔵 Delete a nutritional plan by its ID
      description: 'Permanently deletes a nutritional plan based on its unique ID.

        This action is irreversible and will remove all data associated with the plan.

        **NOTE**: If the deleted nutrition plan had an associated measure goal, that goal will also be deleted.


        Make sure the nutritional plan ID provided corresponds to an existing plan assigned to the user.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - nutritional_plan_id
              properties:
                nutritional_plan_id:
                  type: integer
                  description: The ID of the nutritional plan to delete.
                  example: 5
      responses:
        '200':
          description: Nutritional plan successfully deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The nutritional plan with ID 5 has been successfully deleted!
        '400':
          description: Bad request
        '401':
          description: Unauthorized, invalid token.
        '403':
          description: Forbidden
        '404':
          description: Not found
      security:
      - Bearer: []
      operationId: deleteV2NutritionalPlan
      x-operation-id-source: derived
  /v2/nutritional_plan/simulate:
    post:
      tags:
      - Nutritional Plans
      summary: 🔴🔵 Simulates a nutritional plan and returns personalized estimations
      description: '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.


        ---'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              - user_id
              properties:
                type:
                  type: string
                  enum:
                  - gain_muscle
                  - weight_loss
                  description: 'The type of nutritional plan to simulate.

                    '
                  example: weight_loss
                user_id:
                  type: integer
                  description: ID of the user whose profile will be used for simulation.
                  example: 15070
                weight_goal:
                  type:
                  - number
                  - 'null'
                  format: float
                  description: '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`.

                    '
                  example: 68
                date:
                  type:
                  - string
                  - 'null'
                  format: date
                  description: '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.

                    '
                  example: '2025-06-30'
                growth_intensity:
                  type:
                  - number
                  - 'null'
                  format: float
                  description: '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.

                    '
                  example: 0.5
      responses:
        '200':
          description: Simulation result based on nutritional plan type and parameters.
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    simulated_nutritional_goals:
                      type:
                      - object
                      - 'null'
                      example: null
                    timeframe_recommendation:
                      type: object
                      properties:
                        fastest:
                          type: object
                          properties:
                            min_time:
                              type: string
                              format: date
                              example: '2025-05-10'
                            max_time:
                              type: string
                              format: date
                              example: '2025-06-10'
                        relaxed:
                          type: object
                          properties:
                            min_time:
                              type: string
                              format: date
                              example: '2025-06-01'
                            max_time:
                              type: string
                              format: date
                              example: '2025-07-10'
                - type: object
                  properties:
                    weight_recommendation:
                      type: number
                      format: float
                      example: 70.5
                      description: It should be noted that this result is not the recommended weight but the maximum weight that can be lost with the maximum healthy caloric deficit.
                    simulated_nutritional_goals:
                      type: object
                      description: Nutritional goals calculated for the target date.
                      additionalProperties:
                        type: object
                        properties:
                          average_value:
                            type: number
                            format: float
                            description: Average recommended daily intake for this nutrient.
                            example: 210.375
                          label:
                            type: string
                            description: Display name for the nutrient.
                            example: Carbohidratos
                          range:
                            type: array
                            description: Minimum and maximum recommended daily intake.
                            items:
                              type: number
                              format: float
                            example:
                            - 116.875
                            - 303.875
                          unit:
                            type: string
                            description: Measurement unit.
                            example: g
                      example:
                        CHOCDF:
                          average_value: 210.375
                          label: Carbohidratos
                          range:
                          - 116.875
                          - 303.875
                          unit: g
                        ENERC_KCAL:
                          average_value: 1870
                          label: Energía
                          range:
                          - 1776.5
                          - 1963.5
                          unit: kcal
                        FAT:
                          average_value: 72.72
                          label: Grasas
                          range:
                          - 40
                          - 105.45
                          unit: g
                        PROCNT:
                          average_value: 93.5
                          label: Proteína
                          range:
                          - 74.8
                          - 112.2
                          unit: g
                - type: object
                  properties:
                    simulated_nutritional_goals:
                      type:
                      - object
                      - 'null'
                      example: null
                    weight_recommendation:
                      type: object
                      properties:
                        min_weight:
                          type: number
                          format: float
                          example: 63.5
                        max_weight:
                          type: number
                          format: float
                          example: 74.3
                        average_weight:
                          type: number
                          format: float
                          example: 68.9
                    timeframe_recommendation:
                      type: object
                      properties:
                        fastest:
                          type: object
                          properties:
                            min_time:
                              type: string
                              format: date
                              example: '2025-05-10'
                            max_time:
                              type: string
                              format: date
                              example: '2025-06-07'
                        relaxed:
                          type: object
                          properties:
                            min_time:
                              type: string
                              format: date
                              example: '2025-06-01'
                            max_time:
                              type: string
                              format: date
                              example: '2025-07-15'
                        warning:
                          type: string
                          description: 'Optional field. Returned only when the user''s current weight is equal to or below the ideal weight, or when the BMI is under 18.5. The dates in this case will match today''s date.

                            '
                - type: object
                  properties:
                    simulated_nutritional_goals:
                      type:
                      - object
                      - 'null'
                      example: null
                    growth_intensity:
                      type: object
                      properties:
                        low:
                          type: number
                          example: 0.25
                        moderate:
                          type: number
                          example: 0.5
                        high:
                          type: number
                          example: 1
                    duration:
                      type: object
                      properties:
                        short:
                          type: integer
                          example: 3
                        medium:
                          type: integer
                          example: 6
                        long:
                          type: integer
                          example: 12
                - type: object
                  properties:
                    maximum_weight_gain_recommendation:
                      type: number
                      format: float
                      example: 24
                      description: Maximum healthy weight gain achievable within the specified timeframe and intensity.
                    weight_goal:
                      type: number
                      format: float
                      example: 84
                      description: Estimated body weight at the end of the growth plan.
                    weight_over_recommended_bmi:
                      type: boolean
                      example: false
                      description: Indicates whether the resulting weight exceeds the recommended BMI range.
                    simulated_nutritional_goals:
                      type: object
                      description: Nutritional goals calculated for the target date.
                      additionalProperties:
                        type: object
                        properties:
                          average_value:
                            type: number
                            format: float
                            description: Average recommended daily intake for this nutrient.
                            example: 210.375
                          label:
                            type: string
                            description: Display name for the nutrient.
                            example: Carbohidratos
                          range:
                            type: array
                            description: Minimum and maximum recommended daily intake.
                            items:
                              type: number
                              format: float
                            example:
                            - 116.875
                            - 303.875
                          unit:
                            type: string
                            description: Measurement unit.
                            example: g
                      example:
                        CHOCDF:
                          average_value: 210.375
                          label: Carbohidratos
                          range:
                          - 116.875
                          - 303.875
                          unit: g
                        ENERC_KCAL:
                          average_value: 1870
                          label: Energía
                          range:
                          - 1776.5
                          - 1963.5
                          unit: kcal
                        FAT:
                          average_value: 72.72
                          label: Grasas
                          range:
                          - 40
                          - 105.45
                          unit: g
                        PROCNT:
                          average_value: 93.5
                          label: Proteína
                          range:
                          - 74.8
                          - 112.2
                          unit: g
                - type: object
                  properties:
                    simulated_nutritional_goals:
                      type: object
                      description: Nutritional goals calculated for the target date.
                      additionalProperties:
                        type: object
                        properties:
                          average_value:
                            type: number
                            format: float
                            description: Average recommended daily intake for this nutrient.
                            example: 210.375
                          label:
                            type: string
                            description: Display name for the nutrient.
                            example: Carbohidratos
                          range:
                            type: array
                            description: Minimum and maximum recommended daily intake.
                            items:
                              type: number
                              format: float
                            example:
                            - 116.875
                            - 303.875
                          unit:
                            type: string
                            description: Measurement unit.
                            example: g
                      example:
                        CHOCDF:
                          average_value: 210.375
                          label: Carbohidratos
                          range:
                          - 116.875
                          - 303.875
                          unit: g
                        ENERC_KCAL:
                          average_value: 1870
                          label: Energía
                          range:
                          - 1776.5
                          - 1963.5
                          unit: kcal
                        FAT:
                          average_value: 72.72
                          label: Grasas
                          range:
                          - 40
                          - 105.45
                          unit: g
                        PROCNT:
                          average_value: 93.5
                          label: Proteína
                          range:
                          - 74.8
                          - 112.2
                          unit: g
        '400':
          description: Bad request
        '401':
          description: Unauthorized, invalid token.
        '403':
          description: Forbidden
        '404':
          description: Not found
      security:
      - Bearer: []
      operationId: postV2NutritionalPlanSimulate
      x-operation-id-source: derived
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-build:
  time: '2026-10-19T02:02:11.433999Z'
x-provenance:
  method: harvested
  publisher: LogMeal
  source: https://docs.logmeal.com/openapi/logmeal_openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)