Wger Nutritionplan API

Nutrition plans, referencing meals and items by ID.

Operations 7

GET /api/v2/nutritionplan/ Nutritionplan list #
POST /api/v2/nutritionplan/ Nutritionplan create #
GET /api/v2/nutritionplan/{id}/ Nutritionplan retrieve #
PUT /api/v2/nutritionplan/{id}/ Nutritionplan update #
PATCH /api/v2/nutritionplan/{id}/ Nutritionplan partial update #
DELETE /api/v2/nutritionplan/{id}/ Nutritionplan destroy #
GET /api/v2/nutritionplan/{id}/nutritional_values/ Nutritionplan nutritional values retrieve #

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/wger-nutritionplan-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

wger-nutritionplan-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: wger Nutritionplan API
  version: 2.7.0a2
  description: Self hosted FLOSS workout and fitness tracker.
  license:
    name: AGPL-3.0-or-later
    url: https://www.gnu.org/licenses/agpl-3.0.html
servers:
- url: /
  description: This server
- url: https://wger.de
  description: The "official" upstream wger instance
tags:
- name: nutritionplan
  description: Nutrition plans, referencing meals and items by ID.
paths:
  /api/v2/nutritionplan/:
    get:
      operationId: nutritionplan_list
      description: 'API endpoint for nutrition plan objects. For a read-only endpoint with all

        the information of nutritional plan(s), see /api/v2/nutritionplaninfo/'
      parameters:
      - in: query
        name: creation_date
        schema:
          type: string
          format: date
      - in: query
        name: description
        schema:
          type: string
      - in: query
        name: has_goal_calories
        schema:
          type: boolean
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      tags:
      - nutritionplan
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedNutritionPlanList'
          description: ''
      summary: Nutritionplan list
      x-summary-source: derived
    post:
      operationId: nutritionplan_create
      description: 'API endpoint for nutrition plan objects. For a read-only endpoint with all

        the information of nutritional plan(s), see /api/v2/nutritionplaninfo/'
      tags:
      - nutritionplan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NutritionPlanRequest'
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NutritionPlan'
          description: ''
      summary: Nutritionplan create
      x-summary-source: derived
  /api/v2/nutritionplan/{id}/:
    get:
      operationId: nutritionplan_retrieve
      description: 'API endpoint for nutrition plan objects. For a read-only endpoint with all

        the information of nutritional plan(s), see /api/v2/nutritionplaninfo/'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this nutrition plan.
        required: true
      tags:
      - nutritionplan
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NutritionPlan'
          description: ''
      summary: Nutritionplan retrieve
      x-summary-source: derived
    put:
      operationId: nutritionplan_update
      description: 'API endpoint for nutrition plan objects. For a read-only endpoint with all

        the information of nutritional plan(s), see /api/v2/nutritionplaninfo/'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this nutrition plan.
        required: true
      tags:
      - nutritionplan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NutritionPlanRequest'
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NutritionPlan'
          description: ''
      summary: Nutritionplan update
      x-summary-source: derived
    patch:
      operationId: nutritionplan_partial_update
      description: 'API endpoint for nutrition plan objects. For a read-only endpoint with all

        the information of nutritional plan(s), see /api/v2/nutritionplaninfo/'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this nutrition plan.
        required: true
      tags:
      - nutritionplan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedNutritionPlanRequest'
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NutritionPlan'
          description: ''
      summary: Nutritionplan partial update
      x-summary-source: derived
    delete:
      operationId: nutritionplan_destroy
      description: 'API endpoint for nutrition plan objects. For a read-only endpoint with all

        the information of nutritional plan(s), see /api/v2/nutritionplaninfo/'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this nutrition plan.
        required: true
      tags:
      - nutritionplan
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '204':
          description: No response body
      summary: Nutritionplan destroy
      x-summary-source: derived
  /api/v2/nutritionplan/{id}/nutritional_values/:
    get:
      operationId: nutritionplan_nutritional_values_retrieve
      description: Return an overview of the nutritional plan's values
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this nutrition plan.
        required: true
      tags:
      - nutritionplan
      security:
      - cookieAuth: []
      - tokenAuth: []
      - headlessJwtAuth: []
      - oidcAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NutritionalValues'
          description: ''
      summary: Nutritionplan nutritional values retrieve
      x-summary-source: derived
components:
  schemas:
    NutritionalValues:
      type: object
      description: Nutritional values serializer
      properties:
        energy:
          type: number
          format: double
        protein:
          type: number
          format: double
        carbohydrates:
          type: number
          format: double
        carbohydrates_sugar:
          type:
          - number
          - 'null'
          format: double
        fat:
          type: number
          format: double
        fat_saturated:
          type:
          - number
          - 'null'
          format: double
        fiber:
          type:
          - number
          - 'null'
          format: double
        sodium:
          type:
          - number
          - 'null'
          format: double
      required:
      - carbohydrates
      - carbohydrates_sugar
      - energy
      - fat
      - fat_saturated
      - fiber
      - protein
      - sodium
    NutritionPlanRequest:
      type: object
      description: Nutritional plan serializer
      properties:
        id:
          type: string
          format: uuid
        start:
          type: string
          format: date
          title: Start date
        end:
          type:
          - string
          - 'null'
          format: date
          title: End date
        description:
          type: string
          description: A description of the goal of the plan, e.g. "Gain mass" or "Prepare for summer"
          maxLength: 80
        only_logging:
          type: boolean
        goal_energy:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_protein:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_carbohydrates:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_fat:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_fiber:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
    NutritionPlan:
      type: object
      description: Nutritional plan serializer
      properties:
        id:
          type: string
          format: uuid
        creation_date:
          type: string
          format: date
          readOnly: true
        start:
          type: string
          format: date
          title: Start date
        end:
          type:
          - string
          - 'null'
          format: date
          title: End date
        description:
          type: string
          description: A description of the goal of the plan, e.g. "Gain mass" or "Prepare for summer"
          maxLength: 80
        only_logging:
          type: boolean
        goal_energy:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_protein:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_carbohydrates:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_fat:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_fiber:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
      required:
      - creation_date
    PatchedNutritionPlanRequest:
      type: object
      description: Nutritional plan serializer
      properties:
        id:
          type: string
          format: uuid
        start:
          type: string
          format: date
          title: Start date
        end:
          type:
          - string
          - 'null'
          format: date
          title: End date
        description:
          type: string
          description: A description of the goal of the plan, e.g. "Gain mass" or "Prepare for summer"
          maxLength: 80
        only_logging:
          type: boolean
        goal_energy:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_protein:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_carbohydrates:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_fat:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        goal_fiber:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
    PaginatedNutritionPlanList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?offset=400&limit=100
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?offset=200&limit=100
        results:
          type: array
          items:
            $ref: '#/components/schemas/NutritionPlan'
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
    headlessJwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token issued by the allauth headless endpoints
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    oidcAuth:
      type: oauth2
      description: Access token issued by the OAuth2/OIDC provider
      flows:
        authorizationCode:
          authorizationUrl: https://wger.de/identity/o/authorize
          tokenUrl: https://wger.de/identity/o/api/token
          scopes:
            api:read: View your training, nutrition and body data
            api:write: Add and change your training, nutrition and body data
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
externalDocs:
  url: https://wger.readthedocs.io
  description: wger documentation