openapi: 3.0.3
info:
  version: 2.1.0
  title: API Documentation
  description: Please, refer to [https://docs.logmeal.com](https://docs.logmeal.com)
    to find the most up-to-date version of the LogMeal API documentation.
  contact:
    email: support@logmeal.com
servers:
- url: https://api.logmeal.com
tags:
- name: Informative Endpoints
  description: Endpoints that provide useful information about the LogMeal API.
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-essential-concepts-plans-limits#
- name: Dataset Information, Recognized Dishes and Others
  description: Endpoints that provide information about our datasets
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-essential-concepts-recognition-capabilities
- name: APIUsers Management
  description: Endpoints that allow APICompanies to manage their APIUsers.<br/>Limited
    to APICompany ⚫ tokens
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-essential-concepts-users-and-access-tokens#/
- name: APIUsers Profile Management
  description: Endpoints that allow APIUsers to get and modify their profiles.<br/>Limited
    to APIUser 🔴 tokens
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-essential-concepts-users-and-access-tokens#/
- name: API and Models Versioning Functions
  description: Endpoints that provide information about the available versions of
    the API and our Models.<br/>Available to both APICompany ⚫ and APIUser 🔴 tokens
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-best-practices-toubleshooting#/model-versioning
- name: Image-based Food Recognition
  description: Endpoints related to applying food recognition on images.<br/>These
    endpoints are all limited to APIUser 🔴 tokens
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-several-dishes-recognition#/
- name: Ingredients and Nutritional Information
  description: Endpoints related to the nutritional information services.<br/>⚡ Monitor
    plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-nutritional-information#/
- name: Units of Measurement and Easy Modulation
  description: Endpoints with information about cooking measures and easy modulation.<br/>⚡
    Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-units-of-measurement#/
- name: External Management
  description: Endpoints that allow managing the APIUserManagers.<br/>⚡ Monitor plan
    or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-external-management#/
- name: Intake History
  description: Endpoints related to the APIUser's intake history management and visualization.<br/>⚡
    Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-intakes-history#/
- name: Custom Occasions
  description: Endpoints related to managing custom occasions.<br/>⚡ Monitor plan
    or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-custom-occasions#/
- name: Nutritional Plans
  description: Endpoints related to the available nutritional plans and their management.<br/>⚡
    Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-nutritional-plans#/
- name: Daily Nutritional Goal
  description: Endpoints related to the APIUser's daily nutritional goal management.<br/>⚡
    Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-daily-nutritional-goals#/
- name: Custom Nutritional Indicators
  description: Endpoints related to managing custom nutritional indicators.<br/>⚡
    Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-custom-nutritional-indicators#/
- name: Custom Recipes
  description: Create and assign custom recipes accessible by all the users in the
    company.<br/>⚡ Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-custom-recipes#/
- name: APIUser Favorite Meals
  description: Endpoints related to the APIUser's favorite meals.<br/>⚡ Monitor plan
    or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-favorite-meals#/
- name: Body Measures
  description: Endpoints to manage body measures.<br/>⚡ Monitor plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-body-measurements#/
- name: Intake Variety Score and Nutri-Scores
  description: Endpoints related to the APIUser's intake variety and Nutri-Score services.<br/>⚡
    Recommend plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-variety-score#/
- name: Recipe and Dish Recommendations
  description: Endpoints related to the APIUser's recipe and dish recommendations
    services.<br/>⚡ Recommend plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-recipe-and-dish-recommendation#/
- name: Food Quantity Detection
  description: Endpoints related to applying food segmentation and quantity detection
    on images.<br/>⚡ Recommend plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-quantity-estimation#/
- name: Food Waste Detection
  description: Food waste detection for dish leftovers and stored food waste disposal.<br/>⚡
    Recommend plan or above ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-food-waste-estimation#/
- name: Dysphagia User Feedback
  description: Allows users to provide feedback about food stickiness and swallowing
    ease.<br/>⚡ Custom plans only ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-user-feedback-dysphagia#/
- name: LogMeal Kiosk Integration
  description: Endpoints for connecting the APIUsers to the Kiosk Customers that will
    be making use of the LogMeal Kiosk devices.<br/>⚡ Custom plans only ⚡
  externalDocs:
    url: https://docs.logmeal.com/docs/guides-features-logmeal-kiosk-integration#/
paths:
  /v2/info/limitations:
    get:
      tags:
      - Informative Endpoints
      summary: ⚫ Get information about your current account limitations.
      description: " Summary of limitations:\n\n<span style='color:red; font-size:\
        \ 1.8em; font-weight: bold;'>©</span> <strong>Consumes your monthly credits.\
        \ Limited amount of monthly calls, exceeding calls will be charged as extras.</strong>\n\
        \n<span style='color:orange; font-size: 1.2em; font-weight: bold;'>(D)</span>\
        \ <strong>Limited amount of daily calls per user.</strong>\n\n<span style='color:purple;\
        \ font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount\
        \ of calls per second.</strong>\n\n&nbsp;\n\nUse this endpoint to retrieve\
        \ the current limitations of your LogMeal Plan.\n\n&nbsp;\n\n<strong>Additional\
        \ usage information is returned in the HTTP response headers.</strong> The\
        \ headers included depend on the type of authenticated user making the request.\n\
        \n<br>\n\n<strong>Common headers (all authenticated users):</strong><br> -\
        \ <code>User-ID</code>: Identifier of the authenticated user.<br> - <code>X-Account-Credits-Used</code>:\
        \ Credits consumed in the current billing period.<br> - <code>X-Account-Credits-Remaining</code>:\
        \ Remaining credits until the next billing cycle.<br>\n\n<br>\n\n<strong>APIUSER\
        \ only:</strong><br> - <code>RateLimit-Limit</code>: Maximum allowed requests\
        \ per rolling 24-hour window.<br> - <code>RateLimit-Remaining</code>: Remaining\
        \ requests available in the current 24-hour window.<br> - <code>RateLimit-Reset</code>:\
        \ Seconds until the rate limit resets. "
      responses:
        200:
          description: Limitations retrieved
          headers:
            User-ID:
              description: Identifier of the authenticated user.
              schema:
                type: string
            X-Account-Credits-Used:
              description: Credits consumed in the current billing period.
              schema:
                type: string
            X-Account-Credits-Remaining:
              description: Remaining credits until the next billing cycle.
              schema:
                type: string
            RateLimit-Limit:
              description: Maximum allowed requests per rolling 24-hour window (APIUser
                only).
              schema:
                type: string
            RateLimit-Remaining:
              description: Remaining requests in the current 24-hour window (APIUser
                only).
              schema:
                type: string
            RateLimit-Reset:
              description: Seconds until the rate limit resets (APIUser only).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  D:
                    type: string
                    example: ___ calls per day per user. (On D limited endpoints)
                  M:
                    type: string
                    example: ___ queries per month among all your users. (On M limited
                      endpoints)
                  S:
                    type: string
                    example: ___ allowed calls per second per user. (On S limited
                      endpoints)
        401:
          description: Unauthorized, invalid token
      security:
      - Bearer: []
  /v2/info/services:
    get:
      tags:
      - Informative Endpoints
      summary: ⚫🔴🔵 Get list of accessible services (endpoints).
      description: ' Returns the list of services available by the requesting user''s
        APICompany. The services returned depend on the LogMeal Plan the company is
        subscribed. '
      responses:
        200:
          description: Services retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  users/signUp:
                    type: object
                    properties:
                      description:
                        type: string
                        example: Create a new APIUser
                      extra_calls_paid:
                        type: boolean
                        example: false
                  image/segmentation/complete:
                    type: object
                    properties:
                      description:
                        type: string
                        example: Food Segmentation
                      extra_calls_paid:
                        type: boolean
                        example: true
        401:
          description: Unauthorized, invalid token
      security:
      - Bearer: []
  /v2/info/nutrients:
    get:
      tags:
      - Informative Endpoints
      summary: ⚫🔴🔵 Get information about the available nutritional indicators.
      description: " This endpoint returns information about the nutritional indicators\
        \ available in our API. The response contains an object for each nutrient,\
        \ with the <strong>nutritional code</strong> as a key.\n\n&nbsp;\n\nMost of\
        \ our endpoints that provide responses containing information about nutritional\
        \ indicators will use this nutritional code as a reference.\n\n&nbsp;\n\n\
        It will also return custom nutritional indicators. Only if they have been\
        \ defined. "
      responses:
        200:
          description: Available nutrients retrieved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  NUTRIENT_CODE:
                    type: object
                    properties:
                      labels:
                        type: object
                        properties:
                          default:
                            type: string
                            example: Calcium
                          english:
                            type: string
                            example: Calcium
                          spanish:
                            type: string
                            example: Calcio
                          italian:
                            type: string
                            example: Calcio
                          dutch:
                            type: string
                            example: Calcium
                          french:
                            type: string
                            example: Calcium
                          catalan:
                            type: string
                            example: Calci
                          turkish:
                            type: string
                            example: Kalsiyum
                          german:
                            type: string
                            example: Kalzium
                          unit:
                            type: string
                            example: mg
                    description: Contains all the information of the nutrient, including
                      units and label translations.
                description: For each available nutrient, the response will have an
                  entry with NUTRIENT_CODE as key.
        401:
          description: Unauthorized, invalid token
      security:
      - Bearer: []
  /v2/info/languages:
    get:
      tags:
      - Informative Endpoints
      summary: ⚫🔴🔵 Returns the available languages to be assigned to APIUsers.
      description: "Endpoint that returns a JSON containing the languages that can\
        \ be associated to each of the APIUsers.\nBy using the language parameters,\
        \ all image recognition predictions and any other information returned to\
        \ the APIUser will be translated into that language.\n\n&nbsp;\n\nEach language\
        \ will always be identified by a 3 character ISO 639-2/T code, which corresponds\
        \ to the key of the JSON provided by this endpoint. "
      responses:
        '200':
          description: token is valid and list of available languages is returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  spa:
                    type: string
                    example: spanish
                  cat:
                    type: string
                    example: catalan
                  eng:
                    type: string
                    example: english
                  ita:
                    type: string
                    example: italian
                  nld:
                    type: string
                    example: dutch
                  fre:
                    type: string
                    example: french
                  ger:
                    type: string
                    example: german
                  tur:
                    type: string
                    example: turkish
                  gre:
                    type: string
                    example: greek
                  heb:
                    type: string
                    example: hebrew
                description: JSON containing each language available in our API. The
                  key of the object corresponds to the ISO 639-2/T code that corresponds
                  to each available language.
        403:
          description: You are not allowed to this method.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/info/usages:
    get:
      tags:
      - Informative Endpoints
      summary: ⚫🔴 Get API usage info.
      description: 'Endpoint that returns a JSON containing the list of requests performed
        by an APIUser. If no APIUser is specified, then the usage for all available
        APIUsers will be retrieved instead. '
      parameters:
      - in: query
        name: date_start
        schema:
          type: string
        required: true
        description: Datetime the data will be filtered FROM (date_start <= imageDate).
          Following the format "%Y/%m/%d".
      - in: query
        name: date_end
        schema:
          type: string
        required: true
        description: Datetime the data will be filtered TO (imageDate <= date_end).
          Following the format "%Y/%m/%d"
      - in: query
        name: api_user_id
        schema:
          type: integer
        description: Optional parameter. ID of the user to retrieve the information
          from. For APICompanies, if not provided, the info for all available APIUsers
          will be retured.
      responses:
        200:
          description: Usages list successfully retrieved!
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    service_id:
                      type: integer
                      example: 86
                      description: Identifier for the service associated to this request.
                        See /info/services for further information.
                    timestamp:
                      type: string
                      example: 2025-01-02, 21:19:15
                      description: Timestamp when the request was made (UTC time).
                        Following the format '%Y-%m-%d, %H:%M:%S'.
                    userId:
                      type: integer
                      description: ID of the APIUser that made the request.
                      example: 11
              examples:
                Usages List Example:
                  value:
                  - service_id: 86
                    timestamp: '2024-07-04 08:40:47'
                    userId: 2594
                  - service_id: 86
                    timestamp: '2024-07-04 09:07:40'
                    userId: 2594
                  - service_id: 53
                    timestamp: '2024-07-06 20:09:38'
                    userId: 2594
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Date format is not valid:
                  value:
                    message: The date must be formatted as '%Y/%m/%d'.
                    code: 100
                Date range is not valid:
                  value:
                    message: '''date_end'' must be greater or equal than ''date_start'''
                    code: 100
      security:
      - Bearer: []
  /v2/version/activeModels:
    get:
      tags:
      - API and Models Versioning Functions
      summary: ⚫🔴 Retrieves the list of active Models/Algorithms versions. ⏱
      description: " <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n&nbsp;\n\nThis endpoint\
        \ returns a list containing the versions of the recognition models that are\
        \ currently active. The versions provided are sorted, meaning that the first\
        \ one is the most recent and the last one is the least recent.\n\n&nbsp;\n\
        \nYou can fix the version in our recognition endpoints in order to always\
        \ receive the same list of classes, although <b>WE RECOMMEND NOT FIXING THE\
        \ VERSION</b> in order to obtain the best results possible as we update our\
        \ models. "
      responses:
        200:
          description: token is valid, model versions list is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: array
                    items:
                      type: string
                example:
                  names:
                  - v1.0
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/version/activeAPIs:
    get:
      tags:
      - API and Models Versioning Functions
      summary: ⚫🔴 Retrieves the list of active API versions. ⏱
      description: |
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>


        &nbsp;


        This endpoint returns a list containing the API versions that are currently active.

        Changing the version of an endpoint could change its inputs/outputs. Using the most recent API version is always recommended, as the latest
        versions will provide more and better functionalities.
      responses:
        200:
          description: token is valid, API versions list is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: array
                    items:
                      type: string
                example:
                  names:
                  - v2
                  - v1
                  - v0
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/version/allModels:
    get:
      tags:
      - API and Models Versioning Functions
      summary: ⚫🔴 Retrieves all available models grouped by version. ⏱
      description: |2-
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint returns a list of the available models with their available versions.
      responses:
        200:
          description: token is valid, classes information is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  models:
                    type: object
                    description: Object that contains an list for each available model
                      version.
                    properties:
                      VERSION_NUMBER:
                        type: array
                        description: List that contains one entry for each model which
                          is available for the VERSION_NUMBER.
                        items:
                          type: object
                          description: Object that contains some basic information
                            of each model.
                          properties:
                            id:
                              type: integer
                              example: 1
                              description: ID of the model.
                            name:
                              type: string
                              example: foodrec
                              description: Name of the model.
                            region:
                              type: integer
                              description: ID of the region assigned to the model.
                                This value will not always be returned. Corresponds
                                to an id from the available 'regions'
                              example: 4
                  regions:
                    type: array
                    description: List containing the available regions.
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                          description: ID of the region.
                        name:
                          type: string
                          example: Spanish
                          description: Name of the region.
              examples:
                Get all models response example:
                  value:
                    models:
                      v0.7:
                      - id: 36
                        name: quantity_recipe
                      - id: 35
                        name: multi_track
                      - id: 4
                        name: ingredients
                      - id: 24
                        name: mixed_sl_ml
                      - id: 30
                        name: yolo_highResolution
                      - id: 34
                        name: people_track
                      - id: 14
                        name: yolo
                      - id: 2
                        name: foodType
                      - id: 33
                        name: yolo_facemask_basic
                      - id: 7
                        name: foodgroups
                      - id: 27
                        name: yolo_food_nonfood
                      - id: 25
                        name: yolo_group_prediction
                      - id: 6
                        name: foodrec
                        region: 1
                      - id: 37
                        name: menu_based
                      - id: 29
                        name: yolo_ensemble
                      - id: 8
                        name: multilabel
                      - id: 26
                        name: yolo_general
                      - id: 15
                        name: yolo_tray_prediction
                      - id: 70
                        name: ingredients_recipe
                      - id: 5
                        name: sauces
                      - id: 3
                        name: drinks
                      v0.8:
                      - id: 19
                        name: foodrec_spanish
                        region: 2
                      - id: 10
                        name: foodrec
                        region: 1
                      - id: 22
                        name: multilabel
                      - id: 11
                        name: ingredients
                      - id: 21
                        name: foodrec_italian
                        region: 4
                      - id: 23
                        name: foodType
                      - id: 20
                        name: foodrec_dutch
                        region: 3
                      - id: 12
                        name: sauces
                      - id: 13
                        name: drinks
                      v0.9:
                      - id: 32
                        name: foodrec
                        region: 1
                      - id: 31
                        name: multilabel
                    regions:
                    - id: 1
                      name: General
                    - id: 2
                      name: Spanish
                    - id: 3
                      name: Dutch
                    - id: 4
                      name: Italian
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/dishes:
    get:
      tags:
      - Dataset Information, Recognized Dishes and Others
      summary: ⚫🔴🔵 Retrieves all dishes or products detectable by the image recognition
        algorithms. ⏱
      description: |
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>
        &nbsp;
        This endpoint returns the available list of dish names separated by types ('food', 'drinks', 'ingredients', 'sauces', 'combo' [i.e. combination dish] and 'custom recipes'). Each dish object contains an id, name, portion size, and optional cooking measures.
      parameters:
      - in: query
        name: cooking_measures
        schema:
          type: string
        description: |
          Include this parameter to retrieve cooking measure ids associated to each dish/ingredient.

          The parameter doesn't require a value, just including it in the query string ('?cooking_measures') will work.

          If not included, cooking measures won't be retrieved
        required: false
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: Token is valid, classes information is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  food:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  drinks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  ingredients:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  sauces:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  combo:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  customRecipe:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/dishes/{model_version}:
    get:
      tags:
      - Dataset Information, Recognized Dishes and Others
      summary: ⚫🔴🔵 Retrieves all dishes or products detectable by the image recognition
        algorithms. ⏱
      description: |
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>
        &nbsp;
        This endpoint returns the available list of dish names separated by types ('food', 'drinks', 'ingredients', 'sauces', 'combo' [i.e. combination dish] and 'custom recipes'). Each dish object contains an id, name, portion size, and optional cooking measures.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      - in: query
        name: cooking_measures
        schema:
          type: string
        description: |
          Include this parameter to retrieve cooking measure ids associated to each dish/ingredient.

          The parameter doesn't require a value, just including it in the query string ('?cooking_measures') will work.

          If not included, cooking measures won't be retrieved
        required: false
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      responses:
        200:
          description: Token is valid, classes information is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  food:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  drinks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  ingredients:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  sauces:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  combo:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
                  customRecipe:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1286
                        name:
                          type: string
                          example: water
                        portion_size:
                          type: number
                          format: float
                          example: 250.0
                        cooking_measures:
                          type: array
                          items:
                            type: integer
                          example:
                          - 3
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/foodGroups:
    get:
      tags:
      - Dataset Information, Recognized Dishes and Others
      summary: ⚫🔴🔵 Retrieve the complete list of available food groups ⏱
      description: |2-
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint results a list of all the available food groups (also named food families). See /v2/image/recognition endpoints for more information.
      responses:
        200:
          description: token is valid, food groups information is sent in response
            (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ids:
                    type: array
                    items:
                      type: integer
                    example:
                    - 1
                    - 2
                    - 3
                  names:
                    type: array
                    items:
                      type: string
                    example:
                    - meat
                    - dessert
                    - dairy products
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/ingredients:
    get:
      tags:
      - Dataset Information, Recognized Dishes and Others
      summary: ⚫🔴🔵 Retrieve the complete list of ingredients that could appear in
        the recipes. ⏱
      description: |
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>


        &nbsp;


        This endpoint returns a complete list of the ingredients that could appear in our recipes. Take into account that to obtain recipe information
        from image predictions, you must have access to the Nutritional Information.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      - in: query
        name: cooking_measures
        schema:
          type: string
        description: |
          Include this parameter to retrieve cooking measure ids associated to each dish/ingredient.

          The parameter doesn't require a value, just including it in the query string ('?cooking_measures') will work.

          If not included, cooking measures won't be retrieved
        required: false
      responses:
        200:
          description: token is valid, ingredients list is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    avgQuantity:
                      type: number
                      description: Average quantity of this ingredient in all recipes.
                    id:
                      type: integer
                      example: 562
                    modifier_type:
                      type: string
                      enum:
                      - null
                      - sugar
                      - salt
                      - oil
                    name:
                      type: string
                      example: oil
                    unit:
                      type: string
                      enum:
                      - g
                      - ml
                    state:
                      type: string
                      enum:
                      - solid
                      - liquid
                  description: An object describing an ingredient, with its id and
                    name translated into your language.
                description: An array of ingredients objects.
                example:
                - id: 114
                  name: Eggplant
                - id: 569
                  name: Egg
        400:
          description: Invalid syntax
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/foodGroupsFromDish:
    post:
      tags:
      - Dataset Information, Recognized Dishes and Others
      summary: ⚫🔴🔵 Get the list of food groups more commonly associated to a manually-specified
        dish id. ⏱
      description: |2-
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        Given a dish class_id, this endpoint returns the food groups associated to it. Deprecated name '/foodGroupFromDish'.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                class_id:
                  type: integer
                  example: 241
              required:
              - class_id
        description: Parameters sent in data, in json format
        required: true
      responses:
        200:
          description: token is valid, food groups list is sent in response (JSON
            format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ids:
                    type: array
                    items:
                      type: integer
                    example:
                    - 1
                    - 2
                    - 3
                  names:
                    type: array
                    items:
                      type: string
                    example:
                    - meat
                    - dessert
                    - dairy products
        400:
          description: Invalid syntax
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Food Group Not Available:
                  value:
                    message: The provided dish does not have a food group.
                    code: 712
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/users/signUp:
    post:
      tags:
      - APIUsers Management
      summary: ⚫ Sign Up new APIUser
      description: " Create a new APIUser which will have access to our API, an APIUser\
        \ should only be assigned to a unique user.\n\n&nbsp;\n\nEach APIUser will\
        \ have a token assigned to it which can be used in our endpoints, granting\
        \ access to the services.\n\n&nbsp;\n\nAny call that is made by each of your\
        \ APIUsers will be taken into consideration based on your current LogMeal\
        \ Plan.\nAlso, each APIUser counts towards the device limit so you won't be\
        \ able to create one if your current LogMeal Plan's limit is reached.\n\n\
        &nbsp;\n\n**IMPORTANT:** we recommend taking a look at the `modifyUserProfileInfo`\
        \ endpoints, which allow customizing the user profile and thus, get personalization\
        \ capabilities along any of the endpoints in the LogMeal API. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: exampleusername
                language:
                  type: string
                  default: eng
                  example: eng
                  enum:
                  - spa
                  - cat
                  - eng
                  - ita
                  - nld
                  - fre
                  - ger
                  - tur
                  - gre
                  - heb
                  description: Default language assigned to the created APIUser. Applicable
                    to food names. It must be a three-letter ISO 639-2/T code
              required:
              - username
        description: List of user object
        required: true
      responses:
        '201':
          description: token is valid, company user is created, token is generated
            and sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    example: The new APIUser has been successfully created!
                  token:
                    type: string
                    example: 731ccfa35745110aabb32ed
                  id:
                    type: integer
                    example: 435
        409:
          description: The given username already exists in the LogMeal database.
        403:
          description: Your company has reached the maximum amount of APIUsers based
            on your current LogMeal Plan. Upgrade your plan, remove unused users or
            contact us for more information.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Not allowed to this method:
                  value:
                    message: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/users/APIUsers:
    get:
      tags:
      - APIUsers Management
      summary: ⚫ Returns the list of existing APIUsers for a given company
      description: This endpoint returns a list of the APIUsers that are associated
        to your APICompany, with some basic information about each APIUser.
      responses:
        '200':
          description: APIUsers successfully obtained
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    user:
                      type: string
                      example: exampleusername
                    token:
                      type: string
                      example: 410b152be7f
                    id:
                      type: integer
                      example: 342
                    enabled:
                      type: boolean
                      example: true
                      description: Either if the APIUser has access to the intake
                        report endpoints and consume monthly credits.
                    language:
                      type: string
                      default: eng
                      example: eng
                      enum:
                      - spa
                      - cat
                      - eng
                      - ita
                      - nld
                      - fre
                      - ger
                      - tur
                      - gre
                      - heb
                      description: Default language assigned to the created APIUser.
                        Applicable to food names. It must be a three-letter ISO 639-2/T
                        code
                    name:
                      type: string
                      example: john
                    surname:
                      type: string
                      example: smith
        403:
          description: You are not allowed to this method.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Not allowed to this method:
                  value:
                    type: object
                    properties:
                      message:
                        type: string
                        example: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/users/deleteAPIUser/{userId}:
    delete:
      tags:
      - APIUsers Management
      summary: ⚫ Deletes an APIUser from your APICompany.
      description: "This endpoint deletes/disables a user from your APICompany.\n\n\
        &nbsp;\n\nIf the APIUser you want to delete has already used our API (has\
        \ processed images through our endpoints), a soft delete will be applied (the\
        \ user will be disabled but it's data will be kept for your future analysis\
        \ through our intake history endpoints).\n\n&nbsp;\n\nIf the APIUser has never\
        \ used any of our image processing endpoints, the user will be completely\
        \ removed from our system. "
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      responses:
        '200':
          description: The APIUser was successfully deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: boolean
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/users/modifyUserProfileInfo/{userId}:
    post:
      tags:
      - APIUsers Management
      summary: ⚫ Modify a user's profile information.
      description: "\nThis endpoint allows you to modify the profile and main attributes\
        \ of an end-user (APIUser). This information associated to the user can be\
        \ used for features like improving and customizing the output of the food\
        \ recognition capabilities, personalizing the nutrition recommendations and\
        \ nutrition plans, adapting to the user intake patterns, etc.\n\n&nbsp;\n\n\
        Read the specification of the request body to see the available fields with\
        \ their descriptions.\n\n&nbsp;\n\nThis endpoint is the same as `/v2/profile/modifyUserProfileInfo`\
        \ and `/v2/managers/modifyUserProfileInfo`.\n\n&nbsp;\n\n### \U0001F30D Geographic\
        \ and Language Personalization\n\nWe highly recommend including the optional\
        \ fields `country` and `language` in the request body:\n\n- **`country`**\
        \ (ISO 3166‑1 alpha‑2 code, e.g., `US`, `FR`, `JP`):  \n  Providing the country\
        \ allows LogMeal to geographically refine its food recognition capabilities.\
        \  \n  This enables improved detection accuracy for region-specific dishes\
        \ and eating patterns, leading to better personalization in nutrition analysis.\n\
        \n- **`language`** (e.g., `en`, `es`, `fr`):  \n  Setting the preferred language\
        \ ensures that the names of food items, ingredients, nutrients, and other\
        \ elements are returned in the specified language, offering a better user\
        \ experience tailored to each APIUser.\n\nIncluding these parameters increases\
        \ the contextual accuracy and relevance of all subsequent API responses.\n\
        \n&nbsp;\n\n### \U0001F957 Customizing Recommended Food Group Consumption\n\
        \nYou can also use this endpoint to **customize the recommended daily or weekly\
        \ food group portions** for a user by passing the `min_max_food_groups` field.\
        \  \nThis allows setting personalized minimum and/or maximum portion limits\
        \ per food group, which will be taken into account during dietary analysis\
        \ and goal calculations.\n\n&nbsp;\n\nImportant constraints:\n\n- If you want\
        \ to indicate that a food group has **no minimum requirement**, use `null`\
        \ as the `min` value. You must **not** use `0`, since `0` would imply the\
        \ user is expected to consume exactly 0 portions, which is incorrect for `min`.\n\
        \n- If you want to explicitly restrict a user from consuming a food group,\
        \ set the `max` value to `0`. This means that any intake of that group will\
        \ be considered a deviation from the goal.\n"
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: John
                  description: Name of the user (min length=2, max length=30)
                surname:
                  type: string
                  example: Smith
                  description: Surname of the user (min length=2, max length=50)
                language:
                  type: string
                  example: eng
                  enum:
                  - spa
                  - cat
                  - eng
                  - ita
                  - nld
                  - fre
                  - ger
                  - tur
                  - gre
                  - heb
                  description: APIUser's default language. It must be a three-letter
                    ISO 639-2/T code.
                sex:
                  type: integer
                  example: 2
                  enum:
                  - 0
                  - 1
                  - 2
                  - 9
                  description: Sex of the user. It must be a number, following ISO/IEC
                    5218.
                weight:
                  type: number
                  example: 72.3
                  description: Weight of the user in Kilograms.
                height:
                  type: number
                  example: 180.6
                  description: Height of the user in Centimeters.
                birth:
                  type: string
                  example: '1980-01-01'
                  description: Date of birth of the user, following the format "YYYY-MM-DD"
                lifestyle:
                  type: string
                  example: sedentary
                  enum:
                  - sedentary
                  - light
                  - moderate
                  - high
                  - very high
                  description: Lifestyle of the user. Possible values are ["sedentary",
                    "light", "moderate", "high", "very high"].
                country:
                  type: string
                  example: US
                  description: Will be used for refining the food recognition capabilities.
                    A 2-letter country code according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                default_portion_size:
                  type: string
                  example: large
                  enum:
                  - small
                  - medium
                  - large
                  description: Default portion size for the user. Possible values
                    are ["small", "medium", "large"]
                default_salt_level:
                  type: string
                  example: low
                  enum:
                  - none
                  - low
                  - medium
                  - high
                  description: Default salt level for the user. Possible values are
                    ["none", "low", "medium", "high"]
                default_sugar_level:
                  type: string
                  example: medium
                  enum:
                  - none
                  - low
                  - medium
                  - high
                default_oil_level:
                  type: string
                  example: high
                  enum:
                  - none
                  - low
                  - medium
                  - high
                  description: Default oil level for the user. Possible values are
                    ["none", "low", "medium", "high"]
                reference_sugar:
                  type: integer
                  example: 47
                  description: ID of the sugar ingredient the user usually uses. A
                    list of all possible oil modifiers can be retrieved by calling
                    /dataset/referenceIngredients.
                reference_oil:
                  type: integer
                  example: 562
                  description: ID of the oil ingredient the user usually uses. A list
                    of all possible oil modifiers can be retrieved by calling /dataset/referenceIngredients.
                reference_nutrients:
                  type: array
                  items:
                    type: string
                  example:
                  - FAPU
                  - ZN
                  description: Nutrients set as reference (important) for the user
                timezone:
                  type: string
                  example: Europe/Madrid
                  description: Timezone the user is located at. This requires a TZ
                    database name; you can find them here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                user_id:
                  type: integer
                  example: 123
                  description: ID of the user to be modified. You must be the owner
                    of the user to do any modification.
                diet_labels:
                  type: array
                  items:
                    type: string
                    enum:
                    - Balanced
                    - High-Fiber
                    - High-Protein
                    - Low-Carb
                    - Low-Fat
                    - High-Sodium
                    - Low-Sodium
                  example:
                  - Balanced
                  - Low-Carb
                  description: This attribute is optional. These are the diet labels
                    of the user. Possible values are ["Balanced", "High-Fiber", "High-Protein",
                    "Low-Carb", "Low-Fat", "High-Sodium", "Low-Sodium"]. The information
                    is used for personalizing the recipe recommendation for the user.
                food_restrictions:
                  type: array
                  items:
                    type: string
                    enum:
                    - Alcohol-Free
                    - Immuno-Supportive
                    - Celery-Free
                    - Crustacean-Free
                    - Dairy-Free
                    - Egg-Free
                    - Fish-Free
                    - Fodmap-Free
                    - Gluten-Free
                    - Keto-Friendly
                    - Kidney-Friendly
                    - Kosher
                    - Low-Potassium
                    - Lupine-Free
                    - Mustard-Free
                    - Low-Fat-Abs
                    - No-oil-added
                    - Low-Sugar
                    - Paleo
                    - Peanut-Free
                    - Pescatarian
                    - Pork-Free
                    - Red-Meat-Free
                    - Sesame-Free
                    - shellfish-Free
                    - Soy-Free
                    - Sugar-Conscious
                    - Tree-Nut-Free
                    - Vegan
                    - Vegetarian
                    - Wheat-Free
                  example:
                  - Alcohol-Free
                  - Dairy-Free
                  description: This attribute is optional. These are food restrictions
                    and allergies of the user. The information is used for personalizing
                    the recipe recommendation for the user
                weight_system:
                  type: string
                  enum:
                  - metric
                  - imperial
                  description: Set the user's preferred system for measuring weights.
                preferred_measure:
                  type: string
                  enum:
                  - weight
                  - cooking_measures
                  - portions
                  description: Set the user's preferred way to see food quantity information.
                min_max_food_groups:
                  type: object
                  description: |
                    Customize the recommended minimum and/or maximum portions per food group.

                    This field allows setting user-specific dietary goals by specifying optional `min` and/or `max` values for one or more food groups.

                    &nbsp;

                    **Important notes:**

                    - If you want to indicate _no minimum_ for a food group, use `null` as the `min` value. Do **not** use `0`, as that implies a strict minimum intake of 0 portions.

                    - If you want to prevent the user from consuming a food group, set `max` to `0`.

                    &nbsp;

                    **Example:**


                        "min_max_food_groups": {

                            "fish": {"min": null, "max": 1},

                            "red meat": {"min": null, "max": 0},

                            "fruit": {"min": 3, "max": 5},

                        }


                    &nbsp;

                    **Available Food Groups:**

                    - ['Dairy Products', 'Vegetables', 'Grains and Tubers', 'Water', 'Fruit', 'Whole Grain', 'Meat', 'Fish', 'Nuts', 'Legumes', 'Egg', 'Red Meat']
                  additionalProperties:
                    type: object
                    properties:
                      min:
                        type: number
                        nullable: true
                        description: Minimum number of portions (use `null` to specify
                          no minimum).
                      max:
                        type: number
                        nullable: true
                        description: Maximum number of portions (use `0` to restrict
                          intake entirely).
              required:
              - user_id
        description: Parameters to be modified, all fields are optional except 'user_id'.
          Null values will be ignored.
        required: true
      responses:
        '200':
          description: The profile information has been successfully modified!
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    example: The profile information has been successfully modified!
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Sex is not valid:
                  value:
                    message: The provided sex value is not valid.
                    code: 1205
                Lifestyle is not valid:
                  value:
                    message: The provided lifestlye value is not valid.
                    code: 1214
                Salt level is not valid:
                  value:
                    message: The provided salt level value is not valid.
                    code: 1215
                Sugar level is not valid:
                  value:
                    message: The provided sugar level value is not valid.
                    code: 1216
                Portion size is not valid:
                  value:
                    message: The provided portion size value is not valid.
                    code: 1217
                Birth format not valid:
                  value:
                    message: The provided birth value is wrong. Follow the format
                      'YYYY-MM-DD'
                    code: 1218
                Country is not valid:
                  value:
                    message: The provided country is not valid, check the valid 2-letter
                      country codes from ISO 3166-1 https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.
                    code: 1229
                diet label not valid:
                  value:
                    message: The provided diet label value is not valid
                    code: 1607
                food restriction not valid:
                  value:
                    message: The provided food restriction value is not valid'
                    code: 1608
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/users/getUserProfileInfo/{userId}:
    get:
      tags:
      - APIUsers Management
      summary: ⚫ Get a user's profile information.
      description: |-
        This endpoint returns the information from the specified APIUser owned by the APICompany.

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.

        &nbsp;

        This endpoint is the same as '/v2/profile/getUserProfileInfo'.
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      responses:
        200:
          description: The profile information has been successfully obtained
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    example: John
                    description: Name of the user (min length=2, max length=30)
                  surname:
                    type: string
                    example: Smith
                    description: Surname of the user (min length=2, max length=50)
                  language:
                    type: string
                    example: eng
                    enum:
                    - spa
                    - cat
                    - eng
                    - ita
                    - nld
                    - fre
                    - ger
                    - tur
                    - gre
                    - heb
                    description: APIUser's default language. It must be a three-letter
                      ISO 639-2/T code.
                  sex:
                    type: integer
                    example: 2
                    enum:
                    - 0
                    - 1
                    - 2
                    - 9
                    description: Sex of the user. It must be a number, following ISO/IEC
                      5218.
                  weight:
                    type: number
                    example: 72.3
                    description: Weight of the user in Kilograms.
                  height:
                    type: number
                    example: 180.6
                    description: Height of the user in Centimeters.
                  birth:
                    type: string
                    example: '1980-01-01'
                    description: Date of birth of the user, following the format "YYYY-MM-DD"
                  lifestyle:
                    type: string
                    example: sedentary
                    enum:
                    - sedentary
                    - light
                    - moderate
                    - high
                    - very high
                    description: Lifestyle of the user. Possible values are ["sedentary",
                      "light", "moderate", "high", "very high"].
                  country:
                    type: string
                    example: US
                    description: Will be used for refining the food recognition capabilities.
                      A 2-letter country code according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  default_portion_size:
                    type: string
                    example: large
                    enum:
                    - small
                    - medium
                    - large
                    description: Default portion size for the user. Possible values
                      are ["small", "medium", "large"]
                  default_salt_level:
                    type: string
                    example: low
                    enum:
                    - none
                    - low
                    - medium
                    - high
                    description: Default salt level for the user. Possible values
                      are ["none", "low", "medium", "high"]
                  default_sugar_level:
                    type: string
                    example: medium
                    enum:
                    - none
                    - low
                    - medium
                    - high
                  default_oil_level:
                    type: string
                    example: high
                    enum:
                    - none
                    - low
                    - medium
                    - high
                    description: Default oil level for the user. Possible values are
                      ["none", "low", "medium", "high"]
                  reference_sugar:
                    type: integer
                    example: 47
                    description: ID of the sugar ingredient the user usually uses.
                      A list of all possible oil modifiers can be retrieved by calling
                      /dataset/referenceIngredients.
                  reference_oil:
                    type: integer
                    example: 562
                    description: ID of the oil ingredient the user usually uses. A
                      list of all possible oil modifiers can be retrieved by calling
                      /dataset/referenceIngredients.
                  reference_nutrients:
                    type: array
                    items:
                      type: string
                    example:
                    - FAPU
                    - ZN
                    description: Nutrients set as reference (important) for the user
                  timezone:
                    type: string
                    example: Europe/Madrid
                    description: Timezone the user is located at. This requires a
                      TZ database name; you can find them here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                  user_id:
                    type: integer
                    example: 123
                    description: ID of the user to be modified. You must be the owner
                      of the user to do any modification.
                  diet_labels:
                    type: array
                    items:
                      type: string
                      enum:
                      - Balanced
                      - High-Fiber
                      - High-Protein
                      - Low-Carb
                      - Low-Fat
                      - High-Sodium
                      - Low-Sodium
                    example:
                    - Balanced
                    - Low-Carb
                    description: This attribute is optional. These are the diet labels
                      of the user. Possible values are ["Balanced", "High-Fiber",
                      "High-Protein", "Low-Carb", "Low-Fat", "High-Sodium", "Low-Sodium"].
                      The information is used for personalizing the recipe recommendation
                      for the user.
                  food_restrictions:
                    type: array
                    items:
                      type: string
                      enum:
                      - Alcohol-Free
                      - Immuno-Supportive
                      - Celery-Free
                      - Crustacean-Free
                      - Dairy-Free
                      - Egg-Free
                      - Fish-Free
                      - Fodmap-Free
                      - Gluten-Free
                      - Keto-Friendly
                      - Kidney-Friendly
                      - Kosher
                      - Low-Potassium
                      - Lupine-Free
                      - Mustard-Free
                      - Low-Fat-Abs
                      - No-oil-added
                      - Low-Sugar
                      - Paleo
                      - Peanut-Free
                      - Pescatarian
                      - Pork-Free
                      - Red-Meat-Free
                      - Sesame-Free
                      - shellfish-Free
                      - Soy-Free
                      - Sugar-Conscious
                      - Tree-Nut-Free
                      - Vegan
                      - Vegetarian
                      - Wheat-Free
                    example:
                    - Alcohol-Free
                    - Dairy-Free
                    description: This attribute is optional. These are food restrictions
                      and allergies of the user. The information is used for personalizing
                      the recipe recommendation for the user
                  weight_system:
                    type: string
                    enum:
                    - metric
                    - imperial
                    description: Set the user's preferred system for measuring weights.
                  preferred_measure:
                    type: string
                    enum:
                    - weight
                    - cooking_measures
                    - portions
                    description: Set the user's preferred way to see food quantity
                      information.
                  min_max_food_groups:
                    type: object
                    description: |
                      Customize the recommended minimum and/or maximum portions per food group.

                      This field allows setting user-specific dietary goals by specifying optional `min` and/or `max` values for one or more food groups.

                      &nbsp;

                      **Important notes:**

                      - If you want to indicate _no minimum_ for a food group, use `null` as the `min` value. Do **not** use `0`, as that implies a strict minimum intake of 0 portions.

                      - If you want to prevent the user from consuming a food group, set `max` to `0`.

                      &nbsp;

                      **Example:**


                          "min_max_food_groups": {

                              "fish": {"min": null, "max": 1},

                              "red meat": {"min": null, "max": 0},

                              "fruit": {"min": 3, "max": 5},

                          }


                      &nbsp;

                      **Available Food Groups:**

                      - ['Dairy Products', 'Vegetables', 'Grains and Tubers', 'Water', 'Fruit', 'Whole Grain', 'Meat', 'Fish', 'Nuts', 'Legumes', 'Egg', 'Red Meat']
                    additionalProperties:
                      type: object
                      properties:
                        min:
                          type: number
                          nullable: true
                          description: Minimum number of portions (use `null` to specify
                            no minimum).
                        max:
                          type: number
                          nullable: true
                          description: Maximum number of portions (use `0` to restrict
                            intake entirely).
                required:
                - user_id
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/users/toggleEnabled/{userId}:
    post:
      tags:
      - APIUsers Management
      summary: ⚫ Toggles the 'enabled' attribute for an APIUser.
      description: |-
        By changing the state of the 'enabled' attribute you can grant or prevent a user to gain access to the main intake endpoints. Furthermore, you can preventing them to consume monthly credits or account for the total Monthly Active Users (MAUs).

        &nbsp;

        Alternatively, you can change the 'enabled' attribute through the 'Users' page after logging in to your account at LogMeal's web page.

        &nbsp;

        If an APIUser is DISABLED and tries to make an API call to a privileged endpoint an HTTP error will be received with status code 403 and custom error code 116.

        &nbsp;

        You can check the status of the 'enable' attribute calling the endpoint GET '/v2/users/APIUsers'.
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      responses:
        '200':
          description: The profile information has been successfully modified!
          content:
            application/json:
              schema:
                type: object
                properties:
                  enabled:
                    type: boolean
                    example: false
                    description: Either if the APIUser has access to the intake report
                      endpoints and consume monthly credits.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/profile/changeLanguage:
    post:
      deprecated: true
      tags:
      - APIUsers Profile Management
      summary: 🔴 Changes current user language
      description: |
        **[NOTE] This endpoint is DEPRECATED. We recommend using the endpoint POST /modifyuserProfileInfo instead.**

        &nbsp;

        This endpoint allows an APIUser to modify their assigned language, which will modify the language of the responses generated by our endpoints.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                language:
                  type: string
                  example: eng
                  enum:
                  - spa
                  - cat
                  - eng
                  - ita
                  - nld
                  - fre
                  - ger
                  - tur
                  - gre
                  - heb
        description: Changes the APIUser's current default language. It must be a
          three-letter ISO 639-2/T code.
        required: true
      responses:
        '200':
          description: Language has been successfully changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: OK
        403:
          description: You are not allowed to this method.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Not allowed to this method:
                  value:
                    type: object
                    properties:
                      message:
                        type: string
                        example: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/profile/modifyUserProfileInfo:
    post:
      tags:
      - APIUsers Profile Management
      summary: 🔴 Modify the profile information.
      description: "\nThis endpoint allows you to modify the profile and main attributes\
        \ of an end-user (APIUser). This information associated to the user can be\
        \ used for features like improving and customizing the output of the food\
        \ recognition capabilities, personalizing the nutrition recommendations and\
        \ nutrition plans, adapting to the user intake patterns, etc.\n\n&nbsp;\n\n\
        Read the specification of the request body to see the available fields with\
        \ their descriptions.\n\n&nbsp;\n\nThis endpoint is the same as `/v2/managers/modifyUserProfileInfo`\
        \ and `/v2/users/modifyUserProfileInfo`.\n\n&nbsp;\n\n### \U0001F30D Geographic\
        \ and Language Personalization\n\nWe highly recommend including the optional\
        \ fields `country` and `language` in the request body:\n\n- **`country`**\
        \ (ISO 3166‑1 alpha‑2 code, e.g., `US`, `FR`, `JP`):  \n  Providing the country\
        \ allows LogMeal to geographically refine its food recognition capabilities.\
        \  \n  This enables improved detection accuracy for region-specific dishes\
        \ and eating patterns, leading to better personalization in nutrition analysis.\n\
        \n- **`language`** (e.g., `en`, `es`, `fr`):  \n  Setting the preferred language\
        \ ensures that the names of food items, ingredients, nutrients, and other\
        \ elements are returned in the specified language, offering a better user\
        \ experience tailored to each APIUser.\n\nIncluding these parameters increases\
        \ the contextual accuracy and relevance of all subsequent API responses.\n\
        \n&nbsp;\n\n### \U0001F957 Customizing Recommended Food Group Consumption\n\
        \nYou can also use this endpoint to **customize the recommended daily or weekly\
        \ food group portions** for a user by passing the `min_max_food_groups` field.\
        \  \nThis allows setting personalized minimum and/or maximum portion limits\
        \ per food group, which will be taken into account during dietary analysis\
        \ and goal calculations.\n\n&nbsp;\n\nImportant constraints:\n\n- If you want\
        \ to indicate that a food group has **no minimum requirement**, use `null`\
        \ as the `min` value. You must **not** use `0`, since `0` would imply the\
        \ user is expected to consume exactly 0 portions, which is incorrect for `min`.\n\
        \n- If you want to explicitly restrict a user from consuming a food group,\
        \ set the `max` value to `0`. This means that any intake of that group will\
        \ be considered a deviation from the goal.\n"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: John
                  description: Name of the user (min length=2, max length=30)
                surname:
                  type: string
                  example: Smith
                  description: Surname of the user (min length=2, max length=50)
                language:
                  type: string
                  example: eng
                  enum:
                  - spa
                  - cat
                  - eng
                  - ita
                  - nld
                  - fre
                  - ger
                  - tur
                  - gre
                  - heb
                  description: APIUser's default language. It must be a three-letter
                    ISO 639-2/T code.
                sex:
                  type: integer
                  example: 2
                  enum:
                  - 0
                  - 1
                  - 2
                  - 9
                  description: Sex of the user. It must be a number, following ISO/IEC
                    5218.
                weight:
                  type: number
                  example: 72.3
                  description: Weight of the user in Kilograms.
                height:
                  type: number
                  example: 180.6
                  description: Height of the user in Centimeters.
                birth:
                  type: string
                  example: '1980-01-01'
                  description: Date of birth of the user, following the format "YYYY-MM-DD"
                lifestyle:
                  type: string
                  example: sedentary
                  enum:
                  - sedentary
                  - light
                  - moderate
                  - high
                  - very high
                  description: Lifestyle of the user. Possible values are ["sedentary",
                    "light", "moderate", "high", "very high"].
                country:
                  type: string
                  example: US
                  description: Will be used for refining the food recognition capabilities.
                    A 2-letter country code according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                default_portion_size:
                  type: string
                  example: large
                  enum:
                  - small
                  - medium
                  - large
                  description: Default portion size for the user. Possible values
                    are ["small", "medium", "large"]
                default_salt_level:
                  type: string
                  example: low
                  enum:
                  - none
                  - low
                  - medium
                  - high
                  description: Default salt level for the user. Possible values are
                    ["none", "low", "medium", "high"]
                default_sugar_level:
                  type: string
                  example: medium
                  enum:
                  - none
                  - low
                  - medium
                  - high
                default_oil_level:
                  type: string
                  example: high
                  enum:
                  - none
                  - low
                  - medium
                  - high
                  description: Default oil level for the user. Possible values are
                    ["none", "low", "medium", "high"]
                reference_sugar:
                  type: integer
                  example: 47
                  description: ID of the sugar ingredient the user usually uses. A
                    list of all possible oil modifiers can be retrieved by calling
                    /dataset/referenceIngredients.
                reference_oil:
                  type: integer
                  example: 562
                  description: ID of the oil ingredient the user usually uses. A list
                    of all possible oil modifiers can be retrieved by calling /dataset/referenceIngredients.
                reference_nutrients:
                  type: array
                  items:
                    type: string
                  example:
                  - FAPU
                  - ZN
                  description: Nutrients set as reference (important) for the user
                timezone:
                  type: string
                  example: Europe/Madrid
                  description: Timezone the user is located at. This requires a TZ
                    database name; you can find them here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                user_id:
                  type: integer
                  example: 123
                  description: ID of the user to be modified. You must be the owner
                    of the user to do any modification.
                diet_labels:
                  type: array
                  items:
                    type: string
                    enum:
                    - Balanced
                    - High-Fiber
                    - High-Protein
                    - Low-Carb
                    - Low-Fat
                    - High-Sodium
                    - Low-Sodium
                  example:
                  - Balanced
                  - Low-Carb
                  description: This attribute is optional. These are the diet labels
                    of the user. Possible values are ["Balanced", "High-Fiber", "High-Protein",
                    "Low-Carb", "Low-Fat", "High-Sodium", "Low-Sodium"]. The information
                    is used for personalizing the recipe recommendation for the user.
                food_restrictions:
                  type: array
                  items:
                    type: string
                    enum:
                    - Alcohol-Free
                    - Immuno-Supportive
                    - Celery-Free
                    - Crustacean-Free
                    - Dairy-Free
                    - Egg-Free
                    - Fish-Free
                    - Fodmap-Free
                    - Gluten-Free
                    - Keto-Friendly
                    - Kidney-Friendly
                    - Kosher
                    - Low-Potassium
                    - Lupine-Free
                    - Mustard-Free
                    - Low-Fat-Abs
                    - No-oil-added
                    - Low-Sugar
                    - Paleo
                    - Peanut-Free
                    - Pescatarian
                    - Pork-Free
                    - Red-Meat-Free
                    - Sesame-Free
                    - shellfish-Free
                    - Soy-Free
                    - Sugar-Conscious
                    - Tree-Nut-Free
                    - Vegan
                    - Vegetarian
                    - Wheat-Free
                  example:
                  - Alcohol-Free
                  - Dairy-Free
                  description: This attribute is optional. These are food restrictions
                    and allergies of the user. The information is used for personalizing
                    the recipe recommendation for the user
                weight_system:
                  type: string
                  enum:
                  - metric
                  - imperial
                  description: Set the user's preferred system for measuring weights.
                preferred_measure:
                  type: string
                  enum:
                  - weight
                  - cooking_measures
                  - portions
                  description: Set the user's preferred way to see food quantity information.
                min_max_food_groups:
                  type: object
                  description: |
                    Customize the recommended minimum and/or maximum portions per food group.

                    This field allows setting user-specific dietary goals by specifying optional `min` and/or `max` values for one or more food groups.

                    &nbsp;

                    **Important notes:**

                    - If you want to indicate _no minimum_ for a food group, use `null` as the `min` value. Do **not** use `0`, as that implies a strict minimum intake of 0 portions.

                    - If you want to prevent the user from consuming a food group, set `max` to `0`.

                    &nbsp;

                    **Example:**


                        "min_max_food_groups": {

                            "fish": {"min": null, "max": 1},

                            "red meat": {"min": null, "max": 0},

                            "fruit": {"min": 3, "max": 5},

                        }


                    &nbsp;

                    **Available Food Groups:**

                    - ['Dairy Products', 'Vegetables', 'Grains and Tubers', 'Water', 'Fruit', 'Whole Grain', 'Meat', 'Fish', 'Nuts', 'Legumes', 'Egg', 'Red Meat']
                  additionalProperties:
                    type: object
                    properties:
                      min:
                        type: number
                        nullable: true
                        description: Minimum number of portions (use `null` to specify
                          no minimum).
                      max:
                        type: number
                        nullable: true
                        description: Maximum number of portions (use `0` to restrict
                          intake entirely).
              required:
              - user_id
        description: Parameters to be modified, all fields are optional. Null values
          will be ignored.
        required: true
      responses:
        '200':
          description: The profile information has been successfully modified!
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    example: The profile information has been successfully modified!
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Sex is not valid:
                  value:
                    message: The provided sex value is not valid.
                    code: 1205
                Lifestyle is not valid:
                  value:
                    message: The provided lifestyle value is not valid.
                    code: 1214
                Salt level is not valid:
                  value:
                    message: The provided salt level value is not valid.
                    code: 1215
                Sugar level is not valid:
                  value:
                    message: The provided sugar level value is not valid.
                    code: 1216
                Portion size is not valid:
                  value:
                    message: The provided portion size value is not valid.
                    code: 1217
                Birth format not valid:
                  value:
                    message: The provided birth value is wrong. Follow the format
                      'YYYY-MM-DD'
                    code: 1218
                Country is not valid:
                  value:
                    message: The provided country is not valid, check the valid 2-letter
                      country codes from ISO 3166-1 https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.
                    code: 1229
                diet label not valid:
                  value:
                    message: The provided diet label value is not valid
                    code: 1607
                food restriction not valid:
                  value:
                    message: The provided food restriction value is not valid'
                    code: 1608
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
      security:
      - Bearer: []
  /v2/profile/getUserProfileInfo:
    get:
      tags:
      - APIUsers Profile Management
      summary: 🔴 Get the user's profile information.
      description: |-
        This endpoint returns the information from the APIUser performing the request.

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.

        &nbsp;

        This endpoint is the same as '/v2/users/getUserProfileInfo'.
      responses:
        200:
          description: The profile information has been successfully obtained
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    example: John
                    description: Name of the user (min length=2, max length=30)
                  surname:
                    type: string
                    example: Smith
                    description: Surname of the user (min length=2, max length=50)
                  language:
                    type: string
                    example: eng
                    enum:
                    - spa
                    - cat
                    - eng
                    - ita
                    - nld
                    - fre
                    - ger
                    - tur
                    - gre
                    - heb
                    description: APIUser's default language. It must be a three-letter
                      ISO 639-2/T code.
                  sex:
                    type: integer
                    example: 2
                    enum:
                    - 0
                    - 1
                    - 2
                    - 9
                    description: Sex of the user. It must be a number, following ISO/IEC
                      5218.
                  weight:
                    type: number
                    example: 72.3
                    description: Weight of the user in Kilograms.
                  height:
                    type: number
                    example: 180.6
                    description: Height of the user in Centimeters.
                  birth:
                    type: string
                    example: '1980-01-01'
                    description: Date of birth of the user, following the format "YYYY-MM-DD"
                  lifestyle:
                    type: string
                    example: sedentary
                    enum:
                    - sedentary
                    - light
                    - moderate
                    - high
                    - very high
                    description: Lifestyle of the user. Possible values are ["sedentary",
                      "light", "moderate", "high", "very high"].
                  country:
                    type: string
                    example: US
                    description: Will be used for refining the food recognition capabilities.
                      A 2-letter country code according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  default_portion_size:
                    type: string
                    example: large
                    enum:
                    - small
                    - medium
                    - large
                    description: Default portion size for the user. Possible values
                      are ["small", "medium", "large"]
                  default_salt_level:
                    type: string
                    example: low
                    enum:
                    - none
                    - low
                    - medium
                    - high
                    description: Default salt level for the user. Possible values
                      are ["none", "low", "medium", "high"]
                  default_sugar_level:
                    type: string
                    example: medium
                    enum:
                    - none
                    - low
                    - medium
                    - high
                  default_oil_level:
                    type: string
                    example: high
                    enum:
                    - none
                    - low
                    - medium
                    - high
                    description: Default oil level for the user. Possible values are
                      ["none", "low", "medium", "high"]
                  reference_sugar:
                    type: integer
                    example: 47
                    description: ID of the sugar ingredient the user usually uses.
                      A list of all possible oil modifiers can be retrieved by calling
                      /dataset/referenceIngredients.
                  reference_oil:
                    type: integer
                    example: 562
                    description: ID of the oil ingredient the user usually uses. A
                      list of all possible oil modifiers can be retrieved by calling
                      /dataset/referenceIngredients.
                  reference_nutrients:
                    type: array
                    items:
                      type: string
                    example:
                    - FAPU
                    - ZN
                    description: Nutrients set as reference (important) for the user
                  timezone:
                    type: string
                    example: Europe/Madrid
                    description: Timezone the user is located at. This requires a
                      TZ database name; you can find them here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                  user_id:
                    type: integer
                    example: 123
                    description: ID of the user to be modified. You must be the owner
                      of the user to do any modification.
                  diet_labels:
                    type: array
                    items:
                      type: string
                      enum:
                      - Balanced
                      - High-Fiber
                      - High-Protein
                      - Low-Carb
                      - Low-Fat
                      - High-Sodium
                      - Low-Sodium
                    example:
                    - Balanced
                    - Low-Carb
                    description: This attribute is optional. These are the diet labels
                      of the user. Possible values are ["Balanced", "High-Fiber",
                      "High-Protein", "Low-Carb", "Low-Fat", "High-Sodium", "Low-Sodium"].
                      The information is used for personalizing the recipe recommendation
                      for the user.
                  food_restrictions:
                    type: array
                    items:
                      type: string
                      enum:
                      - Alcohol-Free
                      - Immuno-Supportive
                      - Celery-Free
                      - Crustacean-Free
                      - Dairy-Free
                      - Egg-Free
                      - Fish-Free
                      - Fodmap-Free
                      - Gluten-Free
                      - Keto-Friendly
                      - Kidney-Friendly
                      - Kosher
                      - Low-Potassium
                      - Lupine-Free
                      - Mustard-Free
                      - Low-Fat-Abs
                      - No-oil-added
                      - Low-Sugar
                      - Paleo
                      - Peanut-Free
                      - Pescatarian
                      - Pork-Free
                      - Red-Meat-Free
                      - Sesame-Free
                      - shellfish-Free
                      - Soy-Free
                      - Sugar-Conscious
                      - Tree-Nut-Free
                      - Vegan
                      - Vegetarian
                      - Wheat-Free
                    example:
                    - Alcohol-Free
                    - Dairy-Free
                    description: This attribute is optional. These are food restrictions
                      and allergies of the user. The information is used for personalizing
                      the recipe recommendation for the user
                  weight_system:
                    type: string
                    enum:
                    - metric
                    - imperial
                    description: Set the user's preferred system for measuring weights.
                  preferred_measure:
                    type: string
                    enum:
                    - weight
                    - cooking_measures
                    - portions
                    description: Set the user's preferred way to see food quantity
                      information.
                  min_max_food_groups:
                    type: object
                    description: |
                      Customize the recommended minimum and/or maximum portions per food group.

                      This field allows setting user-specific dietary goals by specifying optional `min` and/or `max` values for one or more food groups.

                      &nbsp;

                      **Important notes:**

                      - If you want to indicate _no minimum_ for a food group, use `null` as the `min` value. Do **not** use `0`, as that implies a strict minimum intake of 0 portions.

                      - If you want to prevent the user from consuming a food group, set `max` to `0`.

                      &nbsp;

                      **Example:**


                          "min_max_food_groups": {

                              "fish": {"min": null, "max": 1},

                              "red meat": {"min": null, "max": 0},

                              "fruit": {"min": 3, "max": 5},

                          }


                      &nbsp;

                      **Available Food Groups:**

                      - ['Dairy Products', 'Vegetables', 'Grains and Tubers', 'Water', 'Fruit', 'Whole Grain', 'Meat', 'Fish', 'Nuts', 'Legumes', 'Egg', 'Red Meat']
                    additionalProperties:
                      type: object
                      properties:
                        min:
                          type: number
                          nullable: true
                          description: Minimum number of portions (use `null` to specify
                            no minimum).
                        max:
                          type: number
                          nullable: true
                          description: Maximum number of portions (use `0` to restrict
                            intake entirely).
                required:
                - user_id
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
      security:
      - Bearer: []
  /v2/image/segmentation/complete:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Multiple Food Dishes Segmentation ⏱⭐ Detects every food item on the
        image and recognises it.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nGiven an image, it segments and detects\
        \ each food item or food region appearing on it. Then the most probable dishes\
        \ are recognized for each of the regions separately. These dishes come with\
        \ their names, the corresponding ids and the associated probabilities (confidence).\n\
        \n&nbsp;\n\nNote that the segmentation_results, which contain the bounding\
        \ boxes and segments detected, might not be directly applicable to the uploaded\
        \ \nimage size. The segmentation pixel values are scaled depending on the\
        \ 'processed_image_size' values provided \nfor each of the images (the images\
        \ might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n**Geographic Personalization**: we recommend\
        \ setting the `country` parameter associated to the end-user (APIUser) before\
        \ applying any food recognition/segmentation call. See any `/modifyUserProfileInfo`\
        \ endpoint for additional details.\n\n&nbsp;\n\n\nIf you have a LogMeal Recommend\
        \ plan or higher we recommend using the /segmentation/complete/quantity endpoint,\
        \ instead. It provides the same information in the current endpoint and furthermore\
        \ it automatically estimates the food quantity present on the picture.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  occasion_info:
                    description: Contains information about the occasion.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Occasion id. Null if default occasion
                          type: integer
                          example: 45
                        translation:
                          description: Translation to the language of the request
                            if available. Not available with default occasions.
                          type: string
                          example: cena
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    imageId: 1365065
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    occasion_info:
                      translation: almuerzo
                      id: 4
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/segmentation/complete/{model_version}:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Multiple Food Dishes Segmentation ⏱⭐ Detects every food item on the
        image and recognises it.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nGiven an image, it segments and detects\
        \ each food item or food region appearing on it. Then the most probable dishes\
        \ are recognized for each of the regions separately. These dishes come with\
        \ their names, the corresponding ids and the associated probabilities (confidence).\n\
        \n&nbsp;\n\nNote that the segmentation_results, which contain the bounding\
        \ boxes and segments detected, might not be directly applicable to the uploaded\
        \ \nimage size. The segmentation pixel values are scaled depending on the\
        \ 'processed_image_size' values provided \nfor each of the images (the images\
        \ might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n**Geographic Personalization**: we recommend\
        \ setting the `country` parameter associated to the end-user (APIUser) before\
        \ applying any food recognition/segmentation call. See any `/modifyUserProfileInfo`\
        \ endpoint for additional details.\n\n&nbsp;\n\n\nIf you have a LogMeal Recommend\
        \ plan or higher we recommend using the /segmentation/complete/quantity endpoint,\
        \ instead. It provides the same information in the current endpoint and furthermore\
        \ it automatically estimates the food quantity present on the picture.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  occasion_info:
                    description: Contains information about the occasion.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Occasion id. Null if default occasion
                          type: integer
                          example: 45
                        translation:
                          description: Translation to the language of the request
                            if available. Not available with default occasions.
                          type: string
                          example: cena
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    imageId: 1365065
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    occasion_info:
                      translation: almuerzo
                      id: 4
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/confirm/type:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Food recognition only on a manually-specified food type ⏱⭐
      description: |
        <span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span> <strong>Consumes your monthly credits. Limited amount of monthly calls, exceeding calls will be charged as extras.</strong>


        <span style='color:orange; font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount of daily calls per user.</strong>


        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>


        &nbsp;


        **Note:** <span style='color:red; font-size: 1.2em; font-weight: bold;'>(M)</span> will only take effect if a recognition process is triggered by choosing a food type recognition that was not previously applied on the same image.


        &nbsp;

        Depending on the detected food type, specific recognition algorithms are applied. This endpoint allows to
        correct the provided food type (if wrong) and thus, apply a new food recognition.

        This correction is intended to be performed by the end user when receiving the result.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 4
                type:
                  type: integer
                  example: 1
              required:
              - imageId
              - type
        description: Parameters sent in data, in json format (type is an id of a food
          type)
        required: true
      responses:
        200:
          description: token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  foodType:
                    description: Array containing one entry for each recognition result.
                      This foodtype corresponds to the recognized dish foodtype (based
                      on the position within the array). Confirmed images will only
                      have the foodtype of the confirmed result.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodType,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 2
                          description: ID of the foodType of the recognition result
                            at the given position.
                        name:
                          type: string
                          example: drinks
                          description: Name of the foodType of the recognition result
                            at the given position.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  recognition_results:
                    description: Array containing the results of the recognition process.
                    type: array
                    items:
                      description: Object containing the information of the class/dish
                        detected by the models, with their respective probability
                        generated by the recognition process.
                      type: object
                      properties:
                        id:
                          description: ID of the detected class.
                          type: integer
                          example: 1474
                        name:
                          description: Name of the detected class.
                          type: string
                          example: mushroom cream
                        prob:
                          description: Probability generated by the recognition process.
                            The sum of all the probabilities among the RecognitionResultsArray
                            will always be 1.
                          type: number
                          format: float
                          example: 0.9973669648170471
                        subclasses:
                          description: Array of subclasses available for the detected
                            class.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: ID of the subclass.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the subclass.
                                type: string
                                example: cream brown soup
                              prob:
                                description: Probability of the subclass generated
                                  by the recognition process.
                                type: number
                                format: float
                                example: 0.9973669648170471
                        nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
              examples:
                Confirm type response example:
                  value:
                    foodFamily:
                    - id: 2
                      name: postre
                      prob: 0.9999074339866638
                    foodType:
                    - id: 1
                      name: comida
                    imageId: 1257852
                    model_versions:
                      foodType: v0.7
                      foodgroups: v0.7
                      foodrec: v0.9
                    recognition_results:
                    - id: 1022
                      name: buñuelos de viento
                      prob: 0.8812140107154847
                      subclasses: []
                    - id: 110
                      name: donuts
                      prob: 0.08308405131101608
                      subclasses: []
                    - id: 193
                      name: churros
                      prob: 0.014977012109011412
                      subclasses: []
                    - id: 2016
                      name: disco nasi
                      prob: 0.005158549454063177
                      subclasses: []
                    - id: 1487
                      name: calamares a la romana
                      prob: 0.0038853646081406625
                      subclasses: []
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Type Value Error:
                  value:
                    message: Wrong type value, it must be one of food, non_food, drinks
                      or ingredients.
                    code: 703
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Image Not Exists:
                  value:
                    message: Image with id={} does not exist.
                    code: 710
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified image id does not exist
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/confirm/type/{model_version}:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Food recognition only on a manually-specified food type ⏱⭐
      description: |
        <span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span> <strong>Consumes your monthly credits. Limited amount of monthly calls, exceeding calls will be charged as extras.</strong>


        <span style='color:orange; font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount of daily calls per user.</strong>


        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>


        &nbsp;


        **Note:** <span style='color:red; font-size: 1.2em; font-weight: bold;'>(M)</span> will only take effect if a recognition process is triggered by choosing a food type recognition that was not previously applied on the same image.


        &nbsp;

        Depending on the detected food type, specific recognition algorithms are applied. This endpoint allows to
        correct the provided food type (if wrong) and thus, apply a new food recognition.

        This correction is intended to be performed by the end user when receiving the result.
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 4
                type:
                  type: integer
                  example: 1
              required:
              - imageId
              - type
        description: Parameters sent in data, in json format (type is an id of a food
          type)
        required: true
      responses:
        200:
          description: token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  foodType:
                    description: Array containing one entry for each recognition result.
                      This foodtype corresponds to the recognized dish foodtype (based
                      on the position within the array). Confirmed images will only
                      have the foodtype of the confirmed result.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodType,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 2
                          description: ID of the foodType of the recognition result
                            at the given position.
                        name:
                          type: string
                          example: drinks
                          description: Name of the foodType of the recognition result
                            at the given position.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  recognition_results:
                    description: Array containing the results of the recognition process.
                    type: array
                    items:
                      description: Object containing the information of the class/dish
                        detected by the models, with their respective probability
                        generated by the recognition process.
                      type: object
                      properties:
                        id:
                          description: ID of the detected class.
                          type: integer
                          example: 1474
                        name:
                          description: Name of the detected class.
                          type: string
                          example: mushroom cream
                        prob:
                          description: Probability generated by the recognition process.
                            The sum of all the probabilities among the RecognitionResultsArray
                            will always be 1.
                          type: number
                          format: float
                          example: 0.9973669648170471
                        subclasses:
                          description: Array of subclasses available for the detected
                            class.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: ID of the subclass.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the subclass.
                                type: string
                                example: cream brown soup
                              prob:
                                description: Probability of the subclass generated
                                  by the recognition process.
                                type: number
                                format: float
                                example: 0.9973669648170471
                        nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
              examples:
                Confirm type response example:
                  value:
                    foodFamily:
                    - id: 2
                      name: postre
                      prob: 0.9999074339866638
                    foodType:
                    - id: 1
                      name: comida
                    imageId: 1257852
                    model_versions:
                      foodType: v0.7
                      foodgroups: v0.7
                      foodrec: v0.9
                    recognition_results:
                    - id: 1022
                      name: buñuelos de viento
                      prob: 0.8812140107154847
                      subclasses: []
                    - id: 110
                      name: donuts
                      prob: 0.08308405131101608
                      subclasses: []
                    - id: 193
                      name: churros
                      prob: 0.014977012109011412
                      subclasses: []
                    - id: 2016
                      name: disco nasi
                      prob: 0.005158549454063177
                      subclasses: []
                    - id: 1487
                      name: calamares a la romana
                      prob: 0.0038853646081406625
                      subclasses: []
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Type Value Error:
                  value:
                    message: Wrong type value, it must be one of food, non_food, drinks
                      or ingredients.
                    code: 703
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Image Not Exists:
                  value:
                    message: Image with id={} does not exist.
                    code: 710
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified image id does not exist
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/confirm/food_group:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Confirm food group after applying image recognition.
      description: |2

        With this endpoint, the user has the option to confirm which of the predicted food groups in the image are the correct ones. Please see endpoint '/v2/image/segmentation/complete' for more information on food groups predictions.

        The user can provide a list of food groups for all the dishes present in the image. These food groups must be from the logmeal database. The complete list of available food groups can be obtained by calling the endpoint '/v2/dataset/foodGroups'.

        &nbsp;
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 1268462
                  description: ID of the image which will have it's food groups confirmed.
                confirmedFoodGroups:
                  type: array
                  items:
                    type: integer
                    example:
                    - 8
                    - 2
                  description: Food group ids to be confirmed for the provided imageId.
                    This variable is a list of integers.
              required:
              - imageId
              - confirmedFoodGroups
      responses:
        200:
          description: token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  recognition_results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        prob:
                          type: number
              examples:
                Confirm dish response example:
                  value:
                    recognition_results:
                    - id: 12
                      name: meat
                      prob: 1.0
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Confirmed food group Error:
                  value:
                    message: The provided food group name does not belong to the currently
                      available food groups.
                    code: 726
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/image/confirm/food_group/{model_version}:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Confirm food group after applying image recognition.
      description: |2

        With this endpoint, the user has the option to confirm which of the predicted food groups in the image are the correct ones. Please see endpoint '/v2/image/segmentation/complete' for more information on food groups predictions.

        The user can provide a list of food groups for all the dishes present in the image. These food groups must be from the logmeal database. The complete list of available food groups can be obtained by calling the endpoint '/v2/dataset/foodGroups'.

        &nbsp;
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 1268462
                  description: ID of the image which will have it's food groups confirmed.
                confirmedFoodGroups:
                  type: array
                  items:
                    type: integer
                    example:
                    - 8
                    - 2
                  description: Food group ids to be confirmed for the provided imageId.
                    This variable is a list of integers.
              required:
              - imageId
              - confirmedFoodGroups
      responses:
        200:
          description: token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  recognition_results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        prob:
                          type: number
              examples:
                Confirm dish response example:
                  value:
                    recognition_results:
                    - id: 12
                      name: meat
                      prob: 1.0
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Confirmed food group Error:
                  value:
                    message: The provided food group name does not belong to the currently
                      available food groups.
                    code: 726
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/image/confirm/dish:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Confirm dish name after applying image recognition.
      description: "When using our recognition endpoints the most probable classes\
        \ are returned concerning dish, drinks, sauces or ingredients (depending on\
        \ the type).\n\n&nbsp;\n\nWith this endpoint, the user has the option to confirm\
        \ which one of the returned food classes is the correct one.\n\n\n&nbsp;\n\
        \n\nBy default, the source is set to 'logmeal' and an ID corresponding to\
        \ an existent dish is expected. The 'source' can also take the value 'other'\
        \ for specifying a free-text feedback for any dish that is not included in\
        \ LogMeal's API. \nDo note that if you confirm a dish with a free-text feedback\
        \ (source 'other') it won't be taken into consideration\nwhen doing any calculation\
        \ that is based on the dish (e.g. generating ingredients or nutritional information).\n\
        \n\n&nbsp;\n\n\nIf a food segmentation endpoint has been used then you have\
        \ to provide a food item identifier for each of the confirmed dishes. This\
        \ implies adding the extra parameter 'food_item_position'.\nThis parameter\
        \ consists of a list of elements, one per each confirmed dish, and it must\
        \ include an integer identifying the segmented region it corresponds to (see\
        \ 'food_item_position' in returned json for /segmentation endpoints).\nIf\
        \ you desire to confirm a dish that does not belong to any of the detected\
        \ regions then a string has to be provided that will act as an unique identifier\
        \ for that extra confirmed dish.\n\n\n&nbsp;\n\n\n**Important notes about\
        \ dish IDs:**\n- If the image is a **default API intake**, the dish IDs you\
        \ can confirm must belong to LogMeal’s global dataset.\nYou can check the\
        \ full list of available dishes in the endpoint `/dataset/dishes`.\n- If the\
        \ image is a **kiosk/tray intake**, then the dish IDs must match the dishes\
        \ actually offered that day and shift in the restaurant.\nThese valid dish\
        \ IDs can be retrieved from the endpoint `/kiosk/external/dishes`.\n\n&nbsp;\n\
        \nTo know if an image is of type *kiosk*, you can check the endpoints `[GET]\
        \ /intake` or `/getIntakesList`.\nIf the field `is_kiosk_image` is `true`,\
        \ then you must use the kiosk dish IDs instead of the global dataset.\n\n\
        &nbsp;\n\n**Example payload**\n\nSuppose an image has already detected dishes\
        \ with IDs `2284`, `2270`, and `2290`.\nIf you want to confirm those three\
        \ and also add a new dish with ID `2267`, you need to send *all* the confirmed\
        \ IDs and their positions, plus the new one:\n\n```json\n{\n  \"imageId\"\
        : 1982196,\n  \"confirmedClass\": [ 2284, 2270, 2299, 2267 ],\n  \"source\"\
        : [ \"logmeal\", \"logmeal\", \"logmeal\", \"logmeal\" ],\n  \"food_item_position\"\
        : [ 1, 2, 3, 4 ]\n}\n```\n\nEach list must include both the existing confirmed\
        \ dishes and any new ones you are adding.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 1268462
                  description: ID of the image which will have it's dishes confirmed.
                confirmedClass:
                  type: array
                  items:
                    type: integer
                    example:
                    - 110
                    - free text label
                  description: Classes to be confirmed for the provided imageId. This
                    variable is a list of integers containing all the confirmed classes.
                    Note that whenever the source is set to 'logmeal' an integer corresponding
                    to an existent dish must be provided in the list. If the source
                    is other than 'logmeal', than a string can be provided in the
                    list along with the integer ids as the name of that particular
                    confirmed class.
                source:
                  type: array
                  items:
                    type: integer
                    example:
                    - logmeal
                    - other
                  description: Source of the 'confirmedClass' being confirmed. If
                    a list of 'confirmedClass' are provided, the source provided can
                    also be a list containing each source relative to the 'confirmedClass'
                    list.
                food_item_position:
                  type: array
                  items:
                    type: integer
                    example:
                    - 1
                    - extra_dish_1
                  description: Integer identifiers pointing to one of the detected
                    regions in /segmentation endpoints or string unique identifier
                    if the confirmed dish does not correspond to any of the detected
                    food regions/segments.
              required:
              - imageId
              - confirmedClass
              - source
            example:
              imageId: 1268462
              confirmedClass:
              - 110
              - Red velvet donut
              source:
              - logmeal
              - other
              food_item_position:
              - 1
              - extra_dish_1
      responses:
        200:
          description: token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  recognition_results:
                    description: Array containing the results of the recognition process.
                    type: array
                    items:
                      description: Object containing the information of the class/dish
                        detected by the models, with their respective probability
                        generated by the recognition process.
                      type: object
                      properties:
                        id:
                          description: ID of the detected class.
                          type: integer
                          example: 1474
                        name:
                          description: Name of the detected class.
                          type: string
                          example: mushroom cream
                        prob:
                          description: Probability generated by the recognition process.
                            The sum of all the probabilities among the RecognitionResultsArray
                            will always be 1.
                          type: number
                          format: float
                          example: 0.9973669648170471
                        subclasses:
                          description: Array of subclasses available for the detected
                            class.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: ID of the subclass.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the subclass.
                                type: string
                                example: cream brown soup
                              prob:
                                description: Probability of the subclass generated
                                  by the recognition process.
                                type: number
                                format: float
                                example: 0.9973669648170471
                        nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                  source:
                    type: string
                    example: logmeal
                    description: Source of the confirmed dish.
              examples:
                Confirm dish response example:
                  value:
                    recognition_results:
                    - id: 110
                      name: donuts
                      prob: 1.0
                    source: logmeal
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Feedback Source Is Not Valid:
                  value:
                    message: 'Parameter source is not valid. It must be one of: logmeal,
                      google, other'
                    code: 707
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Confirmed Class Error:
                  value:
                    message: The provided dish name does not belong to the current
                      food type.
                    code: 702
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/image/confirm/dish/{model_version}:
    post:
      tags:
      - Image-based Food Recognition
      summary: 🔴 Confirm dish name after applying image recognition.
      description: "When using our recognition endpoints the most probable classes\
        \ are returned concerning dish, drinks, sauces or ingredients (depending on\
        \ the type).\n\n&nbsp;\n\nWith this endpoint, the user has the option to confirm\
        \ which one of the returned food classes is the correct one.\n\n\n&nbsp;\n\
        \n\nBy default, the source is set to 'logmeal' and an ID corresponding to\
        \ an existent dish is expected. The 'source' can also take the value 'other'\
        \ for specifying a free-text feedback for any dish that is not included in\
        \ LogMeal's API. \nDo note that if you confirm a dish with a free-text feedback\
        \ (source 'other') it won't be taken into consideration\nwhen doing any calculation\
        \ that is based on the dish (e.g. generating ingredients or nutritional information).\n\
        \n\n&nbsp;\n\n\nIf a food segmentation endpoint has been used then you have\
        \ to provide a food item identifier for each of the confirmed dishes. This\
        \ implies adding the extra parameter 'food_item_position'.\nThis parameter\
        \ consists of a list of elements, one per each confirmed dish, and it must\
        \ include an integer identifying the segmented region it corresponds to (see\
        \ 'food_item_position' in returned json for /segmentation endpoints).\nIf\
        \ you desire to confirm a dish that does not belong to any of the detected\
        \ regions then a string has to be provided that will act as an unique identifier\
        \ for that extra confirmed dish.\n\n\n&nbsp;\n\n\n**Important notes about\
        \ dish IDs:**\n- If the image is a **default API intake**, the dish IDs you\
        \ can confirm must belong to LogMeal’s global dataset.\nYou can check the\
        \ full list of available dishes in the endpoint `/dataset/dishes`.\n- If the\
        \ image is a **kiosk/tray intake**, then the dish IDs must match the dishes\
        \ actually offered that day and shift in the restaurant.\nThese valid dish\
        \ IDs can be retrieved from the endpoint `/kiosk/external/dishes`.\n\n&nbsp;\n\
        \nTo know if an image is of type *kiosk*, you can check the endpoints `[GET]\
        \ /intake` or `/getIntakesList`.\nIf the field `is_kiosk_image` is `true`,\
        \ then you must use the kiosk dish IDs instead of the global dataset.\n\n\
        &nbsp;\n\n**Example payload**\n\nSuppose an image has already detected dishes\
        \ with IDs `2284`, `2270`, and `2290`.\nIf you want to confirm those three\
        \ and also add a new dish with ID `2267`, you need to send *all* the confirmed\
        \ IDs and their positions, plus the new one:\n\n```json\n{\n  \"imageId\"\
        : 1982196,\n  \"confirmedClass\": [ 2284, 2270, 2299, 2267 ],\n  \"source\"\
        : [ \"logmeal\", \"logmeal\", \"logmeal\", \"logmeal\" ],\n  \"food_item_position\"\
        : [ 1, 2, 3, 4 ]\n}\n```\n\nEach list must include both the existing confirmed\
        \ dishes and any new ones you are adding.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 1268462
                  description: ID of the image which will have it's dishes confirmed.
                confirmedClass:
                  type: array
                  items:
                    type: integer
                    example:
                    - 110
                    - free text label
                  description: Classes to be confirmed for the provided imageId. This
                    variable is a list of integers containing all the confirmed classes.
                    Note that whenever the source is set to 'logmeal' an integer corresponding
                    to an existent dish must be provided in the list. If the source
                    is other than 'logmeal', than a string can be provided in the
                    list along with the integer ids as the name of that particular
                    confirmed class.
                source:
                  type: array
                  items:
                    type: integer
                    example:
                    - logmeal
                    - other
                  description: Source of the 'confirmedClass' being confirmed. If
                    a list of 'confirmedClass' are provided, the source provided can
                    also be a list containing each source relative to the 'confirmedClass'
                    list.
                food_item_position:
                  type: array
                  items:
                    type: integer
                    example:
                    - 1
                    - extra_dish_1
                  description: Integer identifiers pointing to one of the detected
                    regions in /segmentation endpoints or string unique identifier
                    if the confirmed dish does not correspond to any of the detected
                    food regions/segments.
              required:
              - imageId
              - confirmedClass
              - source
            example:
              imageId: 1268462
              confirmedClass:
              - 110
              - Red velvet donut
              source:
              - logmeal
              - other
              food_item_position:
              - 1
              - extra_dish_1
      responses:
        200:
          description: token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  recognition_results:
                    description: Array containing the results of the recognition process.
                    type: array
                    items:
                      description: Object containing the information of the class/dish
                        detected by the models, with their respective probability
                        generated by the recognition process.
                      type: object
                      properties:
                        id:
                          description: ID of the detected class.
                          type: integer
                          example: 1474
                        name:
                          description: Name of the detected class.
                          type: string
                          example: mushroom cream
                        prob:
                          description: Probability generated by the recognition process.
                            The sum of all the probabilities among the RecognitionResultsArray
                            will always be 1.
                          type: number
                          format: float
                          example: 0.9973669648170471
                        subclasses:
                          description: Array of subclasses available for the detected
                            class.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: ID of the subclass.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the subclass.
                                type: string
                                example: cream brown soup
                              prob:
                                description: Probability of the subclass generated
                                  by the recognition process.
                                type: number
                                format: float
                                example: 0.9973669648170471
                        nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                  source:
                    type: string
                    example: logmeal
                    description: Source of the confirmed dish.
              examples:
                Confirm dish response example:
                  value:
                    recognition_results:
                    - id: 110
                      name: donuts
                      prob: 1.0
                    source: logmeal
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Feedback Source Is Not Valid:
                  value:
                    message: 'Parameter source is not valid. It must be one of: logmeal,
                      google, other'
                    code: 707
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Confirmed Class Error:
                  value:
                    message: The provided dish name does not belong to the current
                      food type.
                    code: 702
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/nutrition/recipe/ingredients:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴 Identifies the ingredients on the image. ⏱
      description: "<span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n\n&nbsp;\n\n\nReturns\
        \ the list of most likely ingredients (recipe-like) to be present on the recognized\
        \ or confirmed food dish (see /confirm/dish).\nMake sure you first confirm\
        \ the correct food items with the /confirm/dish endpoint before calling this.\
        \ Otherwise, \nthe top 1 predictions for each of the detected food item positions\
        \ will be considered the correct ones and will \nbe returned in this endpoint.\n\
        \n\n&nbsp;\n\n\nAll the information provided is scaled to the standard/average\
        \ portion for a single person. If the endpoint /confirm/quantity\nhas been\
        \ used, then all ingredient quantities will be rescaled according to the confirm\
        \ food quantity per item.\n\n\n&nbsp;\n\n\nNote that, in all the cases, the\
        \ ‘weight’ attribute associated to each ingredient is specified in grams or\n\
        milliliters.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
              - type: object
                properties:
                  class_id:
                    type: integer
                    example: 481
        description: Parameters sent in data, in json format. You can choose imageId
          or class_id parameter.
        required: true
      responses:
        200:
          description: |
            token is valid, recipe information is sent in response (JSON format).

            - "recipe" will be empty if "hasRecipe" == False
            - "foodName" and "dish_id" will become a list if several dishes where recognized/confirmed (e.g. "foodName": [324, 435])
          content:
            application/json:
              schema:
                type: object
                properties:
                  dish_id:
                    type: integer
                    example: 241
                    description: IDs of the dishes the information has been obtained
                      from. If there are multiple foods for this image, a list of
                      ids will be returned instead. For dishes coming from manual
                      inputs (not in our database) a null ID will be provided. Note
                      that dishes with null ids won't have effect on the recipe returned.
                  foodName:
                    type: string
                    example: spaghetti bolognese
                    description: Name of the food. If there are multiple foods for
                      this image, a list of foodNames will be returned instead.
                  hasRecipe:
                    type: boolean
                    example: true
                    description: Boolean that describes whether the dish has a recipe
                      or not.
                  imageId:
                    type: integer
                    example: 323425
                    description: ID of the image the ingredients have been queried
                      from.
                  is_combo:
                    type: boolean
                    example: false
                    description: Boolean that describes if the recipe is from a combo
                      image.
                  recipe:
                    type: array
                    description: Array containing the ingredients and their quantity
                      of the recipe.
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        measure:
                          type: object
                          description: Only available for Monitor plans and higher.
                            Weight information for the current ingredient. The 'preferred'
                            field will display the user's preferred measurement system,
                            unless it has been manually set for this ingredient by
                            calling /nutrition/confirm/ingredients.
                          properties:
                            metric:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: ID of the returned weight measure.
                                grams_conversion:
                                  type: number
                                  description: Amount of grams that correspond to
                                    one unit of this weight measure.
                                name:
                                  type: string
                                  description: Translated name of the weight measure.
                                short:
                                  type: string
                                  description: Short name of the weight measure.
                                type:
                                  description: Type of weight measure displayed.
                                  type: string
                                  enum:
                                  - weight
                                  - cooking_measures
                                  - portions
                            preferred:
                              oneOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  short:
                                    type: string
                                    description: Short name of the weight measure.
                                  type:
                                    description: Type of weight measure displayed.
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  type:
                                    type: string
                                    description: Type of weight measure displayed.
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                        name:
                          type: string
                        unit:
                          type: string
                        weight:
                          type: number
                      example:
                        id: 144
                        name: spaghetti
                        unit: g
                        weight: 85.0
                  recipe_per_item:
                    type: array
                    items:
                      type: object
                      properties:
                        food_item_position:
                          example: 1
                          oneOf:
                          - type: integer
                          - type: string
                        foodGroups:
                          description: List of food groups belonging to the identified
                            food item.
                          type: array
                          items:
                            type: object
                            description: Nutritional information related to one of
                              the food segments/regions detected or confirmed on the
                              image.
                            properties:
                              id:
                                description: Food Group identifier
                                type: integer
                                example: 1
                              name:
                                description: Name of the food group translated into
                                  the user language
                                type: string
                                example: vegetables
                        dish_id:
                          description: Id of the identified food item.
                          type: integer
                        measure:
                          type: object
                          description: Only available for Monitor plan and higher.
                            Weight information for the current dish. The 'preferred'
                            field will display the user's preferred measurement system,
                            unless it has been manually set for this dish by calling
                            /nutrition/confirm/quantity.
                          properties:
                            metric:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: ID of the returned weight measure.
                                grams_conversion:
                                  type: number
                                  description: Amount of grams that correspond to
                                    one unit of this weight measure.
                                name:
                                  type: string
                                  description: Translated name of the weight measure.
                                short:
                                  type: string
                                  description: Short name of the weight measure.
                                type:
                                  description: Type of weight measure displayed.
                                  type: string
                                  enum:
                                  - weight
                                  - cooking_measures
                                  - portions
                            portions:
                              type: object
                              description: Portion information for the current dish.
                              properties:
                                grams_conversion:
                                  type: number
                                  description: Amount of grams that correspond to
                                    one unit of this weight measure.
                                quantity:
                                  type: number
                                  description: Amount of portions in this dish.
                                type:
                                  type: string
                                  enum:
                                  - weight
                                  - cooking_measures
                                  - portions
                            preferred:
                              description: Weight information displayed in the user's
                                preferred measurement system, unless it has been manually
                                set for this dish by calling /nutrition/confirm/ingredients.
                              oneOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  short:
                                    type: string
                                    description: Short name of the weight measure.
                                  type:
                                    description: Type of weight measure displayed.
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  type:
                                    type: string
                                    description: Type of weight measure displayed.
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                              - type: object
                                description: Portion information for the current dish.
                                properties:
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  quantity:
                                    type: number
                                    description: Amount of portions in this dish.
                                  type:
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                        levels:
                          description: Only available for Monitor plans and higher.
                            Shows the current modulation levels for this segment.
                          type: object
                          properties:
                            salt:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                              - none
                            sugar:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                              - none
                            oil:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                              - none
                        recipe:
                          type: array
                          description: Array containing the ingredients and their
                            quantity of the recipe.
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              measure:
                                type: object
                                description: Only available for Monitor plans and
                                  higher. Weight information for the current ingredient.
                                  The 'preferred' field will display the user's preferred
                                  measurement system, unless it has been manually
                                  set for this ingredient by calling /nutrition/confirm/ingredients.
                                properties:
                                  metric:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      short:
                                        type: string
                                        description: Short name of the weight measure.
                                      type:
                                        description: Type of weight measure displayed.
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  preferred:
                                    oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        short:
                                          type: string
                                          description: Short name of the weight measure.
                                        type:
                                          description: Type of weight measure displayed.
                                          type: string
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        type:
                                          type: string
                                          description: Type of weight measure displayed.
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                              name:
                                type: string
                              unit:
                                type: string
                              weight:
                                type: number
                            example:
                              id: 144
                              name: spaghetti
                              unit: g
                              weight: 85.0
                        serving_size:
                          example: 85.0
                          type: number
                    description: In the case of food segmentation, this field shows
                      an array of recipes for each food segment.
                  serving_size:
                    type: number
                    example: 85.0
                    description: Detected weight for the product if detected automatically
                      or confirmed by the user. Depending on the context, it can also
                      correspond to the standard quantity of food corresponding to
                      one portion for the average person.
                  source:
                    type: string
                    example: eurecat
                    description: Source where the recipe has been obtained from.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or could not be retrieved
      security:
      - Bearer: []
  /v2/nutrition/recipe/ingredients/{model_version}:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴 Identifies the ingredients on the image. ⏱
      description: "<span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n\n&nbsp;\n\n\nReturns\
        \ the list of most likely ingredients (recipe-like) to be present on the recognized\
        \ or confirmed food dish (see /confirm/dish).\nMake sure you first confirm\
        \ the correct food items with the /confirm/dish endpoint before calling this.\
        \ Otherwise, \nthe top 1 predictions for each of the detected food item positions\
        \ will be considered the correct ones and will \nbe returned in this endpoint.\n\
        \n\n&nbsp;\n\n\nAll the information provided is scaled to the standard/average\
        \ portion for a single person. If the endpoint /confirm/quantity\nhas been\
        \ used, then all ingredient quantities will be rescaled according to the confirm\
        \ food quantity per item.\n\n\n&nbsp;\n\n\nNote that, in all the cases, the\
        \ ‘weight’ attribute associated to each ingredient is specified in grams or\n\
        milliliters.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
              - type: object
                properties:
                  class_id:
                    type: integer
                    example: 481
        description: Parameters sent in data, in json format. You can choose imageId
          or class_id parameter.
        required: true
      responses:
        200:
          description: |
            token is valid, recipe information is sent in response (JSON format).

            - "recipe" will be empty if "hasRecipe" == False
            - "foodName" and "dish_id" will become a list if several dishes where recognized/confirmed (e.g. "foodName": [324, 435])
          content:
            application/json:
              schema:
                type: object
                properties:
                  dish_id:
                    type: integer
                    example: 241
                    description: IDs of the dishes the information has been obtained
                      from. If there are multiple foods for this image, a list of
                      ids will be returned instead. For dishes coming from manual
                      inputs (not in our database) a null ID will be provided. Note
                      that dishes with null ids won't have effect on the recipe returned.
                  foodName:
                    type: string
                    example: spaghetti bolognese
                    description: Name of the food. If there are multiple foods for
                      this image, a list of foodNames will be returned instead.
                  hasRecipe:
                    type: boolean
                    example: true
                    description: Boolean that describes whether the dish has a recipe
                      or not.
                  imageId:
                    type: integer
                    example: 323425
                    description: ID of the image the ingredients have been queried
                      from.
                  is_combo:
                    type: boolean
                    example: false
                    description: Boolean that describes if the recipe is from a combo
                      image.
                  recipe:
                    type: array
                    description: Array containing the ingredients and their quantity
                      of the recipe.
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        measure:
                          type: object
                          description: Only available for Monitor plans and higher.
                            Weight information for the current ingredient. The 'preferred'
                            field will display the user's preferred measurement system,
                            unless it has been manually set for this ingredient by
                            calling /nutrition/confirm/ingredients.
                          properties:
                            metric:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: ID of the returned weight measure.
                                grams_conversion:
                                  type: number
                                  description: Amount of grams that correspond to
                                    one unit of this weight measure.
                                name:
                                  type: string
                                  description: Translated name of the weight measure.
                                short:
                                  type: string
                                  description: Short name of the weight measure.
                                type:
                                  description: Type of weight measure displayed.
                                  type: string
                                  enum:
                                  - weight
                                  - cooking_measures
                                  - portions
                            preferred:
                              oneOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  short:
                                    type: string
                                    description: Short name of the weight measure.
                                  type:
                                    description: Type of weight measure displayed.
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  type:
                                    type: string
                                    description: Type of weight measure displayed.
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                        name:
                          type: string
                        unit:
                          type: string
                        weight:
                          type: number
                      example:
                        id: 144
                        name: spaghetti
                        unit: g
                        weight: 85.0
                  recipe_per_item:
                    type: array
                    items:
                      type: object
                      properties:
                        food_item_position:
                          example: 1
                          oneOf:
                          - type: integer
                          - type: string
                        foodGroups:
                          description: List of food groups belonging to the identified
                            food item.
                          type: array
                          items:
                            type: object
                            description: Nutritional information related to one of
                              the food segments/regions detected or confirmed on the
                              image.
                            properties:
                              id:
                                description: Food Group identifier
                                type: integer
                                example: 1
                              name:
                                description: Name of the food group translated into
                                  the user language
                                type: string
                                example: vegetables
                        dish_id:
                          description: Id of the identified food item.
                          type: integer
                        measure:
                          type: object
                          description: Only available for Monitor plan and higher.
                            Weight information for the current dish. The 'preferred'
                            field will display the user's preferred measurement system,
                            unless it has been manually set for this dish by calling
                            /nutrition/confirm/quantity.
                          properties:
                            metric:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: ID of the returned weight measure.
                                grams_conversion:
                                  type: number
                                  description: Amount of grams that correspond to
                                    one unit of this weight measure.
                                name:
                                  type: string
                                  description: Translated name of the weight measure.
                                short:
                                  type: string
                                  description: Short name of the weight measure.
                                type:
                                  description: Type of weight measure displayed.
                                  type: string
                                  enum:
                                  - weight
                                  - cooking_measures
                                  - portions
                            portions:
                              type: object
                              description: Portion information for the current dish.
                              properties:
                                grams_conversion:
                                  type: number
                                  description: Amount of grams that correspond to
                                    one unit of this weight measure.
                                quantity:
                                  type: number
                                  description: Amount of portions in this dish.
                                type:
                                  type: string
                                  enum:
                                  - weight
                                  - cooking_measures
                                  - portions
                            preferred:
                              description: Weight information displayed in the user's
                                preferred measurement system, unless it has been manually
                                set for this dish by calling /nutrition/confirm/ingredients.
                              oneOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  short:
                                    type: string
                                    description: Short name of the weight measure.
                                  type:
                                    description: Type of weight measure displayed.
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: ID of the returned weight measure.
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  name:
                                    type: string
                                    description: Translated name of the weight measure.
                                  type:
                                    type: string
                                    description: Type of weight measure displayed.
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                              - type: object
                                description: Portion information for the current dish.
                                properties:
                                  grams_conversion:
                                    type: number
                                    description: Amount of grams that correspond to
                                      one unit of this weight measure.
                                  quantity:
                                    type: number
                                    description: Amount of portions in this dish.
                                  type:
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    - portions
                        levels:
                          description: Only available for Monitor plans and higher.
                            Shows the current modulation levels for this segment.
                          type: object
                          properties:
                            salt:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                              - none
                            sugar:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                              - none
                            oil:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                              - none
                        recipe:
                          type: array
                          description: Array containing the ingredients and their
                            quantity of the recipe.
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              measure:
                                type: object
                                description: Only available for Monitor plans and
                                  higher. Weight information for the current ingredient.
                                  The 'preferred' field will display the user's preferred
                                  measurement system, unless it has been manually
                                  set for this ingredient by calling /nutrition/confirm/ingredients.
                                properties:
                                  metric:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      short:
                                        type: string
                                        description: Short name of the weight measure.
                                      type:
                                        description: Type of weight measure displayed.
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  preferred:
                                    oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        short:
                                          type: string
                                          description: Short name of the weight measure.
                                        type:
                                          description: Type of weight measure displayed.
                                          type: string
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        type:
                                          type: string
                                          description: Type of weight measure displayed.
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                              name:
                                type: string
                              unit:
                                type: string
                              weight:
                                type: number
                            example:
                              id: 144
                              name: spaghetti
                              unit: g
                              weight: 85.0
                        serving_size:
                          example: 85.0
                          type: number
                    description: In the case of food segmentation, this field shows
                      an array of recipes for each food segment.
                  serving_size:
                    type: number
                    example: 85.0
                    description: Detected weight for the product if detected automatically
                      or confirmed by the user. Depending on the context, it can also
                      correspond to the standard quantity of food corresponding to
                      one portion for the average person.
                  source:
                    type: string
                    example: eurecat
                    description: Source where the recipe has been obtained from.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or could not be retrieved
      security:
      - Bearer: []
  /v2/nutrition/recipe/nutritionalInfo:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴🔵 Identifies the nutritional information for the dishes on the image.
        ⏱
      description: "<span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n\n&nbsp;\n\n\nThis\
        \ endpoint provides all the nutritional information of the provided imageId\
        \ or class_id. Make sure you first \nconfirm the correct food items with the\
        \ /confirm/dish endpoint before calling this. Otherwise, the top 1 predictions\n\
        for each of the detected food item positions will be considered the correct\
        \ ones and will be returned in this endpoint.\n\n&nbsp;\n\nIf a food segmentation\
        \ has been applied on the image (see /segmentation endpoints), then an extra\
        \ attribute \nnamed 'nutritional_info_per_item' will be returned in the response.\
        \ This contains the detailed nutritional \ninformation for each of the food\
        \ segments/regions that have been detected or confirmed on the image.\n\n\
        &nbsp;\n\nSome extra information related to the daily intake reference is\
        \ also provided, which serves as a fast and simple way to\ncompare the nutritional\
        \ information of the intake with what is the global average intake expected\
        \ from people (note that these are just approximations).\n\nThe way the 'dailyIntakeReference'\
        \ levels are generated is the following:\n  - LOW - If the intake represents\
        \ less than 20% of the daily reference value\n  - MEDIUM - If the intake represents\
        \ more than 20% and less than 35% of the daily reference value\n  - HIGH -\
        \ If the intake represents equal or more than 35% of the daily reference value\n\
        \  - NONE - If the reference value could not be calculated or the nutritional\
        \ indicator has the levels disabled.\n\n\n&nbsp;\n\n\nUnless an automated\
        \ quantity recognition is done on the image or the /confirm/quantity endpoint\
        \ has been used, all the information provided is scaled to the standard/average\
        \ portion for a single person.\n\n\n&nbsp;\n\n\nBe aware that not all the\
        \ entries of this response will contain nutritional information. If the images\
        \ have not been confirmed or don't have any prediction on a dish level, the\
        \ nutritional information won't be generated. If the element from the intake\
        \ list has the flag 'hasNutritionalInfo' set to False, 'nutritional_info'\
        \ won't be present in the object. Also, confirmed dishes that are not in the\
        \ 'logmeal' database won't contribute to the nutritional information. They\
        \ will still be returned in the 'foodNames' field, and will be represented\
        \ with a null value in the 'ids' field.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format. You can chose imageId
          or class_id parameter.
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 3
                class_id:
                  type: integer
                  example: 481
      responses:
        200:
          description: |
            token is valid, recipe information is sent in response (JSON format).

            - "nutritional_info" will be empty if "hasNutritionaInfo" == False
            - "foodName" and "ids" will become a list if several dishes where recognized/confirmed (e.g. "foodName": [324, 435])
          content:
            application/json:
              schema:
                type: object
                properties:
                  foodName:
                    type: string
                    example: spaghetti bolognese
                    description: Name of the food/recipe. If there are multiple foods
                      for this image, a list of foodNames will be returned instead.
                  hasNutritionalInfo:
                    type: boolean
                    example: true
                    description: Boolean that describes if the image has nutritional
                      information associated to it.
                  ids:
                    type: integer
                    example: 324
                    description: IDs of the dishes the information has been obtained
                      from. If there are multiple foods for this image, a list of
                      ids will be returned instead. For dishes coming from manual
                      inputs (not in our database) a null ID will be provided. Note
                      that dishes with null ids won't have effect on the nutritional
                      information returned.
                  imageId:
                    type: integer
                    example: 323425
                    description: ID of the image the nutrients have been queried from.
                  nutritional_info:
                    type: object
                    description: Object containing all the nutritional information
                      related to the food intake.
                    properties:
                      calories:
                        type: number
                        format: float
                        description: Total amount of calories obtained from this food
                          intake.
                        example: 340.26
                      totalNutrients:
                        type: object
                        description: Contains basic information of the nutrient and
                          it's amount found in the current food intake. The key 'NutrientCodeSample'
                          will be replaced by each nutrient code (for each nutrient,
                          a NutrientCodeSample will be returned).
                        properties:
                          label:
                            type: string
                            description: Translated label of the nutritional indicator.
                            example: Sugars
                          quantity:
                            type: number
                            format: float
                            description: Amount of the nutrient.
                            example: 20.3
                          unit:
                            type: string
                            description: Unit used to measure the quantity provided.
                            example: g
                      dailyIntakeReference:
                        type: object
                        description: 'Contains information about the nutrient intake
                          with relation to the daily reference value the user should
                          intake. The key ''DailyReferenceNutrientCodeSample'' will
                          be replaced by each nutrient code we have daily reference
                          values for. These are only approximations, they should be
                          used as a simple reference to help the users understand
                          how every single intake affects their total daily nutrients. '
                        properties:
                          label:
                            type: string
                            description: Translated label of the nutritional indicator.
                            example: Sugars
                          level:
                            type: string
                            description: Level that we assign to the nutrient with
                              relation to the daily reference value the user should
                              intake. It's value will be one of ['NONE', 'LOW', 'MEDIUM',
                              'HIGH']. You can use this levels to display which nutrients
                              from the intake represent a high portion of the user's
                              expected intake.
                            example: HIGH
                          percent:
                            type: number
                            format: float
                            description: Percentage of the total amount of the nutrient
                              the user should intake with relation to the daily reference
                              value.
                  nutritional_info_per_item:
                    description: List of nutritional info for each of the food items
                      on the image.
                    type: array
                    items:
                      type: object
                      description: Nutritional information related to one of the food
                        segments/regions detected or confirmed on the image.
                      properties:
                        food_item_position:
                          description: Identifier for a food item in the segmentation_results
                            list. This value can either be an integer (if providing
                            from the original food segmentation result) or a string
                            (if confirmed an extra region that was not originally
                            detected).
                          type: integer
                          example: 1
                        hasNutriScore:
                          description: Either if the food item has nutri score or
                            not (only present of Custom Plans).
                          type: boolean
                          example: true
                        hasNutritionalInfo:
                          description: Either if the food item has nutritional info
                            or not.
                          type: integer
                          example: 1
                        id:
                          description: Identifier of the food item/dish detected on
                            this region.
                          type: integer
                          example: 234
                        nutri_score:
                          description: Nutritional score associated to the recognized
                            food item (this information is only provided if you have
                            a Monitor plan or higher).
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                        serving_size:
                          description: Food quantity (in grams) corresponding to this
                            food item.
                          type: number
                          format: float
                          example: 56.705
                        nutritional_info:
                          type: object
                          description: Object containing all the nutritional information
                            related to the food intake.
                          properties:
                            calories:
                              type: number
                              format: float
                              description: Total amount of calories obtained from
                                this food intake.
                              example: 340.26
                            totalNutrients:
                              type: object
                              description: Contains basic information of the nutrient
                                and it's amount found in the current food intake.
                                The key 'NutrientCodeSample' will be replaced by each
                                nutrient code (for each nutrient, a NutrientCodeSample
                                will be returned).
                              properties:
                                label:
                                  type: string
                                  description: Translated label of the nutritional
                                    indicator.
                                  example: Sugars
                                quantity:
                                  type: number
                                  format: float
                                  description: Amount of the nutrient.
                                  example: 20.3
                                unit:
                                  type: string
                                  description: Unit used to measure the quantity provided.
                                  example: g
                            dailyIntakeReference:
                              type: object
                              description: 'Contains information about the nutrient
                                intake with relation to the daily reference value
                                the user should intake. The key ''DailyReferenceNutrientCodeSample''
                                will be replaced by each nutrient code we have daily
                                reference values for. These are only approximations,
                                they should be used as a simple reference to help
                                the users understand how every single intake affects
                                their total daily nutrients. '
                              properties:
                                label:
                                  type: string
                                  description: Translated label of the nutritional
                                    indicator.
                                  example: Sugars
                                level:
                                  type: string
                                  description: Level that we assign to the nutrient
                                    with relation to the daily reference value the
                                    user should intake. It's value will be one of
                                    ['NONE', 'LOW', 'MEDIUM', 'HIGH']. You can use
                                    this levels to display which nutrients from the
                                    intake represent a high portion of the user's
                                    expected intake.
                                  example: HIGH
                                percent:
                                  type: number
                                  format: float
                                  description: Percentage of the total amount of the
                                    nutrient the user should intake with relation
                                    to the daily reference value.
                  serving_size:
                    type: number
                    format: float
                    example: 16.0
                    description: Detected weight for the product if detected automatically
                      or confirmed by the user. Depending on the context, it can also
                      correspond to the standard quantity of food corresponding to
                      one portion for the average person.
              examples:
                Nutritional Info Example:
                  value:
                    foodName:
                    - canelones de carne
                    - rollitos de primavera
                    - ensalada con ketchup
                    hasNutritionalInfo: true
                    ids:
                    - 947
                    - 7
                    - null
                    imageId: 1365065
                    image_nutri_score:
                      nutri_score_category: A
                      nutri_score_standardized: 81
                    nutritional_info:
                      calories: 485.87
                      dailyIntakeReference:
                        CHOCDF:
                          label: Carbohidratos
                          level: MEDIUM
                          percent: 7.752875351401513
                        ENERC_KCAL:
                          label: Energía
                          level: NONE
                          percent: 15.276678948661262
                        FASAT:
                          label: Saturadas
                          level: MEDIUM
                          percent: 19.89415153748242
                        FAT:
                          label: Grasas
                          level: HIGH
                          percent: 20.099463101379094
                        NA:
                          label: Sodio
                          level: HIGH
                          percent: 33.263999999999996
                        PROCNT:
                          label: Proteína
                          level: NONE
                          percent: 23.09722426922132
                        SUGAR:
                          label: Azúcares
                          level: MEDIUM
                          percent: 8.399999999999999
                      totalNutrients:
                        ALC:
                          label: Alcohol
                          quantity: 0.0
                          unit: g
                        CA:
                          label: Calcio
                          quantity: 106.07000000000001
                          unit: mg
                        CHOCDF:
                          label: Carbohidratos
                          quantity: 27.740000000000002
                          unit: g
                        CHOLE:
                          label: Colesterol
                          quantity: 134.55
                          unit: mg
                        ENERC_KCAL:
                          label: Energía
                          quantity: 485.87
                          unit: kcal
                        F18D3CN3:
                          label: Ácido alfa-linolénico (ALA)
                          quantity: 0.0
                          unit: g
                        F20D5:
                          label: Ácido eicosapentaenoico (EPA)
                          quantity: 0.020999999999999998
                          unit: g
                        F22D6:
                          label: Ácido docosahexaenoico (DHA)
                          quantity: 0.0021
                          unit: g
                        FAMS:
                          label: Grasas monosaturadas
                          quantity: 10.45
                          unit: g
                        FAPU:
                          label: Poliinsaturada
                          quantity: 3.69
                          unit: g
                        FASAT:
                          label: Saturadas
                          quantity: 8.120000000000001
                          unit: g
                        FAT:
                          label: Grasas
                          quantity: 24.86
                          unit: g
                        FATRN:
                          label: Grasas trans
                          quantity: 0.07
                          unit: g
                        FE:
                          label: Hierro
                          quantity: 3.5999999999999996
                          unit: mg
                        FIBTG:
                          label: Fibra
                          quantity: 2.54
                          unit: g
                        FOLAC:
                          label: Ácido fólico
                          quantity: 0.0
                          unit: µg
                        FOLDFE:
                          label: Folato equivalente (total)
                          quantity: 93.97
                          unit: µg
                        FOLFD:
                          label: Folato (comida)
                          quantity: 93.97
                          unit: µg
                        K:
                          label: Potasio
                          quantity: 714.03
                          unit: mg
                        MG:
                          label: Magnesio
                          quantity: 76.93
                          unit: mg
                        NA:
                          label: Sodio
                          quantity: 498.96
                          unit: mg
                        NIA:
                          label: Niacina (B3)
                          quantity: 10.07
                          unit: mg
                        P:
                          label: Fósforo
                          quantity: 357.68
                          unit: mg
                        PROCNT:
                          label: Proteína
                          quantity: 36.73
                          unit: g
                        RIBF:
                          label: Riboflavina (B2)
                          quantity: 0.41000000000000003
                          unit: mg
                        SUGAR:
                          label: Azúcares
                          quantity: 3.15
                          unit: g
                        SUGAR.added:
                          label: Azucares añadidos
                          quantity: 0.54
                          unit: g
                        THIA:
                          label: Tiamina (B1)
                          quantity: 0.32
                          unit: mg
                        TOCPHA:
                          label: Vitamina E
                          quantity: 2.34
                          unit: mg
                        VITA_RAE:
                          label: Vitamina A
                          quantity: 281.34000000000003
                          unit: µg
                        VITB12:
                          label: Vitamina B12
                          quantity: 1.74
                          unit: µg
                        VITB6A:
                          label: Vitamina B6
                          quantity: 0.73
                          unit: mg
                        VITC:
                          label: Vitamina C
                          quantity: 19.74
                          unit: mg
                        VITD:
                          label: Vitamina D
                          quantity: 15.68
                          unit: µg
                        VITK1:
                          label: Vitamina K
                          quantity: 206.15
                          unit: µg
                        ZN:
                          label: Zinc
                          quantity: 4.62
                          unit: mg
                    nutritional_info_per_item:
                    - food_item_position: 3
                      hasNutriScore: true
                      hasNutritionalInfo: true
                      id: 947
                      nutri_score:
                        nutri_score_category: A
                        nutri_score_standardized: 81
                      nutritional_info:
                        calories: 276.46
                        dailyIntakeReference:
                          CHOCDF:
                            label: Carbohidratos
                            level: MEDIUM
                            percent: 7.752875351401513
                          ENERC_KCAL:
                            label: Energía
                            level: NONE
                            percent: 15.276678948661262
                          FASAT:
                            label: Saturadas
                            level: MEDIUM
                            percent: 19.89415153748242
                          FAT:
                            label: Grasas
                            level: HIGH
                            percent: 20.099463101379094
                          NA:
                            label: Sodio
                            level: HIGH
                            percent: 33.263999999999996
                          PROCNT:
                            label: Proteína
                            level: NONE
                            percent: 23.09722426922132
                          SUGAR:
                            label: Azúcares
                            level: MEDIUM
                            percent: 8.399999999999999
                        totalNutrients:
                          ALC:
                            label: Alcohol
                            quantity: 0.0
                            unit: g
                          CA:
                            label: Calcio
                            quantity: 106.07000000000001
                            unit: mg
                          CAFFN:
                            label: Cafeína
                            quantity: 0.0
                            unit: mg
                          CHOCDF:
                            label: Carbohidratos
                            quantity: 27.740000000000002
                            unit: g
                          CHOLE:
                            label: Colesterol
                            quantity: 134.55
                            unit: mg
                          ENERC_KCAL:
                            label: Energía
                            quantity: 485.87
                            unit: kcal
                          F18D3CN3:
                            label: Ácido alfa-linolénico (ALA)
                            quantity: 0.0
                            unit: g
                          F20D5:
                            label: Ácido eicosapentaenoico (EPA)
                            quantity: 0.020999999999999998
                            unit: g
                          F22D6:
                            label: Ácido docosahexaenoico (DHA)
                            quantity: 0.0021
                            unit: g
                          FAMS:
                            label: Grasas monosaturadas
                            quantity: 10.45
                            unit: g
                          FAPU:
                            label: Poliinsaturada
                            quantity: 3.69
                            unit: g
                          FASAT:
                            label: Saturadas
                            quantity: 8.120000000000001
                            unit: g
                          FAT:
                            label: Grasas
                            quantity: 24.86
                            unit: g
                          FATRN:
                            label: Grasas trans
                            quantity: 0.07
                            unit: g
                          FE:
                            label: Hierro
                            quantity: 3.5999999999999996
                            unit: mg
                          FIBTG:
                            label: Fibra
                            quantity: 2.54
                            unit: g
                          FOLAC:
                            label: Ácido fólico
                            quantity: 0.0
                            unit: µg
                          FOLDFE:
                            label: Folato equivalente (total)
                            quantity: 93.97
                            unit: µg
                          FOLFD:
                            label: Folato (comida)
                            quantity: 93.97
                            unit: µg
                          K:
                            label: Potasio
                            quantity: 714.03
                            unit: mg
                          MG:
                            label: Magnesio
                            quantity: 76.93
                            unit: mg
                          NA:
                            label: Sodio
                            quantity: 498.96
                            unit: mg
                          NIA:
                            label: Niacina (B3)
                            quantity: 10.07
                            unit: mg
                          P:
                            label: Fósforo
                            quantity: 357.68
                            unit: mg
                          PROCNT:
                            label: Proteína
                            quantity: 36.73
                            unit: g
                          RIBF:
                            label: Riboflavina (B2)
                            quantity: 0.41000000000000003
                            unit: mg
                          SUGAR:
                            label: Azúcares
                            quantity: 3.15
                            unit: g
                          SUGAR.added:
                            label: Azucares añadidos
                            quantity: 0.54
                            unit: g
                          THIA:
                            label: Tiamina (B1)
                            quantity: 0.32
                            unit: mg
                          TOCPHA:
                            label: Vitamina E
                            quantity: 2.34
                            unit: mg
                          VITA_RAE:
                            label: Vitamina A
                            quantity: 281.34000000000003
                            unit: µg
                          VITB12:
                            label: Vitamina B12
                            quantity: 1.74
                            unit: µg
                          VITB6A:
                            label: Vitamina B6
                            quantity: 0.73
                            unit: mg
                          VITC:
                            label: Vitamina C
                            quantity: 19.74
                            unit: mg
                          VITD:
                            label: Vitamina D
                            quantity: 15.68
                            unit: µg
                          VITK1:
                            label: Vitamina K
                            quantity: 206.15
                            unit: µg
                          ZN:
                            label: Zinc
                            quantity: 4.62
                            unit: mg
                      serving_size: 56.70500000000001
                    - food_item_position: ext2
                      hasNutriScore: true
                      hasNutritionalInfo: true
                      id: 7
                      nutri_score:
                        nutri_score_category: A
                        nutri_score_standardized: 77
                      nutritional_info:
                        calories: 209.4
                        dailyIntakeReference:
                          CHOCDF:
                            label: Carbohidratos
                            level: MEDIUM
                            percent: 7.744490843090696
                          ENERC_KCAL:
                            label: Energía
                            level: NONE
                            percent: 6.583935151068533
                          FASAT:
                            label: Saturadas
                            level: LOW
                            percent: 4.998038070993119
                          FAT:
                            label: Grasas
                            level: MEDIUM
                            percent: 6.581240130540057
                          NA:
                            label: Sodio
                            level: HIGH
                            percent: 27.896666666666665
                          PROCNT:
                            label: Proteína
                            level: NONE
                            percent: 4.6219602063375085
                          SUGAR:
                            label: Azúcares
                            level: MEDIUM
                            percent: 8.399999999999999
                        totalNutrients:
                          ALC:
                            label: Alcohol
                            quantity: 0.0
                            unit: g
                          CA:
                            label: Calcio
                            quantity: 87.7
                            unit: mg
                          CAFFN:
                            label: Cafeína
                            quantity: 0.0
                            unit: mg
                          CHOCDF:
                            label: Carbohidratos
                            quantity: 27.71
                            unit: g
                          CHOLE:
                            label: Colesterol
                            quantity: 24.55
                            unit: mg
                          ENERC_KCAL:
                            label: Energía
                            quantity: 209.4
                            unit: kcal
                          F18D3CN3:
                            label: Ácido alfa-linolénico (ALA)
                            quantity: 0.0
                            unit: g
                          F20D5:
                            label: Ácido eicosapentaenoico (EPA)
                            quantity: 0.020999999999999998
                            unit: g
                          F22D6:
                            label: Ácido docosahexaenoico (DHA)
                            quantity: 0.0021
                            unit: g
                          FAMS:
                            label: Grasas monosaturadas
                            quantity: 3.57
                            unit: g
                          FAPU:
                            label: Poliinsaturada
                            quantity: 1.72
                            unit: g
                          FASAT:
                            label: Saturadas
                            quantity: 2.04
                            unit: g
                          FAT:
                            label: Grasas
                            quantity: 8.14
                            unit: g
                          FATRN:
                            label: Grasas trans
                            quantity: 0.03
                            unit: g
                          FE:
                            label: Hierro
                            quantity: 1.91
                            unit: mg
                          FIBTG:
                            label: Fibra
                            quantity: 2.54
                            unit: g
                          FOLAC:
                            label: Ácido fólico
                            quantity: 0.0
                            unit: µg
                          FOLDFE:
                            label: Folato equivalente (total)
                            quantity: 80.36
                            unit: µg
                          FOLFD:
                            label: Folato (comida)
                            quantity: 80.36
                            unit: µg
                          K:
                            label: Potasio
                            quantity: 394.25
                            unit: mg
                          MG:
                            label: Magnesio
                            quantity: 50.17
                            unit: mg
                          NA:
                            label: Sodio
                            quantity: 418.45
                            unit: mg
                          NIA:
                            label: Niacina (B3)
                            quantity: 1.81
                            unit: mg
                          P:
                            label: Fósforo
                            quantity: 129.52
                            unit: mg
                          PROCNT:
                            label: Proteína
                            quantity: 7.35
                            unit: g
                          RIBF:
                            label: Riboflavina (B2)
                            quantity: 0.15
                            unit: mg
                          SUGAR:
                            label: Azúcares
                            quantity: 3.15
                            unit: g
                          SUGAR.added:
                            label: Azucares añadidos
                            quantity: 0.54
                            unit: g
                          THIA:
                            label: Tiamina (B1)
                            quantity: 0.12
                            unit: mg
                          TOCPHA:
                            label: Vitamina E
                            quantity: 2.15
                            unit: mg
                          VITA_RAE:
                            label: Vitamina A
                            quantity: 237.55
                            unit: µg
                          VITB12:
                            label: Vitamina B12
                            quantity: 0.2
                            unit: µg
                          VITB6A:
                            label: Vitamina B6
                            quantity: 0.24
                            unit: mg
                          VITC:
                            label: Vitamina C
                            quantity: 19.63
                            unit: mg
                          VITD:
                            label: Vitamina D
                            quantity: 0.1
                            unit: µg
                          VITK1:
                            label: Vitamina K
                            quantity: 204.74
                            unit: µg
                          ZN:
                            label: Zinc
                            quantity: 0.91
                            unit: mg
                      serving_size: 0
                    - food_item_position: ext1
                      hasNutriScore: false
                      hasNutritionalInfo: false
                      id: null
                      nutritional_info:
                        dailyIntakeReference: {}
                      serving_size: null
                    serving_size: 101.70500000000001
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/nutrition/recipe/nutritionalInfo/{model_version}:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴🔵 Identifies the nutritional information for the dishes on the image.
        ⏱
      description: "<span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n\n&nbsp;\n\n\nThis\
        \ endpoint provides all the nutritional information of the provided imageId\
        \ or class_id. Make sure you first \nconfirm the correct food items with the\
        \ /confirm/dish endpoint before calling this. Otherwise, the top 1 predictions\n\
        for each of the detected food item positions will be considered the correct\
        \ ones and will be returned in this endpoint.\n\n&nbsp;\n\nIf a food segmentation\
        \ has been applied on the image (see /segmentation endpoints), then an extra\
        \ attribute \nnamed 'nutritional_info_per_item' will be returned in the response.\
        \ This contains the detailed nutritional \ninformation for each of the food\
        \ segments/regions that have been detected or confirmed on the image.\n\n\
        &nbsp;\n\nSome extra information related to the daily intake reference is\
        \ also provided, which serves as a fast and simple way to\ncompare the nutritional\
        \ information of the intake with what is the global average intake expected\
        \ from people (note that these are just approximations).\n\nThe way the 'dailyIntakeReference'\
        \ levels are generated is the following:\n  - LOW - If the intake represents\
        \ less than 20% of the daily reference value\n  - MEDIUM - If the intake represents\
        \ more than 20% and less than 35% of the daily reference value\n  - HIGH -\
        \ If the intake represents equal or more than 35% of the daily reference value\n\
        \  - NONE - If the reference value could not be calculated or the nutritional\
        \ indicator has the levels disabled.\n\n\n&nbsp;\n\n\nUnless an automated\
        \ quantity recognition is done on the image or the /confirm/quantity endpoint\
        \ has been used, all the information provided is scaled to the standard/average\
        \ portion for a single person.\n\n\n&nbsp;\n\n\nBe aware that not all the\
        \ entries of this response will contain nutritional information. If the images\
        \ have not been confirmed or don't have any prediction on a dish level, the\
        \ nutritional information won't be generated. If the element from the intake\
        \ list has the flag 'hasNutritionalInfo' set to False, 'nutritional_info'\
        \ won't be present in the object. Also, confirmed dishes that are not in the\
        \ 'logmeal' database won't contribute to the nutritional information. They\
        \ will still be returned in the 'foodNames' field, and will be represented\
        \ with a null value in the 'ids' field.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format. You can chose imageId
          or class_id parameter.
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 3
                class_id:
                  type: integer
                  example: 481
      responses:
        200:
          description: |
            token is valid, recipe information is sent in response (JSON format).

            - "nutritional_info" will be empty if "hasNutritionaInfo" == False
            - "foodName" and "ids" will become a list if several dishes where recognized/confirmed (e.g. "foodName": [324, 435])
          content:
            application/json:
              schema:
                type: object
                properties:
                  foodName:
                    type: string
                    example: spaghetti bolognese
                    description: Name of the food/recipe. If there are multiple foods
                      for this image, a list of foodNames will be returned instead.
                  hasNutritionalInfo:
                    type: boolean
                    example: true
                    description: Boolean that describes if the image has nutritional
                      information associated to it.
                  ids:
                    type: integer
                    example: 324
                    description: IDs of the dishes the information has been obtained
                      from. If there are multiple foods for this image, a list of
                      ids will be returned instead. For dishes coming from manual
                      inputs (not in our database) a null ID will be provided. Note
                      that dishes with null ids won't have effect on the nutritional
                      information returned.
                  imageId:
                    type: integer
                    example: 323425
                    description: ID of the image the nutrients have been queried from.
                  nutritional_info:
                    type: object
                    description: Object containing all the nutritional information
                      related to the food intake.
                    properties:
                      calories:
                        type: number
                        format: float
                        description: Total amount of calories obtained from this food
                          intake.
                        example: 340.26
                      totalNutrients:
                        type: object
                        description: Contains basic information of the nutrient and
                          it's amount found in the current food intake. The key 'NutrientCodeSample'
                          will be replaced by each nutrient code (for each nutrient,
                          a NutrientCodeSample will be returned).
                        properties:
                          label:
                            type: string
                            description: Translated label of the nutritional indicator.
                            example: Sugars
                          quantity:
                            type: number
                            format: float
                            description: Amount of the nutrient.
                            example: 20.3
                          unit:
                            type: string
                            description: Unit used to measure the quantity provided.
                            example: g
                      dailyIntakeReference:
                        type: object
                        description: 'Contains information about the nutrient intake
                          with relation to the daily reference value the user should
                          intake. The key ''DailyReferenceNutrientCodeSample'' will
                          be replaced by each nutrient code we have daily reference
                          values for. These are only approximations, they should be
                          used as a simple reference to help the users understand
                          how every single intake affects their total daily nutrients. '
                        properties:
                          label:
                            type: string
                            description: Translated label of the nutritional indicator.
                            example: Sugars
                          level:
                            type: string
                            description: Level that we assign to the nutrient with
                              relation to the daily reference value the user should
                              intake. It's value will be one of ['NONE', 'LOW', 'MEDIUM',
                              'HIGH']. You can use this levels to display which nutrients
                              from the intake represent a high portion of the user's
                              expected intake.
                            example: HIGH
                          percent:
                            type: number
                            format: float
                            description: Percentage of the total amount of the nutrient
                              the user should intake with relation to the daily reference
                              value.
                  nutritional_info_per_item:
                    description: List of nutritional info for each of the food items
                      on the image.
                    type: array
                    items:
                      type: object
                      description: Nutritional information related to one of the food
                        segments/regions detected or confirmed on the image.
                      properties:
                        food_item_position:
                          description: Identifier for a food item in the segmentation_results
                            list. This value can either be an integer (if providing
                            from the original food segmentation result) or a string
                            (if confirmed an extra region that was not originally
                            detected).
                          type: integer
                          example: 1
                        hasNutriScore:
                          description: Either if the food item has nutri score or
                            not (only present of Custom Plans).
                          type: boolean
                          example: true
                        hasNutritionalInfo:
                          description: Either if the food item has nutritional info
                            or not.
                          type: integer
                          example: 1
                        id:
                          description: Identifier of the food item/dish detected on
                            this region.
                          type: integer
                          example: 234
                        nutri_score:
                          description: Nutritional score associated to the recognized
                            food item (this information is only provided if you have
                            a Monitor plan or higher).
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                        serving_size:
                          description: Food quantity (in grams) corresponding to this
                            food item.
                          type: number
                          format: float
                          example: 56.705
                        nutritional_info:
                          type: object
                          description: Object containing all the nutritional information
                            related to the food intake.
                          properties:
                            calories:
                              type: number
                              format: float
                              description: Total amount of calories obtained from
                                this food intake.
                              example: 340.26
                            totalNutrients:
                              type: object
                              description: Contains basic information of the nutrient
                                and it's amount found in the current food intake.
                                The key 'NutrientCodeSample' will be replaced by each
                                nutrient code (for each nutrient, a NutrientCodeSample
                                will be returned).
                              properties:
                                label:
                                  type: string
                                  description: Translated label of the nutritional
                                    indicator.
                                  example: Sugars
                                quantity:
                                  type: number
                                  format: float
                                  description: Amount of the nutrient.
                                  example: 20.3
                                unit:
                                  type: string
                                  description: Unit used to measure the quantity provided.
                                  example: g
                            dailyIntakeReference:
                              type: object
                              description: 'Contains information about the nutrient
                                intake with relation to the daily reference value
                                the user should intake. The key ''DailyReferenceNutrientCodeSample''
                                will be replaced by each nutrient code we have daily
                                reference values for. These are only approximations,
                                they should be used as a simple reference to help
                                the users understand how every single intake affects
                                their total daily nutrients. '
                              properties:
                                label:
                                  type: string
                                  description: Translated label of the nutritional
                                    indicator.
                                  example: Sugars
                                level:
                                  type: string
                                  description: Level that we assign to the nutrient
                                    with relation to the daily reference value the
                                    user should intake. It's value will be one of
                                    ['NONE', 'LOW', 'MEDIUM', 'HIGH']. You can use
                                    this levels to display which nutrients from the
                                    intake represent a high portion of the user's
                                    expected intake.
                                  example: HIGH
                                percent:
                                  type: number
                                  format: float
                                  description: Percentage of the total amount of the
                                    nutrient the user should intake with relation
                                    to the daily reference value.
                  serving_size:
                    type: number
                    format: float
                    example: 16.0
                    description: Detected weight for the product if detected automatically
                      or confirmed by the user. Depending on the context, it can also
                      correspond to the standard quantity of food corresponding to
                      one portion for the average person.
              examples:
                Nutritional Info Example:
                  value:
                    foodName:
                    - canelones de carne
                    - rollitos de primavera
                    - ensalada con ketchup
                    hasNutritionalInfo: true
                    ids:
                    - 947
                    - 7
                    - null
                    imageId: 1365065
                    image_nutri_score:
                      nutri_score_category: A
                      nutri_score_standardized: 81
                    nutritional_info:
                      calories: 485.87
                      dailyIntakeReference:
                        CHOCDF:
                          label: Carbohidratos
                          level: MEDIUM
                          percent: 7.752875351401513
                        ENERC_KCAL:
                          label: Energía
                          level: NONE
                          percent: 15.276678948661262
                        FASAT:
                          label: Saturadas
                          level: MEDIUM
                          percent: 19.89415153748242
                        FAT:
                          label: Grasas
                          level: HIGH
                          percent: 20.099463101379094
                        NA:
                          label: Sodio
                          level: HIGH
                          percent: 33.263999999999996
                        PROCNT:
                          label: Proteína
                          level: NONE
                          percent: 23.09722426922132
                        SUGAR:
                          label: Azúcares
                          level: MEDIUM
                          percent: 8.399999999999999
                      totalNutrients:
                        ALC:
                          label: Alcohol
                          quantity: 0.0
                          unit: g
                        CA:
                          label: Calcio
                          quantity: 106.07000000000001
                          unit: mg
                        CHOCDF:
                          label: Carbohidratos
                          quantity: 27.740000000000002
                          unit: g
                        CHOLE:
                          label: Colesterol
                          quantity: 134.55
                          unit: mg
                        ENERC_KCAL:
                          label: Energía
                          quantity: 485.87
                          unit: kcal
                        F18D3CN3:
                          label: Ácido alfa-linolénico (ALA)
                          quantity: 0.0
                          unit: g
                        F20D5:
                          label: Ácido eicosapentaenoico (EPA)
                          quantity: 0.020999999999999998
                          unit: g
                        F22D6:
                          label: Ácido docosahexaenoico (DHA)
                          quantity: 0.0021
                          unit: g
                        FAMS:
                          label: Grasas monosaturadas
                          quantity: 10.45
                          unit: g
                        FAPU:
                          label: Poliinsaturada
                          quantity: 3.69
                          unit: g
                        FASAT:
                          label: Saturadas
                          quantity: 8.120000000000001
                          unit: g
                        FAT:
                          label: Grasas
                          quantity: 24.86
                          unit: g
                        FATRN:
                          label: Grasas trans
                          quantity: 0.07
                          unit: g
                        FE:
                          label: Hierro
                          quantity: 3.5999999999999996
                          unit: mg
                        FIBTG:
                          label: Fibra
                          quantity: 2.54
                          unit: g
                        FOLAC:
                          label: Ácido fólico
                          quantity: 0.0
                          unit: µg
                        FOLDFE:
                          label: Folato equivalente (total)
                          quantity: 93.97
                          unit: µg
                        FOLFD:
                          label: Folato (comida)
                          quantity: 93.97
                          unit: µg
                        K:
                          label: Potasio
                          quantity: 714.03
                          unit: mg
                        MG:
                          label: Magnesio
                          quantity: 76.93
                          unit: mg
                        NA:
                          label: Sodio
                          quantity: 498.96
                          unit: mg
                        NIA:
                          label: Niacina (B3)
                          quantity: 10.07
                          unit: mg
                        P:
                          label: Fósforo
                          quantity: 357.68
                          unit: mg
                        PROCNT:
                          label: Proteína
                          quantity: 36.73
                          unit: g
                        RIBF:
                          label: Riboflavina (B2)
                          quantity: 0.41000000000000003
                          unit: mg
                        SUGAR:
                          label: Azúcares
                          quantity: 3.15
                          unit: g
                        SUGAR.added:
                          label: Azucares añadidos
                          quantity: 0.54
                          unit: g
                        THIA:
                          label: Tiamina (B1)
                          quantity: 0.32
                          unit: mg
                        TOCPHA:
                          label: Vitamina E
                          quantity: 2.34
                          unit: mg
                        VITA_RAE:
                          label: Vitamina A
                          quantity: 281.34000000000003
                          unit: µg
                        VITB12:
                          label: Vitamina B12
                          quantity: 1.74
                          unit: µg
                        VITB6A:
                          label: Vitamina B6
                          quantity: 0.73
                          unit: mg
                        VITC:
                          label: Vitamina C
                          quantity: 19.74
                          unit: mg
                        VITD:
                          label: Vitamina D
                          quantity: 15.68
                          unit: µg
                        VITK1:
                          label: Vitamina K
                          quantity: 206.15
                          unit: µg
                        ZN:
                          label: Zinc
                          quantity: 4.62
                          unit: mg
                    nutritional_info_per_item:
                    - food_item_position: 3
                      hasNutriScore: true
                      hasNutritionalInfo: true
                      id: 947
                      nutri_score:
                        nutri_score_category: A
                        nutri_score_standardized: 81
                      nutritional_info:
                        calories: 276.46
                        dailyIntakeReference:
                          CHOCDF:
                            label: Carbohidratos
                            level: MEDIUM
                            percent: 7.752875351401513
                          ENERC_KCAL:
                            label: Energía
                            level: NONE
                            percent: 15.276678948661262
                          FASAT:
                            label: Saturadas
                            level: MEDIUM
                            percent: 19.89415153748242
                          FAT:
                            label: Grasas
                            level: HIGH
                            percent: 20.099463101379094
                          NA:
                            label: Sodio
                            level: HIGH
                            percent: 33.263999999999996
                          PROCNT:
                            label: Proteína
                            level: NONE
                            percent: 23.09722426922132
                          SUGAR:
                            label: Azúcares
                            level: MEDIUM
                            percent: 8.399999999999999
                        totalNutrients:
                          ALC:
                            label: Alcohol
                            quantity: 0.0
                            unit: g
                          CA:
                            label: Calcio
                            quantity: 106.07000000000001
                            unit: mg
                          CAFFN:
                            label: Cafeína
                            quantity: 0.0
                            unit: mg
                          CHOCDF:
                            label: Carbohidratos
                            quantity: 27.740000000000002
                            unit: g
                          CHOLE:
                            label: Colesterol
                            quantity: 134.55
                            unit: mg
                          ENERC_KCAL:
                            label: Energía
                            quantity: 485.87
                            unit: kcal
                          F18D3CN3:
                            label: Ácido alfa-linolénico (ALA)
                            quantity: 0.0
                            unit: g
                          F20D5:
                            label: Ácido eicosapentaenoico (EPA)
                            quantity: 0.020999999999999998
                            unit: g
                          F22D6:
                            label: Ácido docosahexaenoico (DHA)
                            quantity: 0.0021
                            unit: g
                          FAMS:
                            label: Grasas monosaturadas
                            quantity: 10.45
                            unit: g
                          FAPU:
                            label: Poliinsaturada
                            quantity: 3.69
                            unit: g
                          FASAT:
                            label: Saturadas
                            quantity: 8.120000000000001
                            unit: g
                          FAT:
                            label: Grasas
                            quantity: 24.86
                            unit: g
                          FATRN:
                            label: Grasas trans
                            quantity: 0.07
                            unit: g
                          FE:
                            label: Hierro
                            quantity: 3.5999999999999996
                            unit: mg
                          FIBTG:
                            label: Fibra
                            quantity: 2.54
                            unit: g
                          FOLAC:
                            label: Ácido fólico
                            quantity: 0.0
                            unit: µg
                          FOLDFE:
                            label: Folato equivalente (total)
                            quantity: 93.97
                            unit: µg
                          FOLFD:
                            label: Folato (comida)
                            quantity: 93.97
                            unit: µg
                          K:
                            label: Potasio
                            quantity: 714.03
                            unit: mg
                          MG:
                            label: Magnesio
                            quantity: 76.93
                            unit: mg
                          NA:
                            label: Sodio
                            quantity: 498.96
                            unit: mg
                          NIA:
                            label: Niacina (B3)
                            quantity: 10.07
                            unit: mg
                          P:
                            label: Fósforo
                            quantity: 357.68
                            unit: mg
                          PROCNT:
                            label: Proteína
                            quantity: 36.73
                            unit: g
                          RIBF:
                            label: Riboflavina (B2)
                            quantity: 0.41000000000000003
                            unit: mg
                          SUGAR:
                            label: Azúcares
                            quantity: 3.15
                            unit: g
                          SUGAR.added:
                            label: Azucares añadidos
                            quantity: 0.54
                            unit: g
                          THIA:
                            label: Tiamina (B1)
                            quantity: 0.32
                            unit: mg
                          TOCPHA:
                            label: Vitamina E
                            quantity: 2.34
                            unit: mg
                          VITA_RAE:
                            label: Vitamina A
                            quantity: 281.34000000000003
                            unit: µg
                          VITB12:
                            label: Vitamina B12
                            quantity: 1.74
                            unit: µg
                          VITB6A:
                            label: Vitamina B6
                            quantity: 0.73
                            unit: mg
                          VITC:
                            label: Vitamina C
                            quantity: 19.74
                            unit: mg
                          VITD:
                            label: Vitamina D
                            quantity: 15.68
                            unit: µg
                          VITK1:
                            label: Vitamina K
                            quantity: 206.15
                            unit: µg
                          ZN:
                            label: Zinc
                            quantity: 4.62
                            unit: mg
                      serving_size: 56.70500000000001
                    - food_item_position: ext2
                      hasNutriScore: true
                      hasNutritionalInfo: true
                      id: 7
                      nutri_score:
                        nutri_score_category: A
                        nutri_score_standardized: 77
                      nutritional_info:
                        calories: 209.4
                        dailyIntakeReference:
                          CHOCDF:
                            label: Carbohidratos
                            level: MEDIUM
                            percent: 7.744490843090696
                          ENERC_KCAL:
                            label: Energía
                            level: NONE
                            percent: 6.583935151068533
                          FASAT:
                            label: Saturadas
                            level: LOW
                            percent: 4.998038070993119
                          FAT:
                            label: Grasas
                            level: MEDIUM
                            percent: 6.581240130540057
                          NA:
                            label: Sodio
                            level: HIGH
                            percent: 27.896666666666665
                          PROCNT:
                            label: Proteína
                            level: NONE
                            percent: 4.6219602063375085
                          SUGAR:
                            label: Azúcares
                            level: MEDIUM
                            percent: 8.399999999999999
                        totalNutrients:
                          ALC:
                            label: Alcohol
                            quantity: 0.0
                            unit: g
                          CA:
                            label: Calcio
                            quantity: 87.7
                            unit: mg
                          CAFFN:
                            label: Cafeína
                            quantity: 0.0
                            unit: mg
                          CHOCDF:
                            label: Carbohidratos
                            quantity: 27.71
                            unit: g
                          CHOLE:
                            label: Colesterol
                            quantity: 24.55
                            unit: mg
                          ENERC_KCAL:
                            label: Energía
                            quantity: 209.4
                            unit: kcal
                          F18D3CN3:
                            label: Ácido alfa-linolénico (ALA)
                            quantity: 0.0
                            unit: g
                          F20D5:
                            label: Ácido eicosapentaenoico (EPA)
                            quantity: 0.020999999999999998
                            unit: g
                          F22D6:
                            label: Ácido docosahexaenoico (DHA)
                            quantity: 0.0021
                            unit: g
                          FAMS:
                            label: Grasas monosaturadas
                            quantity: 3.57
                            unit: g
                          FAPU:
                            label: Poliinsaturada
                            quantity: 1.72
                            unit: g
                          FASAT:
                            label: Saturadas
                            quantity: 2.04
                            unit: g
                          FAT:
                            label: Grasas
                            quantity: 8.14
                            unit: g
                          FATRN:
                            label: Grasas trans
                            quantity: 0.03
                            unit: g
                          FE:
                            label: Hierro
                            quantity: 1.91
                            unit: mg
                          FIBTG:
                            label: Fibra
                            quantity: 2.54
                            unit: g
                          FOLAC:
                            label: Ácido fólico
                            quantity: 0.0
                            unit: µg
                          FOLDFE:
                            label: Folato equivalente (total)
                            quantity: 80.36
                            unit: µg
                          FOLFD:
                            label: Folato (comida)
                            quantity: 80.36
                            unit: µg
                          K:
                            label: Potasio
                            quantity: 394.25
                            unit: mg
                          MG:
                            label: Magnesio
                            quantity: 50.17
                            unit: mg
                          NA:
                            label: Sodio
                            quantity: 418.45
                            unit: mg
                          NIA:
                            label: Niacina (B3)
                            quantity: 1.81
                            unit: mg
                          P:
                            label: Fósforo
                            quantity: 129.52
                            unit: mg
                          PROCNT:
                            label: Proteína
                            quantity: 7.35
                            unit: g
                          RIBF:
                            label: Riboflavina (B2)
                            quantity: 0.15
                            unit: mg
                          SUGAR:
                            label: Azúcares
                            quantity: 3.15
                            unit: g
                          SUGAR.added:
                            label: Azucares añadidos
                            quantity: 0.54
                            unit: g
                          THIA:
                            label: Tiamina (B1)
                            quantity: 0.12
                            unit: mg
                          TOCPHA:
                            label: Vitamina E
                            quantity: 2.15
                            unit: mg
                          VITA_RAE:
                            label: Vitamina A
                            quantity: 237.55
                            unit: µg
                          VITB12:
                            label: Vitamina B12
                            quantity: 0.2
                            unit: µg
                          VITB6A:
                            label: Vitamina B6
                            quantity: 0.24
                            unit: mg
                          VITC:
                            label: Vitamina C
                            quantity: 19.63
                            unit: mg
                          VITD:
                            label: Vitamina D
                            quantity: 0.1
                            unit: µg
                          VITK1:
                            label: Vitamina K
                            quantity: 204.74
                            unit: µg
                          ZN:
                            label: Zinc
                            quantity: 0.91
                            unit: mg
                      serving_size: 0
                    - food_item_position: ext1
                      hasNutriScore: false
                      hasNutritionalInfo: false
                      id: null
                      nutritional_info:
                        dailyIntakeReference: {}
                      serving_size: null
                    serving_size: 101.70500000000001
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/nutrition/recipe/compute_nutrients:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴🔵 Computes the nutritional information of a recipe from a list of
        ingredients.
      description: |
        This endpoint receives a list of ingredients and automatically computes the overall nutritional information
        for the recipe based on their combined nutritional values.

        &nbsp;

        Each ingredient must be specified with either:
        - `ingredientId`: the internal ID of the ingredient within the LogMeal system, or
        - `ingredientName`: a custom ingredient name (used only if the ID is not available)

        And must include:
        - `ingredientAmount`: the quantity (in grams) of the ingredient.

        &nbsp;

        The system aggregates the nutritional contributions of all ingredients and returns a list
        of computed nutritional indicators (such as calories, proteins, sugars, etc.), including the indicator code and total quantity.
      requestBody:
        description: |
          Parameters sent in data, in json format.


          &nbsp;

          A list of ingredients is needed.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ingredient_list:
                  type: array
                  description: List of ingredients whose nutritional value will be
                    auto-computed.
                  items:
                    type: object
                    description: Either ingredientId or ingredientName must be provided.
                    properties:
                      ingredientId:
                        type: integer
                        example: 147
                      ingredientName:
                        type: string
                        example: Spirulina
                      ingredientAmount:
                        type: number
                        format: float
                        example: 42.2
                    required:
                    - ingredientAmount
              required:
              - ingredient_list
      responses:
        '200':
          description: Nutritional info successfully auto-computed!
          content:
            application/json:
              schema:
                type: object
                properties:
                  computed_nutrients:
                    type: array
                    description: List of computed nutritional indicators based on
                      the input ingredients.
                    items:
                      type: object
                      properties:
                        indicatorCode:
                          type: string
                          description: Nutritional indicator code (e.g., "ENERC_KCAL",
                            "SUGAR", "NA")
                          example: ENERC_KCAL
                        indicatorAmount:
                          type: number
                          format: float
                          description: Total quantity of the nutrient based on all
                            ingredients (in grams or relevant units)
                          example: 77.4
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Ingredient Not Exists:
                  value:
                    message: Given ingredient with id={} does not exist
                    code: 1301
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/nutrition/confirm/ingredients:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴🔵 Confirm ingredients and their quantities.
      description: |
        With this endpoint, the user has the option to modify the ingredients list for each food item in the image.

        Ingredients should be confirmed by ID (ingredientId), a list of valid ingredient IDs can be retrieved by calling /dataset/ingredients). If instead a name is provided (ingredientName), the ingredient will be considered a free-text ingredient that does not exist in the database and thus, no nutritional information will be retrieved for it.
        The user must make sure to pass either the ingredientId or the ingredientName, but never both.
        Optionally the amount (weight) can be specified. If the amount of the ingredient isn't provided we'll use the average serving size for that specific ingredient.
        If confirmed by Name the weight is mandatory since the system does not know what ingredient is it

        Also, the preferred measurement system and specific measure for each ingredient can be specified with a LogMeal Monitor plan or higher.

        This endpoint can only be used for images that have a **segmentation** prediction.
      requestBody:
        description: A JSON object with ingredients information for any regions in
          the specified image.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 1
                ingredients_per_item:
                  type: object
                  description: List of food items to modify ingredients for.
                  properties:
                    food_item_position:
                      description: A list of ingredients for each food item.
                      type: array
                      items:
                        type: object
                        description: Nutritional information related to one of the
                          food segments/regions detected or confirmed on the image.
                          Use either ingredientId or ingredientName.
                        properties:
                          ingredientId:
                            description: A valid ingredient ID from the logmeal dataset.
                              Call /dataset/ingredients for the list of available
                              ingredients. If this field is provided, "ingredientName"
                              mustn't be provided.
                            type: integer
                            example: 140
                          ingredientName:
                            description: Name to identify an ingredient not present
                              in the system. If this field is provided, "ingredientId"
                              mustn't be provided.
                            type: string
                            example: Spirulina
                          ingredientAmount:
                            description: (Optional) Weight in grams for this ingredient.
                              If not provided we'll use the average quantity for this
                              ingredient instead. Note that the quantity MUST ALWAYS
                              BE PROVIDED IN GRAMS, no matter which is the user's
                              preferred weight measure or which is the 'measureSystem'
                              or 'measureId' selected. This field won't be optional
                              if "ingredientName" is provided.
                            type: number
                            example: 75
                          measureSystem:
                            type: string
                            enum:
                            - weight
                            - cooking_measures
                            description: Define how the user would like to see quantity
                              information for this dish. (Monitor plan or higher required).
                          measureId:
                            type: integer
                            description: Select a specific measure from the selected
                              measureSystem. If provided, 'measureSystem' must also
                              be provided and the measureId should be a valid measure
                              for this ingredient. Note that this only edits the default
                              unit used when returning an ingredient measure. Independently
                              from this, the reported 'ingredientAmount' must always
                              be provided in grams. Monitor plan or higher required.
              required:
              - imageId
              - ingredients_per_item
            example:
              exampleById:
                imageId: 1435255,
                ingredients_per_item:
                  1:
                  - ingredientId: 147
                    ingredientAmount: 24
                  - ingredientId: 120
                    ingredientAmount: 42.2
                  extra:
                  - ingredientId: 140
                    ingredientAmount: 80
                  - ingredientId: 92
              exampleByName:
                imageId: 1435255,
                ingredients_per_item:
                  1:
                  - ingredientName: Spirulina
                    ingredientAmount: 24
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: OK
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Exists:
                  value:
                    message: Image with id={} does not exist.
                    code: 710
                Ingredient Not Exists:
                  value:
                    message: Given ingredient with id={} does not exist
                    code: 1301
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/nutrition/confirm/quantity:
    post:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴🔵 Confirms food quantity (serving size) for a specific image id.
      description: |
        Given an imageId you can specify the quantity consumed by the user (in grams). After specifying the quantity, the output of the endpoints /nutrition/recipe/ingredients and /nutrition/recipe/nutritionalInfo will be recalculated accordingly.\
        If food segmentation was applied to the image, quantities for each food item should be specified in an object structure. The object's key is the identifier for the segment (food_item_position) and the value its new quantity. You can confirm quantity for as many food items as you want in a single call to the endpoint.\
        In the case food recognition was applied to the image, quantity can only be specified for all food in the  image at once by providing an integer with the total weight of all predicted or confirmed items.\
        You can also specify the quantity of sugar, salt and oil consumed by the user. If the user does not use salt in any of their recipes for example, modifying this will be considered when retrieving the nutritional information of the image (requires a LogMeal Plan Measures endpoints).\
        **Note**: Sugar modulation is only applied to dishes we consider to often include added sugars.\
        Also, the preferred measurement system and specific measure for each food item can be specified with a LogMeal Monitor plan or higher.
        If none of the optional parameters is provided, no changes will be applied.
      requestBody:
        description: Parameters sent in data, in json format. Different formats required
          depending on the type of prediction that was applied to the image.
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                properties:
                  imageId:
                    type: integer
                    example: 1268462
                  quantity:
                    type: integer
                    example: 120
                    description: Quantity of the intake in grams.
                  salt:
                    type: integer
                    example: 100
                    description: Amount of salt the intake/image has, in milligrams.
                  sugar:
                    type: number
                    format: float
                    example: 6.7
                    description: Amount of sugar the intake/image has, in grams.
                required:
                - imageId
              - type: object
                properties:
                  imageId:
                    type: integer
                    example: 1268462
                  quantity:
                    type: object
                    example: '{"1": 63.2, "2": 80.0, "extra": 25}'
                    description: Object with the quantity of the intake for any regions
                      defined as key-value pairs. Monitor plan or higher required.
                  salt:
                    type: object
                    example: '{"1": "low", "2": "medium", "extra": "none"}'
                    description: Object with the quantity of salt for any regions
                      defined as key-value pairs. Monitor plan or higher required.
                  sugar:
                    type: object
                    example: '{"1": "low", "2": "medium", "extra": "none"}'
                    description: Object with the quantity of sugar for any regions
                      defined as key-value pairs. Monitor plan or higher required.
                  oil:
                    type: object
                    description: Object with the quantity of the oil for any regions
                      defined as key-value pairs. Monitor plan or higher required.
                    example: '{"1": "low", "2": "medium", "extra": "none"}'
                  measures:
                    type: object
                    description: Object with the preferred measure info for any regions.
                      Monitor plan or higher required. Use the food_item_position
                      as keys
                    properties:
                      item_position:
                        type: object
                        properties:
                          system:
                            type: string
                            description: Valid options are weight, cooking_measures
                              and portions.
                          unit_id:
                            type: integer
                            description: (Optional) ID of the preferred weight measure.
                    example: '{"1": {"system": "cooking_measures", "unit_id": 3},
                      "2": "weight", "extra": "portions"}'
                required:
                - imageId
            example:
              imageId: 1268462
              quantity:
                '1': 125
                '2': 90
                extra: 75
              salt:
                '1': low
                '2': medium
                extra: none
      responses:
        '200':
          description: Food quantity has been correctly updated for the specified
            imageId.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: OK
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Exists:
                  value:
                    message: Image with id={} does not exist.
                    code: 710
                Ingredient Not Exists:
                  value:
                    message: Given ingredient with id={} does not exist
                    code: 1301
                Invalid Quantity Feedback:
                  value:
                    message: The quantity field provided is invalid. Please provide
                      an integer for food recognition, and a dictionary for food segmentation.
                    code: 1614
                Segment Id Not In Image:
                  value:
                    message: Provided segment ids do not match the segments in this
                      image.
                    code: 1613
        403:
          description: You are not allowed to use this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/nutrition/getRecommendedDailyIntake:
    get:
      tags:
      - Ingredients and Nutritional Information
      summary: 🔴 Get a recommendation about the daily macronutrient intake based on
        the user information. ⏱
      description: |2-
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        Returns a daily intake recommendation for calories and the main macronutrients. The recommendations are based on the user's profile information. If any user profile information is missing, the results will be based on the average worldwide. If the user has nutritional goals created, they will be returned with the recommendation. Check the documentation on '/v2/daily_nutritional_goal' for more information.

        &nbsp;

        It also returns two ranges. range and warning_range. range is where the ideal intake is, ok range. warning_range is where there is still room for improvement, fairly ok range. If the nutrient range only has a minimum value, above the minimum, ok range. All the values below the warning_range will be considered bad. If the nutrient range only has a maximum value, under the maximum, ok range. All the values above the warning_range will be considered bad. If the nutrient has minimum and maximum values, between them, ok range. All the values under the lower warning_range and values above the bigger warning_range will be considered bad.

        &nbsp;

        If the company has a Monitor or higher plan, they will also get recommendation values for the rest of available nutrients. Just like in /v2/daily_nutritional_goal/autocompute, some nutrients do not give out and automatic calculation. They will be in the response as null. See /v2/daily_nutritional_goal/autocompute's documentation for more information.

        &nbsp;

        If the user does not have a 'sex' assigned or has one which is not 'male' nor 'female' an average between these two will be used for all the calculations.

        &nbsp;

        Note that the output of this endpoint is based on a personalized but automated recommendation based on the <a href='https://en.wikipedia.org/wiki/Harris%E2%80%93Benedict_equation' target='_blank'>Harris-Benedict formula</a>. A professional dietitian should be consulted by the customer in order to assure it fits the user's needs. Once the recommended values have been computed based on the user profile information they will not be re-adjusted automatically unless you specifically call the endpoint /v2/daily_nutritional_goal/autocompute.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: The recommendation has been successfully obtained
          content:
            application/json:
              schema:
                type: object
                properties:
                  daily_recommendation:
                    type: object
                    description: Contains basic information of the nutrient and it's
                      amount found in the current food intake. The key 'NutrientCodeSample'
                      will be replaced by each nutrient code (for each nutrient, a
                      NutrientCodeSample will be returned).
                    properties:
                      label:
                        type: string
                        description: Translated label of the nutritional indicator.
                        example: Sugars
                      quantity:
                        type: number
                        format: float
                        description: Amount of the nutrient.
                        example: 20.3
                      unit:
                        type: string
                        description: Unit used to measure the quantity provided.
                        example: g
                description: 'JSON containing the recommended daily intake of each
                  of the main nutrients (calories, and the amount of fat/protein/carbs
                  that the user should ingest to reach that goal), as well as the
                  Daily Nutritional Goal the user has assigned. If the company has
                  access to /daily_nutritional_goal/autocompute it will also return
                  the values for the rest of nutrient recommendations.   '
                example:
                  daily_recommendation:
                    CHOCDF:
                      average_value: 231.55751953125
                      label: Carbs
                      range:
                      - 219.97964355468747
                      - 243.13539550781252
                      unit: g
                    ENERC_KCAL:
                      average_value: 2058.2890625
                      label: Energy
                      range:
                      - 1955.3746093749999
                      - 2161.203515625
                      unit: kcal
                    FAT:
                      average_value: 57.17469618055556
                      label: Fat
                      range:
                      - 54.31596137152778
                      - 60.03343098958334
                      unit: g
                    PROCNT:
                      average_value: 154.3716796875
                      label: Protein
                      range:
                      - 146.653095703125
                      - 162.09026367187502
                      unit: g
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
      security:
      - Bearer: []
  /v2/intake/{imageId}:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Retrieves the full intake information (similar to /getIntakesList).
      description: " Retrieve full information for a specific intake (image_id). It\
        \ will return the same result as /getIntakesList but for a specific image\
        \ only.\n\n&nbsp;\n\nSee /getIntakesList description in order to better understand\
        \ the output of this endpoint. The only change present in this endpoint is\
        \ that instead of the key 'intakes_list' with a list of images' info, the\
        \ current endpoint returns the key 'intake_info', which contains a single\
        \ object/dictionary with the intake info. "
      parameters:
      - in: path
        name: imageId
        schema:
          type: integer
        required: true
        description: ID of the image to be queried. The image ID is obtained in the
          recognition response. It can be obtained through the nutritional information
          history endpoint too. The user must have access to the image in order to
          access its information.
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Optional parameter. Required for APIUserManagers/APICompanies.
          ID of the user to retrieve the information from.
      responses:
        200:
          description: Intake info successfully retrieved!
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_timezone:
                    type: string
                    example: Europe/Madrid
                    description: Timezone of the user, using the TZ Database names.
                      All timestamps in this response correspond to the moment the
                      intake was created, dynamically calculated based on the user's
                      time zone at that moment. This ensures the timestamp is preserved
                      even if the user subsequently changes time zone.
                  intake_info:
                    type: object
                    properties:
                      intake_name:
                        type: string
                        description: Optional custom name for the intake/meal. Required
                          if logging a dish from scratch without an ID.
                        example: Cannelloni, spring rolls and salad
                      image_id:
                        type: integer
                        description: ID of the image related to this food intake.
                        example: 123
                      processed_image_size:
                        type: object
                        properties:
                          width:
                            type: integer
                            example: 500
                            description: Width of the processed image. Note that it
                              might not match the uploaded image width. Use this information
                              to interpret the segmentation polygon and the bounding
                              box extracted by the food recognition algorithms.
                          height:
                            type: integer
                            example: 400
                            description: Height of the processed image. Note that
                              it might not match the uploaded image height. Use this
                              information to interpret the segmentation polygon and
                              the bounding box extracted by the food recognition algorithms.
                      quantity_prediction_status:
                        type: string
                        description: 'Describes the status of the quantity estimation
                          procedure that might be running in background for this image.
                          Note: if status is null it means no automated quantity estimation
                          procedure has taken place.'
                        nullable: true
                        enum:
                        - running
                        - done
                        - error
                      foodName:
                        type: string
                        example: spaghetti bolognese
                        description: Name of the food/recipe. If there are multiple
                          foods for this image, a list of foodNames will be returned
                          instead.
                      foodGroup:
                        type: array
                        items:
                          type: integer
                        example:
                        - meat
                        - dairy_products
                        description: A list containing the names of the food groups
                      ids:
                        type: integer
                        example: 324
                        description: IDs of the dishes the information has been obtained
                          from. If there are multiple foods for this image, a list
                          of ids will be returned instead. For dishes coming from
                          manual inputs (not in our database) a null ID will be provided.
                          Note that dishes with null ids won't have effect on the
                          nutritional information returned.
                      image_url:
                        type: string
                        description: URL to access the image. This URL has an expiration
                          time of 1 day. This value will be null in case it corresponds
                          to a manualInput (see endpoint /intake/manualInput)
                        example: https://storage.logmeal.com/apiImages/123.jpg
                      occasion:
                        type: string
                        description: Occasion of the food intake, based on the image
                          timestamp. One of ['breakfast', 'lunch', 'dinner', 'snack']
                        example: breakfast
                      occasion_info:
                        description: Contains information about the occasion.
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              description: Occasion id. Null if default occasion
                              type: integer
                              example: 45
                            translation:
                              description: Translation to the language of the request
                                if available. Not available with default occasions.
                              type: string
                              example: cena
                      timestamp:
                        type: string
                        description: Timestamp of the image. Following the format
                          '%Y/%m/%d, %H:%M:%S'
                        example: 2020/03/02, 21:19:15
                      is_kiosk_image:
                        type: boolean
                        description: "Flag indicating whether the image was acquired\
                          \ using a **LogMeal Kiosk** device.\n\nWhen this value is\
                          \ `true`, the image originates from a Kiosk and therefore:\n\
                          \  - The image may include an additional field named `annotation_data`,\
                          \ which contains **user-corrected bounding boxes** \n  \
                          \  for the segmentation process. These should be used instead\
                          \ of the automatically generated ones in `segmentation_data`,\
                          \ \n    as they have higher accuracy.\n\nFor more information,\
                          \ refer to the Kiosk API documentation (api.logmeal.com/kiosk/docs).\"\
                          \n"
                        example: 'True'
                      hasNutritionalInfo:
                        type: boolean
                        description: Boolean that determines if this intake entry
                          has the 'nutritional_info' field available.
                        example: 'True'
                      serving_size:
                        type: number
                        format: float
                        example: 16.0
                        description: Detected weight for the product if detected automatically
                          or confirmed by the user. Depending on the context, it can
                          also correspond to the standard quantity of food corresponding
                          to one portion for the average person.
                      nutritional_info:
                        type: object
                        description: Object containing all the nutritional information
                          related to the food intake.
                        properties:
                          calories:
                            type: number
                            format: float
                            description: Total amount of calories obtained from this
                              food intake.
                            example: 340.26
                          totalNutrients:
                            type: object
                            description: Contains basic information of the nutrient
                              and it's amount found in the current food intake. The
                              key 'NutrientCodeSample' will be replaced by each nutrient
                              code (for each nutrient, a NutrientCodeSample will be
                              returned).
                            properties:
                              label:
                                type: string
                                description: Translated label of the nutritional indicator.
                                example: Sugars
                              quantity:
                                type: number
                                format: float
                                description: Amount of the nutrient.
                                example: 20.3
                              unit:
                                type: string
                                description: Unit used to measure the quantity provided.
                                example: g
                      nutritional_info_per_item:
                        description: List of nutritional info for each of the food
                          items on the image.
                        type: array
                        items:
                          type: object
                          description: Nutritional information related to one of the
                            food segments/regions detected or confirmed on the image.
                          properties:
                            food_item_position:
                              description: Identifier for a food item in the segmentation_results
                                list. This value can either be an integer (if providing
                                from the original food segmentation result) or a string
                                (if confirmed an extra region that was not originally
                                detected).
                              type: integer
                              example: 1
                            hasNutriScore:
                              description: Either if the food item has nutri score
                                or not (only present of Custom Plans).
                              type: boolean
                              example: true
                            hasNutritionalInfo:
                              description: Either if the food item has nutritional
                                info or not.
                              type: integer
                              example: 1
                            id:
                              description: Identifier of the food item/dish detected
                                on this region.
                              type: integer
                              example: 234
                            nutri_score:
                              description: Nutritional score associated to the recognized
                                food item (this information is only provided if you
                                have a Monitor plan or higher).
                              type: object
                              properties:
                                nutri_score_category:
                                  description: The  Nutri-Score category for the predicted
                                    dish. The parameter is only returned if the APIUser
                                    has access to the 'Recommend' plan. Check endpoint
                                    '/v2/score/{imageId}/nutriScore' for more information
                                    on Nutri-Score.
                                  type: string
                                  example: A
                                  enum:
                                  - A
                                  - B
                                  - C
                                  - D
                                  - E
                                nutri_score_standardized:
                                  description: The standardized Nutri-Score values
                                    for the predicted dish. The parameter is only
                                    returned if the APIUser has access to the 'Recommend'
                                    plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                    for more information on Nutri-Score.
                                  type: integer
                                  example: 70
                            serving_size:
                              description: Food quantity (in grams) corresponding
                                to this food item.
                              type: number
                              format: float
                              example: 56.705
                            nutritional_info:
                              type: object
                              description: Object containing all the nutritional information
                                related to the food intake.
                              properties:
                                calories:
                                  type: number
                                  format: float
                                  description: Total amount of calories obtained from
                                    this food intake.
                                  example: 340.26
                                totalNutrients:
                                  type: object
                                  description: Contains basic information of the nutrient
                                    and it's amount found in the current food intake.
                                    The key 'NutrientCodeSample' will be replaced
                                    by each nutrient code (for each nutrient, a NutrientCodeSample
                                    will be returned).
                                  properties:
                                    label:
                                      type: string
                                      description: Translated label of the nutritional
                                        indicator.
                                      example: Sugars
                                    quantity:
                                      type: number
                                      format: float
                                      description: Amount of the nutrient.
                                      example: 20.3
                                    unit:
                                      type: string
                                      description: Unit used to measure the quantity
                                        provided.
                                      example: g
                                dailyIntakeReference:
                                  type: object
                                  description: 'Contains information about the nutrient
                                    intake with relation to the daily reference value
                                    the user should intake. The key ''DailyReferenceNutrientCodeSample''
                                    will be replaced by each nutrient code we have
                                    daily reference values for. These are only approximations,
                                    they should be used as a simple reference to help
                                    the users understand how every single intake affects
                                    their total daily nutrients. '
                                  properties:
                                    label:
                                      type: string
                                      description: Translated label of the nutritional
                                        indicator.
                                      example: Sugars
                                    level:
                                      type: string
                                      description: Level that we assign to the nutrient
                                        with relation to the daily reference value
                                        the user should intake. It's value will be
                                        one of ['NONE', 'LOW', 'MEDIUM', 'HIGH'].
                                        You can use this levels to display which nutrients
                                        from the intake represent a high portion of
                                        the user's expected intake.
                                      example: HIGH
                                    percent:
                                      type: number
                                      format: float
                                      description: Percentage of the total amount
                                        of the nutrient the user should intake with
                                        relation to the daily reference value.
                                      example: 25.3
                      recipe:
                        type: array
                        description: Array containing the ingredients and their quantity
                          of the recipe.
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            measure:
                              type: object
                              description: Only available for Monitor plans and higher.
                                Weight information for the current ingredient. The
                                'preferred' field will display the user's preferred
                                measurement system, unless it has been manually set
                                for this ingredient by calling /nutrition/confirm/ingredients.
                              properties:
                                metric:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      description: ID of the returned weight measure.
                                    grams_conversion:
                                      type: number
                                      description: Amount of grams that correspond
                                        to one unit of this weight measure.
                                    name:
                                      type: string
                                      description: Translated name of the weight measure.
                                    short:
                                      type: string
                                      description: Short name of the weight measure.
                                    type:
                                      description: Type of weight measure displayed.
                                      type: string
                                      enum:
                                      - weight
                                      - cooking_measures
                                      - portions
                                preferred:
                                  oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      short:
                                        type: string
                                        description: Short name of the weight measure.
                                      type:
                                        description: Type of weight measure displayed.
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  - type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      type:
                                        type: string
                                        description: Type of weight measure displayed.
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                            name:
                              type: string
                            unit:
                              type: string
                            weight:
                              type: number
                          example:
                            id: 144
                            name: spaghetti
                            unit: g
                            weight: 85.0
                      recipe_per_item:
                        type: array
                        items:
                          type: object
                          properties:
                            food_item_position:
                              example: 1
                              oneOf:
                              - type: integer
                              - type: string
                            foodGroups:
                              description: List of food groups belonging to the identified
                                food item.
                              type: array
                              items:
                                type: object
                                description: Nutritional information related to one
                                  of the food segments/regions detected or confirmed
                                  on the image.
                                properties:
                                  id:
                                    description: Food Group identifier
                                    type: integer
                                    example: 1
                                  name:
                                    description: Name of the food group translated
                                      into the user language
                                    type: string
                                    example: vegetables
                            dish_id:
                              description: Id of the identified food item.
                              type: integer
                            measure:
                              type: object
                              description: Only available for Monitor plan and higher.
                                Weight information for the current dish. The 'preferred'
                                field will display the user's preferred measurement
                                system, unless it has been manually set for this dish
                                by calling /nutrition/confirm/quantity.
                              properties:
                                metric:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      description: ID of the returned weight measure.
                                    grams_conversion:
                                      type: number
                                      description: Amount of grams that correspond
                                        to one unit of this weight measure.
                                    name:
                                      type: string
                                      description: Translated name of the weight measure.
                                    short:
                                      type: string
                                      description: Short name of the weight measure.
                                    type:
                                      description: Type of weight measure displayed.
                                      type: string
                                      enum:
                                      - weight
                                      - cooking_measures
                                      - portions
                                portions:
                                  type: object
                                  description: Portion information for the current
                                    dish.
                                  properties:
                                    grams_conversion:
                                      type: number
                                      description: Amount of grams that correspond
                                        to one unit of this weight measure.
                                    quantity:
                                      type: number
                                      description: Amount of portions in this dish.
                                    type:
                                      type: string
                                      enum:
                                      - weight
                                      - cooking_measures
                                      - portions
                                preferred:
                                  description: Weight information displayed in the
                                    user's preferred measurement system, unless it
                                    has been manually set for this dish by calling
                                    /nutrition/confirm/ingredients.
                                  oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      short:
                                        type: string
                                        description: Short name of the weight measure.
                                      type:
                                        description: Type of weight measure displayed.
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  - type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      type:
                                        type: string
                                        description: Type of weight measure displayed.
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  - type: object
                                    description: Portion information for the current
                                      dish.
                                    properties:
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      quantity:
                                        type: number
                                        description: Amount of portions in this dish.
                                      type:
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                            levels:
                              description: Only available for Monitor plans and higher.
                                Shows the current modulation levels for this segment.
                              type: object
                              properties:
                                salt:
                                  type: string
                                  enum:
                                  - high
                                  - medium
                                  - low
                                  - none
                                sugar:
                                  type: string
                                  enum:
                                  - high
                                  - medium
                                  - low
                                  - none
                                oil:
                                  type: string
                                  enum:
                                  - high
                                  - medium
                                  - low
                                  - none
                            recipe:
                              type: array
                              description: Array containing the ingredients and their
                                quantity of the recipe.
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  measure:
                                    type: object
                                    description: Only available for Monitor plans
                                      and higher. Weight information for the current
                                      ingredient. The 'preferred' field will display
                                      the user's preferred measurement system, unless
                                      it has been manually set for this ingredient
                                      by calling /nutrition/confirm/ingredients.
                                    properties:
                                      metric:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            description: ID of the returned weight
                                              measure.
                                          grams_conversion:
                                            type: number
                                            description: Amount of grams that correspond
                                              to one unit of this weight measure.
                                          name:
                                            type: string
                                            description: Translated name of the weight
                                              measure.
                                          short:
                                            type: string
                                            description: Short name of the weight
                                              measure.
                                          type:
                                            description: Type of weight measure displayed.
                                            type: string
                                            enum:
                                            - weight
                                            - cooking_measures
                                            - portions
                                      preferred:
                                        oneOf:
                                        - type: object
                                          properties:
                                            id:
                                              type: integer
                                              description: ID of the returned weight
                                                measure.
                                            grams_conversion:
                                              type: number
                                              description: Amount of grams that correspond
                                                to one unit of this weight measure.
                                            name:
                                              type: string
                                              description: Translated name of the
                                                weight measure.
                                            short:
                                              type: string
                                              description: Short name of the weight
                                                measure.
                                            type:
                                              description: Type of weight measure
                                                displayed.
                                              type: string
                                              enum:
                                              - weight
                                              - cooking_measures
                                              - portions
                                        - type: object
                                          properties:
                                            id:
                                              type: integer
                                              description: ID of the returned weight
                                                measure.
                                            grams_conversion:
                                              type: number
                                              description: Amount of grams that correspond
                                                to one unit of this weight measure.
                                            name:
                                              type: string
                                              description: Translated name of the
                                                weight measure.
                                            type:
                                              type: string
                                              description: Type of weight measure
                                                displayed.
                                              enum:
                                              - weight
                                              - cooking_measures
                                              - portions
                                  name:
                                    type: string
                                  unit:
                                    type: string
                                  weight:
                                    type: number
                                example:
                                  id: 144
                                  name: spaghetti
                                  unit: g
                                  weight: 85.0
                            serving_size:
                              example: 85.0
                              type: number
                        description: In the case of food segmentation, this field
                          shows an array of recipes for each food segment.
                      segmentation_data:
                        description: "List of segmentation information for each of\
                          \ the food segments or regions automatically detected in\
                          \ the image.\n\nEach element represents one detected food\
                          \ item and includes its position, bounding box and polygonal\
                          \ segmentation data.\n\n&nbsp;\n\n**Note:**  \nFor images\
                          \ where `is_kiosk_image` is set to `true`, an additional\
                          \ field named `annotation_data` may also be present.  \n\
                          In that case, the bounding boxes provided in `annotation_data`\
                          \ should be considered the **corrected and more accurate**\
                          \ \nversion of the segmentation data shown here, as they\
                          \ come from user annotation rather than automatic detection.\n"
                        type: array
                        items:
                          type: object
                          description: Information for one of the found segments/regions
                          properties:
                            food_item_position:
                              description: Integer that identifies each of the food
                                items found on the segmentation process.
                              type: integer
                              example: 1
                            center:
                              description: Center for the detected food item (center
                                of contained_bbox).
                              type: object
                              properties:
                                x:
                                  type: integer
                                  example: 162
                                y:
                                  type: integer
                                  example: 367
                            contained_bbox:
                              description: Coordinates of the bounding box that contains
                                the detected food item.
                              type: object
                              properties:
                                x:
                                  type: integer
                                  example: 40
                                y:
                                  type: integer
                                  example: 231
                                h:
                                  type: integer
                                  example: 273
                                w:
                                  type: integer
                                  example: 245
                            polygon:
                              description: 'Specific polygon surrounding the detected
                                food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN,
                                yN], by drawing lines from (x1, y1) to (x2, y2), ...,
                                (xN-1, yN-1) to (xN, yN) and (xN, yN) to (x1, y1),
                                the whole polygon can be drawn.'
                              type: array
                              items:
                                type: integer
                              example:
                              - 92
                              - 231
                              - 91
                              - 232
                              - 85
                              - 232
                              - 85
                              - 233
                              - 95
                              - 231
                      image_nutri_score:
                        type: object
                        properties:
                          nutri_score_category:
                            description: The  Nutri-Score category for the image.
                              The parameter is only returned if the APIUser has access
                              to the 'Recommend' plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                              for more information on Nutri-Score.
                            type: string
                            example: A
                            enum:
                            - A
                            - B
                            - C
                            - D
                            - E
                          nutri_score_standardized:
                            description: The standardized Nutri-Score values for the
                              predicted image. The parameter is only returned if the
                              APIUser has access to the 'Recommend' plan. Check endpoint
                              '/v2/score/{imageId}/nutriScore' for more information
                              on Nutri-Score.
                            type: integer
                            example: 70
                      dysphagia:
                        type: object
                        properties:
                          adhesiveness:
                            description: "JSON where key value will be the food item\
                              \ position on the image and its value will be a number\
                              \ referring to the adhesiveness of the intake where\
                              \ 1 would be the lowest level and 5 the highest one.\n\
                              \            \n\"1\": 4,\n\n\"2\": 1,\n\n\"3\": 4\n"
                            type: object
                            properties:
                              food_item_position_1:
                                example: 4
                                type: integer
                              food_item_position_2:
                                example: 1
                                type: integer
                              food_item_position_3:
                                example: 4
                                type: integer
                          swallowing:
                            description: |
                              JSON where key value will be the food item position on the image and its value will be a number referring to the swallowing difficulty of the intake where 1 would be the easiest level and 5 the hardest one.

                              "1": 3,

                              "2": 3,

                              "3": 5
                            type: object
                            properties:
                              food_item_position_1:
                                example: 3
                                type: integer
                              food_item_position_2:
                                example: 3
                                type: integer
                              food_item_position_3:
                                example: 5
                                type: integer
                      annotation_data:
                        type: object
                        description: "Contains manually corrected bounding boxes (*bboxes*)\
                          \ for image segmentation.  \nThis field is **only present**\
                          \ when:\n  - `is_kiosk_image` is `true`, **and**\n  - the\
                          \ image has been annotated by a user.\n\nThe keys correspond\
                          \ to the `food_item_position` identifiers,  \nand each value\
                          \ provides the coordinates (`x`, `y`, `w`, `h`) of the annotated\
                          \ bounding box.\n\nThese coordinates represent **user-corrected\
                          \ segmentations** and should be used instead of \nthe automatically\
                          \ generated data in the `segmentation_data` field, as they\
                          \ have a higher accuracy.\n"
                        additionalProperties:
                          type: object
                          properties:
                            x:
                              type: integer
                              description: X coordinate (top-left corner of the bounding
                                box).
                              example: 200
                            y:
                              type: integer
                              description: Y coordinate (top-left corner of the bounding
                                box).
                              example: 352
                            w:
                              type: integer
                              description: Width of the bounding box in pixels.
                              example: 181
                            h:
                              type: integer
                              description: Height of the bounding box in pixels.
                              example: 159
                  total_result:
                    type: object
                    properties:
                      ENERC_KCAL:
                        type: number
                        format: float
                        example: 2085.89
                        description: Total intake of calories during the given period
                          of time. The Units used are KCal.
                      CHOCDF:
                        type: number
                        format: float
                        example: 308.74
                        description: Total intake of carbohydrates during the given
                          period of time. The Units used are Grams.
                      FAT:
                        type: number
                        format: float
                        example: 57.17
                        description: Total intake of fat during the given period of
                          time. The Units used are Grams.
                      PROCNT:
                        type: number
                        format: float
                        example: 77.18
                        description: Total intake of protein during the given period
                          of time. The Units used are Grams.
              examples:
                Intakes List Example:
                  value:
                    intake_info:
                      favorite_image_id_link: null
                      foodGroup:
                      - meat
                      - dairy products
                      - noodles/pasta
                      - vegetables/legumes
                      - fried food
                      foodName:
                      - canelones de carne
                      - rollitos de primavera
                      - ensalada con ketchup
                      hasNutritionalInfo: true
                      ids:
                      - 947
                      - 7
                      - null
                      image_id: 1365065
                      intake_name: Canelones, rollitos y ensalada
                      processed_image_size:
                        height: 400
                        width: 500
                      image_nutri_score:
                        nutri_score_category: A
                        nutri_score_standardized: 81
                      image_url: https://staging.storage1.logmeal.es:6020/apiImages/1365065.jpg?storageToken=.eJyrVkqtKMgsSizJzM-LT0ksSVWyUjIyMDLSNTDVNbAMMTSzMjQGIj1TMzNDMwMlHaWSygKQmqLUxBQgLzM3Pb4gsSQDKKKfWJDpmZuYnlqsb2hsZmpgZqqXVZAOVOMY4Bmfk58MtgKoDsTMUaoFAHUvJBs.T3uWTETTWUzQdx8vVKpGdd8lZdo
                      is_kiosk_image: false
                      nutritional_info:
                        calories: 485.87
                        totalNutrients:
                          ALC:
                            label: Alcohol
                            quantity: 0.0
                            unit: g
                          CA:
                            label: Calcio
                            quantity: 106.07000000000001
                            unit: mg
                          CAFFN:
                            label: Cafeína
                            quantity: 0.0
                            unit: mg
                          CHOCDF:
                            label: Carbohidratos
                            quantity: 27.740000000000002
                            unit: g
                          CHOLE:
                            label: Colesterol
                            quantity: 134.55
                            unit: mg
                          ENERC_KCAL:
                            label: Energía
                            quantity: 485.87
                            unit: kcal
                          F18D3CN3:
                            label: Ácido alfa-linolénico (ALA)
                            quantity: 0.0
                            unit: g
                          F20D5:
                            label: Ácido eicosapentaenoico (EPA)
                            quantity: 0.020999999999999998
                            unit: g
                          F22D6:
                            label: Ácido docosahexaenoico (DHA)
                            quantity: 0.0021
                            unit: g
                          FAMS:
                            label: Grasas monosaturadas
                            quantity: 10.45
                            unit: g
                          FAPU:
                            label: Poliinsaturada
                            quantity: 3.69
                            unit: g
                          FASAT:
                            label: Saturadas
                            quantity: 8.120000000000001
                            unit: g
                          FAT:
                            label: Grasas
                            quantity: 24.86
                            unit: g
                          FATRN:
                            label: Grasas trans
                            quantity: 0.07
                            unit: g
                          FE:
                            label: Hierro
                            quantity: 3.5999999999999996
                            unit: mg
                          FIBTG:
                            label: Fibra
                            quantity: 2.54
                            unit: g
                          FOLAC:
                            label: Ácido fólico
                            quantity: 0.0
                            unit: µg
                          FOLDFE:
                            label: Folato equivalente (total)
                            quantity: 93.97
                            unit: µg
                          FOLFD:
                            label: Folato (comida)
                            quantity: 93.97
                            unit: µg
                          K:
                            label: Potasio
                            quantity: 714.03
                            unit: mg
                          MG:
                            label: Magnesio
                            quantity: 76.93
                            unit: mg
                          NA:
                            label: Sodio
                            quantity: 498.96
                            unit: mg
                          NIA:
                            label: Niacina (B3)
                            quantity: 10.07
                            unit: mg
                          P:
                            label: Fósforo
                            quantity: 357.68
                            unit: mg
                          PROCNT:
                            label: Proteína
                            quantity: 36.73
                            unit: g
                          RIBF:
                            label: Riboflavina (B2)
                            quantity: 0.41000000000000003
                            unit: mg
                          SUGAR:
                            label: Azúcares
                            quantity: 3.15
                            unit: g
                          SUGAR.added:
                            label: Azucares añadidos
                            quantity: 0.54
                            unit: g
                          THIA:
                            label: Tiamina (B1)
                            quantity: 0.32
                            unit: mg
                          TOCPHA:
                            label: Vitamina E
                            quantity: 2.34
                            unit: mg
                          VITA_RAE:
                            label: Vitamina A
                            quantity: 281.34000000000003
                            unit: µg
                          VITB12:
                            label: Vitamina B12
                            quantity: 1.74
                            unit: µg
                          VITB6A:
                            label: Vitamina B6
                            quantity: 0.73
                            unit: mg
                          VITC:
                            label: Vitamina C
                            quantity: 19.74
                            unit: mg
                          VITD:
                            label: Vitamina D
                            quantity: 15.68
                            unit: µg
                          VITK1:
                            label: Vitamina K
                            quantity: 206.15
                            unit: µg
                          ZN:
                            label: Zinc
                            quantity: 4.62
                            unit: mg
                      nutritional_info_per_item:
                      - food_item_position: 3
                        hasNutriScore: true
                        hasNutritionalInfo: true
                        id: 947
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        nutritional_info:
                          calories: 276.46
                          totalNutrients:
                            ALC:
                              label: Alcohol
                              quantity: 0.0
                              unit: g
                            CA:
                              label: Calcio
                              quantity: 106.07000000000001
                              unit: mg
                            CAFFN:
                              label: Cafeína
                              quantity: 0.0
                              unit: mg
                            CHOCDF:
                              label: Carbohidratos
                              quantity: 27.740000000000002
                              unit: g
                            CHOLE:
                              label: Colesterol
                              quantity: 134.55
                              unit: mg
                            ENERC_KCAL:
                              label: Energía
                              quantity: 485.87
                              unit: kcal
                            F18D3CN3:
                              label: Ácido alfa-linolénico (ALA)
                              quantity: 0.0
                              unit: g
                            F20D5:
                              label: Ácido eicosapentaenoico (EPA)
                              quantity: 0.020999999999999998
                              unit: g
                            F22D6:
                              label: Ácido docosahexaenoico (DHA)
                              quantity: 0.0021
                              unit: g
                            FAMS:
                              label: Grasas monosaturadas
                              quantity: 10.45
                              unit: g
                            FAPU:
                              label: Poliinsaturada
                              quantity: 3.69
                              unit: g
                            FASAT:
                              label: Saturadas
                              quantity: 8.120000000000001
                              unit: g
                            FAT:
                              label: Grasas
                              quantity: 24.86
                              unit: g
                            FATRN:
                              label: Grasas trans
                              quantity: 0.07
                              unit: g
                            FE:
                              label: Hierro
                              quantity: 3.5999999999999996
                              unit: mg
                            FIBTG:
                              label: Fibra
                              quantity: 2.54
                              unit: g
                            FOLAC:
                              label: Ácido fólico
                              quantity: 0.0
                              unit: µg
                            FOLDFE:
                              label: Folato equivalente (total)
                              quantity: 93.97
                              unit: µg
                            FOLFD:
                              label: Folato (comida)
                              quantity: 93.97
                              unit: µg
                            K:
                              label: Potasio
                              quantity: 714.03
                              unit: mg
                            MG:
                              label: Magnesio
                              quantity: 76.93
                              unit: mg
                            NA:
                              label: Sodio
                              quantity: 498.96
                              unit: mg
                            NIA:
                              label: Niacina (B3)
                              quantity: 10.07
                              unit: mg
                            P:
                              label: Fósforo
                              quantity: 357.68
                              unit: mg
                            PROCNT:
                              label: Proteína
                              quantity: 36.73
                              unit: g
                            RIBF:
                              label: Riboflavina (B2)
                              quantity: 0.41000000000000003
                              unit: mg
                            SUGAR:
                              label: Azúcares
                              quantity: 3.15
                              unit: g
                            SUGAR.added:
                              label: Azucares añadidos
                              quantity: 0.54
                              unit: g
                            THIA:
                              label: Tiamina (B1)
                              quantity: 0.32
                              unit: mg
                            TOCPHA:
                              label: Vitamina E
                              quantity: 2.34
                              unit: mg
                            VITA_RAE:
                              label: Vitamina A
                              quantity: 281.34000000000003
                              unit: µg
                            VITB12:
                              label: Vitamina B12
                              quantity: 1.74
                              unit: µg
                            VITB6A:
                              label: Vitamina B6
                              quantity: 0.73
                              unit: mg
                            VITC:
                              label: Vitamina C
                              quantity: 19.74
                              unit: mg
                            VITD:
                              label: Vitamina D
                              quantity: 15.68
                              unit: µg
                            VITK1:
                              label: Vitamina K
                              quantity: 206.15
                              unit: µg
                            ZN:
                              label: Zinc
                              quantity: 4.62
                              unit: mg
                        serving_size: 56.70500000000001
                      - food_item_position: ext2
                        hasNutriScore: true
                        hasNutritionalInfo: true
                        id: 7
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        nutritional_info:
                          calories: 209.4
                          totalNutrients:
                            ALC:
                              label: Alcohol
                              quantity: 0.0
                              unit: g
                            CA:
                              label: Calcio
                              quantity: 87.7
                              unit: mg
                            CAFFN:
                              label: Cafeína
                              quantity: 0.0
                              unit: mg
                            CHOCDF:
                              label: Carbohidratos
                              quantity: 27.71
                              unit: g
                            CHOLE:
                              label: Colesterol
                              quantity: 24.55
                              unit: mg
                            ENERC_KCAL:
                              label: Energía
                              quantity: 209.4
                              unit: kcal
                            F18D3CN3:
                              label: Ácido alfa-linolénico (ALA)
                              quantity: 0.0
                              unit: g
                            F20D5:
                              label: Ácido eicosapentaenoico (EPA)
                              quantity: 0.020999999999999998
                              unit: g
                            F22D6:
                              label: Ácido docosahexaenoico (DHA)
                              quantity: 0.0021
                              unit: g
                            FAMS:
                              label: Grasas monosaturadas
                              quantity: 3.57
                              unit: g
                            FAPU:
                              label: Poliinsaturada
                              quantity: 1.72
                              unit: g
                            FASAT:
                              label: Saturadas
                              quantity: 2.04
                              unit: g
                            FAT:
                              label: Grasas
                              quantity: 8.14
                              unit: g
                            FATRN:
                              label: Grasas trans
                              quantity: 0.03
                              unit: g
                            FE:
                              label: Hierro
                              quantity: 1.91
                              unit: mg
                            FIBTG:
                              label: Fibra
                              quantity: 2.54
                              unit: g
                            FOLAC:
                              label: Ácido fólico
                              quantity: 0.0
                              unit: µg
                            FOLDFE:
                              label: Folato equivalente (total)
                              quantity: 80.36
                              unit: µg
                            FOLFD:
                              label: Folato (comida)
                              quantity: 80.36
                              unit: µg
                            K:
                              label: Potasio
                              quantity: 394.25
                              unit: mg
                            MG:
                              label: Magnesio
                              quantity: 50.17
                              unit: mg
                            NA:
                              label: Sodio
                              quantity: 418.45
                              unit: mg
                            NIA:
                              label: Niacina (B3)
                              quantity: 1.81
                              unit: mg
                            P:
                              label: Fósforo
                              quantity: 129.52
                              unit: mg
                            PROCNT:
                              label: Proteína
                              quantity: 7.35
                              unit: g
                            RIBF:
                              label: Riboflavina (B2)
                              quantity: 0.15
                              unit: mg
                            SUGAR:
                              label: Azúcares
                              quantity: 3.15
                              unit: g
                            SUGAR.added:
                              label: Azucares añadidos
                              quantity: 0.54
                              unit: g
                            THIA:
                              label: Tiamina (B1)
                              quantity: 0.12
                              unit: mg
                            TOCPHA:
                              label: Vitamina E
                              quantity: 2.15
                              unit: mg
                            VITA_RAE:
                              label: Vitamina A
                              quantity: 237.55
                              unit: µg
                            VITB12:
                              label: Vitamina B12
                              quantity: 0.2
                              unit: µg
                            VITB6A:
                              label: Vitamina B6
                              quantity: 0.24
                              unit: mg
                            VITC:
                              label: Vitamina C
                              quantity: 19.63
                              unit: mg
                            VITD:
                              label: Vitamina D
                              quantity: 0.1
                              unit: µg
                            VITK1:
                              label: Vitamina K
                              quantity: 204.74
                              unit: µg
                            ZN:
                              label: Zinc
                              quantity: 0.91
                              unit: mg
                        serving_size: 0
                      - food_item_position: ext1
                        hasNutriScore: false
                        hasNutritionalInfo: false
                        id: null
                        nutritional_info: {}
                        serving_size: null
                      occasion: breakfast
                      occasion_info:
                        id: null
                        translation: breakfast
                      segmentation_data:
                      - center:
                          x: 162
                          y: 367
                        contained_bbox:
                          h: 273
                          w: 245
                          x: 40
                          y: 231
                        food_item_position: 1
                        polygon:
                        - 92
                        - 231
                        - 91
                        - 232
                        - 95
                        - 231
                      - center:
                          x: 385
                          y: 338
                        contained_bbox:
                          h: 297
                          w: 251
                          x: 260
                          y: 190
                        food_item_position: 2
                        polygon:
                        - 430
                        - 190
                        - 428
                        - 191
                        - 425
                        - 191
                        - 460
                        - 191
                        - 458
                        - 191
                        - 457
                        - 190
                      - center:
                          x: 273
                          y: 175
                        contained_bbox:
                          h: 258
                          w: 325
                          x: 111
                          y: 46
                        food_item_position: 3
                        polygon:
                        - 295
                        - 46
                        - 293
                        - 47
                        - 328
                        - 47
                        - 327
                        - 46
                      serving_size: 101.70500000000001
                      timestamp: 2022/05/09, 09:32:39
                      annotation_data:
                        '1':
                          h: 159
                          w: 181
                          x: 200
                          y: 352
                        ext1:
                          h: 95
                          w: 108
                          x: 185
                          y: 327
                        ext2:
                          h: 104
                          w: 93
                          x: 169
                          y: 220
                    total_result:
                      CHOCDF: 27.740000000000002
                      ENERC_KCAL: 485.87
                      FAT: 24.86
                      PROCNT: 36.73
                    user_timezone: CET
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: You are not the owner of this image.
                    code:
                      type: integer
                      example: 716
              examples:
                UserIsNotImageOwner:
                  value:
                    message: You are not the owner of this image.
                    code: 716
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: Image with id=____ does not exist.
                    code:
                      type: integer
                      example: 710
              examples:
                ImageDoesNotExist:
                  value:
                    message: Image with id=____ does not exist.
                    code: 710
      security:
      - Bearer: []
    delete:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Deletes an uploaded intake.
      description: ' Given an image id, this endpoint allows to remove its existent
        upload and all the information related to it (nutritional information). '
      parameters:
      - in: path
        name: imageId
        schema:
          type: integer
        required: true
        description: ID of the image to be removed. The image ID is obtained in the
          recognition response. It can be obtained through the nutritional information
          history endpoint too. The user must have access to the image in order to
          delete it.
      responses:
        200:
          description: Intake successfully deleted!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: You are not the owner of this image.
                    code:
                      type: integer
                      example: 716
                - type: object
                  properties:
                    message:
                      type: string
                      example: You don't have permissions to remove the image with
                        id=____
                    code:
                      type: integer
                      example: 1208
              examples:
                UserIsNotImageOwner:
                  value:
                    message: You are not the owner of this image.
                    code: 716
                NotAllowedToRemoveImage:
                  value:
                    message: You don't have permissions to remove the image with id=____
                    code: 1208
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: Image with id=____ does not exist.
                    code:
                      type: integer
                      example: 710
              examples:
                ImageDoesNotExist:
                  value:
                    message: Image with id=____ does not exist.
                    code: 710
      security:
      - Bearer: []
  /v2/intake/manualInput:
    post:
      deprecated: true
      tags:
      - Intake History
      summary: 🔴 Create a manual intake (without image-based prediction)
      description: "**[NOTE] This endpoint is DEPRECATED. We recommend using the endpoint\
        \ POST /intake/manualInput/{userId} instead.**\n\n&nbsp;\n\nEndpoint callable\
        \ by APIUser only.\n  \n\n&nbsp;\n\nCreates a manual intake consisting of\
        \ a consumed dish or a list of consumed food groups, without using an image-based\
        \ prediction. This is an alternative to the /recognition endpoints.\n\n&nbsp;\n\
        \nThis endpoint can be used to add an intake without the need of an image\
        \ nor applying the recognition process.\n\n&nbsp;\n\nYou must provide either\
        \ the parameter 'class_ids' or the parameter 'food_group_ids', but never both.\n"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timestamp:
                  type: string
                  description: Timestamp that will be assigned to the image. It will
                    take into account the user's timezone. Following the format '%Y/%m/%d,
                    %H:%M:%S'. If this is not provided it will be set to the current
                    time as default.
                  example: 2021/06/02, 21:19:15
                class_ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 52
                  - 53
                  description: A list of general class ids provided by /getAllClasses.
                    If a list has multiple elements then it will be considered that
                    it is a combo dish.
                food_group_ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 2
                  - 5
                  description: A list of food group ids.
        description: Parameters to create a manual dish.
        required: true
      responses:
        200:
          description: Manual input successfully created!
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Manual input successfully created!
                  imageId:
                    type: integer
                    description: ID of the mock image(intake) created by the manual
                      input.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: '''class_ids'' is required.'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: '''class_ids'' must be a list.'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: '''class_ids'' must not be empty.'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: The 'class_ids' elements must be integers.
                    code:
                      type: integer
                      example: 100
              examples:
                FormIsNotValid - Field required:
                  value:
                    message: '''class_ids'' is required.'
                    code: 100
                FormIsNotValid - Timestamp format:
                  value:
                    message: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code: 100
                FormIsNotValid - Field must be a list:
                  value:
                    message: '''class_ids'' must be a list.'
                    code: 100
                FormIsNotValid - List must not be empty:
                  value:
                    message: '''class_ids'' must not be empty.'
                    code: 100
                FormIsNotValid - List values must be integers:
                  value:
                    message: The 'class_ids' elements must be integers.
                    code: 100
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided class with id=____ is not valid.
                    code:
                      type: integer
                      example: 717
              examples:
                FoodClassIdNotValid:
                  value:
                    message: The provided class with id=____ is not valid.
                    code: 717
      security:
      - Bearer: []
  /v2/intake/manualInput/assign:
    post:
      deprecated: true
      tags:
      - Intake History
      summary: 🔵 Create a manual intake (without image-based prediction) and assign
        it to a set of specific APIUsers.
      description: " **[NOTE] This endpoint is DEPRECATED. We recommend using the\
        \ endpoint POST /intake/manualInput/bulkAssign instead.**\n\n&nbsp;\n\nEndpoint\
        \ callable by APIUserManager only.\n\n&nbsp;\n\nCreates a manual intake consisting\
        \ of a consumed dish or a list of consumed food groups, without using an image-based\
        \ prediction. This is an alternative to the /recognition endpoints. This endpoint\
        \ can be used to add an intake without the need of an image nor applying the\
        \ recognition process. The manual intake can be assigned simultaneously to\
        \ multiple APIUsers.\n\n&nbsp;\n\nYou must provide either the parameter 'class_ids'\
        \ or the parameter 'food_group_ids', but never both. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                api_user_ids:
                  type: array
                  items:
                    type: integer
                    description: API user IDs.
                  example:
                  - 12
                  - 13
                  - 14
                timestamp:
                  type: string
                  description: Timestamp that will be assigned to the image. It will
                    take into account the user's timezone. Following the format '%Y/%m/%d,
                    %H:%M:%S'. If this is not provided it will be set to the current
                    time as default.
                  example: 2021/06/02, 21:19:15
                class_ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 52
                  - 53
                  description: A list of general class ids provided by /getAllClasses.
                    If a list has multiple elements then it will be considered that
                    it is a combo dish.
                food_group_ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 2
                  - 5
                  description: A list of food group ids.
              required:
              - api_user_ids
        description: Parameters to create a manual dish.
        required: true
      responses:
        200:
          description: Manual input successfully created!
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Manual input successfully created!
                  assigned_list:
                    type: array
                    description: List of user and image assignments done.
                    items:
                      type: object
                      properties:
                        userId:
                          type: integer
                          description: One of the user ids provided by parameter
                          example: 321
                        imageId:
                          type: integer
                          description: The image id assigned to the user.
                          example: 3242
        400:
          description: Bad request
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: '''class_ids'' is required.'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: '''class_ids'' must be a list.'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: '''class_ids'' must not be empty.'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: The 'class_ids' elements must be integers.
                    code:
                      type: integer
                      example: 100
              examples:
                FormIsNotValid - Field required:
                  value:
                    message: '''class_ids'' is required.'
                    code: 100
                FormIsNotValid - Timestamp format:
                  value:
                    message: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code: 100
                FormIsNotValid - Field must be a list:
                  value:
                    message: '''class_ids'' must be a list.'
                    code: 100
                FormIsNotValid - List must not be empty:
                  value:
                    message: '''class_ids'' must not be empty.'
                    code: 100
                FormIsNotValid - List values must be integers:
                  value:
                    message: The 'class_ids' elements must be integers.
                    code: 100
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided class with id=____ is not valid.
                    code:
                      type: integer
                      example: 717
                - type: object
                  properties:
                    message:
                      type: string
                      example: APIUser does not exist.
                    code:
                      type: integer
                      example: 1201
              examples:
                FoodClassIdNotValid:
                  value:
                    message: The provided class with id=____ is not valid.
                    code: 717
                APIUserDoesNotExist:
                  value:
                    message: APIUser does not exist.
                    code: 1201
      security:
      - Bearer: []
  /v2/intake/manualInput/{userId}:
    post:
      tags:
      - Intake History
      summary: 🔴🔵 Create a manual intake (without image-based prediction).
      description: "Creates an intake for the specified APIUser without using an image-based\
        \ prediction. This is an alternative to the recognition endpoints.\\\nMultiple\
        \ dishes can be specified in the intake, with only a valid **id** for the\
        \ dish being necessary (A list of valid classes can be \nobtained by calling\
        \ /dataset/dishes).\\\nOptionally, **quantity**, **levels** and **ingredients**\
        \ can be specified for each dish in the intake. If provided, these parameters\
        \ will be applied\nin the following order:\n1. **Ingredients**: Use the given\
        \ list of ingredients for the dish's recipe instead of using the default recipe\
        \ for the dish id.  \n2. **Levels**: Scale the level of salt, sugar and oil\
        \ in dishes. The weights for ingredients specified in the ingredients field\
        \ may be altered if you include this parameter. \n3. **Quantity:** If provided\
        \ the ingredients quantities will be scaled proportionally so that they sum\
        \ up to add the given quantity.\n"
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      requestBody:
        description: A JSON object with information the necessary information to create
          an intake manually.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                dishes:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: General class ID of the dish.
                        example: 70
                      quantity:
                        type: integer
                        description: (Optional) set the quantity for this dish. If
                          provided the ingredients quantities will be scaled proportionally
                          so that the total sum will match this quantity.
                      ingredients:
                        description: (Optional) A list of ingredients for this food
                          item. Specifying the amount (quantity) of each ingredient
                          is optional, if not provided the default serving size for
                          the ingredient will be used.
                        type: array
                        items:
                          type: object
                          description: Nutritional information related to one of the
                            food segments/regions detected or confirmed on the image.
                            Use either ingredientId or ingredientName.
                          properties:
                            ingredientId:
                              description: A valid ingredient ID from the logmeal
                                dataset. Call /dataset/ingredients for the list of
                                available ingredients.
                              type: integer
                              example: 140
                            ingredientName:
                              description: Name to identify an ingredient not present
                                in the system.
                              type: string
                              example: Spirulina
                            ingredientAmount:
                              description: (Optional) Weight in grams for this ingredient.
                                If not provided we'll use the average quantity for
                                this ingredient instead. Note that the quantity MUST
                                ALWAYS BE PROVIDED IN GRAMS, no matter which is the
                                user's preferred weight measure or which is the 'measureSystem'
                                or 'measureId' selected.
                              type: number
                              example: 75
                            measureSystem:
                              type: string
                              enum:
                              - weight
                              - cooking_measures
                              description: Define how the user would like to see quantity
                                information for this dish. (Monitor plan or higher
                                required).
                            measureId:
                              type: integer
                              description: Select a specific measure from the selected
                                measureSystem. If provided, 'measureSystem' must also
                                be provided and the measureId should be a valid measure
                                for this ingredient. Note that this only edits the
                                default unit used when returning an ingredient measure.
                                Independently from this, the reported 'ingredientAmount'
                                must always be provided in grams. Monitor plan or
                                higher required.
                      levels:
                        description: (Optional) Set the level of salt, sugar or oil
                          for this dish.
                        type: object
                        properties:
                          salt:
                            type: string
                            enum:
                            - high
                            - medium
                            - low
                            - none
                          sugar:
                            type: string
                            enum:
                            - high
                            - medium
                            - low
                            - none
                          oil:
                            type: string
                            enum:
                            - high
                            - medium
                            - low
                            - none
                    required:
                    - id
                  description: List of dish ids to be inserted into the intake.
                timestamp:
                  type: string
                  description: Timestamp that will be assigned to the image. It will
                    take into account the user's timezone. Following the format '%Y/%m/%d,
                    %H:%M:%S'. If this is not provided it will be set to the current
                    time as default.
                  example: 2021/06/02, 21:19:15
              required:
              - dishes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Manual input created succesfully.
                  intake:
                    type: object
                    properties:
                      imageId:
                        type: integer
                        example: 623657
                      occasion:
                        type: string
                        example: lunch
                      userId:
                        type: integer
                        example: 546
        '400':
          description: BAD REQUEST
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                DishesNotProvided:
                  value:
                    message: Please provide 'dishes' as an array.
                    code: 100
        '401':
          description: UNAUTHORIZED
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '404':
          description: NOT FOUND
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
      security:
      - Bearer: []
  /v2/intake/manualInput/bulkAssign:
    post:
      tags:
      - Intake History
      summary: 🔵 Create manual intakes in bulk (without image-based prediction).
      description: |
        Used by APIManagers to assign intakes to their APIUsers in bulk.
      requestBody:
        description: A JSON array with information about multiple intakes.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                intakes:
                  type: array
                  items:
                    type: object
                    properties:
                      intake_name:
                        type: string
                        description: Optional custom name for the intake/meal. Required
                          if logging a dish from scratch without an ID.
                        example: Cannelloni, spring rolls and salad
                      dishes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: General class ID of the dish.
                              example: 70
                            quantity:
                              type: integer
                              description: (Optional) set the quantity for this dish.
                                If provided the ingredients quantities will be scaled
                                proportionally so that the total sum will match this
                                quantity.
                            ingredients:
                              description: (Optional) A list of ingredients for this
                                food item. Specifying the amount (quantity) of each
                                ingredient is optional, if not provided the default
                                serving size for the ingredient will be used.
                              type: array
                              items:
                                type: object
                                description: Nutritional information related to one
                                  of the food segments/regions detected or confirmed
                                  on the image. Use either ingredientId or ingredientName.
                                properties:
                                  ingredientId:
                                    description: A valid ingredient ID from the logmeal
                                      dataset. Call /dataset/ingredients for the list
                                      of available ingredients.
                                    type: integer
                                    example: 140
                                  ingredientName:
                                    description: Name to identify an ingredient not
                                      present in the system.
                                    type: string
                                    example: Spirulina
                                  ingredientAmount:
                                    description: (Optional) Weight in grams for this
                                      ingredient. If not provided we'll use the average
                                      quantity for this ingredient instead. Note that
                                      the quantity MUST ALWAYS BE PROVIDED IN GRAMS,
                                      no matter which is the user's preferred weight
                                      measure or which is the 'measureSystem' or 'measureId'
                                      selected.
                                    type: number
                                    example: 75
                                  measureSystem:
                                    type: string
                                    enum:
                                    - weight
                                    - cooking_measures
                                    description: Define how the user would like to
                                      see quantity information for this dish. (Monitor
                                      plan or higher required).
                                  measureId:
                                    type: integer
                                    description: Select a specific measure from the
                                      selected measureSystem. If provided, 'measureSystem'
                                      must also be provided and the measureId should
                                      be a valid measure for this ingredient. Note
                                      that this only edits the default unit used when
                                      returning an ingredient measure. Independently
                                      from this, the reported 'ingredientAmount' must
                                      always be provided in grams. Monitor plan or
                                      higher required.
                            levels:
                              description: (Optional) Set the level of salt, sugar
                                or oil for this dish.
                              type: object
                              properties:
                                salt:
                                  type: string
                                  enum:
                                  - high
                                  - medium
                                  - low
                                  - none
                                sugar:
                                  type: string
                                  enum:
                                  - high
                                  - medium
                                  - low
                                  - none
                                oil:
                                  type: string
                                  enum:
                                  - high
                                  - medium
                                  - low
                                  - none
                          required:
                          - id
                        description: List of dish ids to be inserted into the intake.
                      timestamp:
                        type: string
                        description: Timestamp that will be assigned to the image.
                          It will take into account the user's timezone. Following
                          the format '%Y/%m/%d, %H:%M:%S'. If this is not provided
                          it will be set to the current time as default.
                        example: 2021/06/02, 21:19:15
                      userId:
                        type: integer
                        description: ID of the APIUser to assign this intake to.
                        example: 11
                    required:
                    - dishes
                    - userId
              required:
              - intakes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Manual inputs created successfully.
                  intakes:
                    type: array
                    items:
                      type: object
                      properties:
                        imageId:
                          type: integer
                          example: 623657
                        occasion:
                          type: string
                          example: lunch
                        userId:
                          type: integer
                          example: 546
        '400':
          description: BAD REQUEST
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                DishesNotProvided:
                  value:
                    message: Please provide 'dishes' as an array.
                    code: 100
        '401':
          description: UNAUTHORIZED
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '404':
          description: NOT FOUND
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
      security:
      - Bearer: []
  /v2/intake/modifyNutritionalInfo:
    post:
      tags:
      - Intake History
      summary: 🔴🔵 Modify the nutritional info of an uploaded intake
      description: "Modify the nutritional information indicators of a previously\
        \ uploaded intake (image). The changes will take  place on the /history/getIntakesList\
        \ endpoint or any other endpoint that retrieves the nutritional  information\
        \ for an image.\n&nbsp;\nA different format has to be provided for the submitted\
        \ nutritional information depending on whether the image has a prediction\
        \ of type food recognition or of type food segmentation. \n- In case the image\
        \ at hand has a **prediction of type segmentation**, then you have to provide\
        \ the  parameter 'nutritional_indicators_per_item' containing an object where\
        \ keys are food item identifiers and values are lists of nutritional codes\
        \ and values.\n- In case the image at hand has a **prediction of type recognition**,\
        \ then you have to provide the  parameter 'nutritional_indicators' containing\
        \ a list of nutritional codes and values.\n\nCheck the provided examples for\
        \ additional information.\n&nbsp;\nNote that if you confirm a new list of\
        \ dishes for this intake or you apply any ingredient modification,  the nutritional\
        \ information will be re-calculated based on the new list of dishes or ingredients.\n"
      requestBody:
        description: Parameters to update an intake nutritional information.
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                description: the parameter 'nutritional_indicators_per_item' has to
                  be provided if the image has a prediction of type segmentation,
                  otherwise the parameter 'nutritional_indicators' has to be provided
                  if the image has a prediction of type recognition.
                properties:
                  imageId:
                    type: integer
                    description: ID of the image to be modified. The image ID is obtained
                      in the recognition response. It can be obtained through the
                      nutritional information history endpoint too. The user must
                      have access to the image in order to modify it.
                    example: 123456
                  nutritional_indicators:
                    type: array
                    description: a list with all the nutritional codes can be provided.
                      Any non-specified nutritional code will be set to 0.
                    items:
                      type: object
                      properties:
                        indicatorCode:
                          type: string
                          example: FE
                        indicatorAmount:
                          type: number
                          format: float
                          example: 6.7
                    example:
                    - indicatorCode: FE
                      indicatorAmount: 6.7
                    - indicatorCode: CA
                      indicatorAmount: 2.8
                  nutritional_indicators_per_item:
                    type: object
                    description: an object with food item identifiers as keys and
                      lists as values has to be provided. Each list can include all
                      nutritional codes. Any non-specified nutritional code will be
                      set to 0.
                    properties:
                      food_item_id_1:
                        type: array
                        items:
                          type: object
                          properties:
                            indicatorCode:
                              type: string
                              example: FE
                            indicatorAmount:
                              type: number
                              format: float
                              example: 6.7
                      food_item_id_2:
                        type: array
                        items:
                          type: object
                          properties:
                            indicatorCode:
                              type: string
                              example: FE
                            indicatorAmount:
                              type: number
                              format: float
                              example: 6.7
                required:
                - imageId
              - type: object
                properties:
                  intakes:
                    type: array
                    items:
                      type: object
                      description: the parameter 'nutritional_indicators_per_item'
                        has to be provided if the image has a prediction of type segmentation,
                        otherwise the parameter 'nutritional_indicators' has to be
                        provided if the image has a prediction of type recognition.
                      properties:
                        imageId:
                          type: integer
                          description: ID of the image to be modified. The image ID
                            is obtained in the recognition response. It can be obtained
                            through the nutritional information history endpoint too.
                            The user must have access to the image in order to modify
                            it.
                          example: 123456
                        nutritional_indicators:
                          type: array
                          description: a list with all the nutritional codes can be
                            provided. Any non-specified nutritional code will be set
                            to 0.
                          items:
                            type: object
                            properties:
                              indicatorCode:
                                type: string
                                example: FE
                              indicatorAmount:
                                type: number
                                format: float
                                example: 6.7
                          example:
                          - indicatorCode: FE
                            indicatorAmount: 6.7
                          - indicatorCode: CA
                            indicatorAmount: 2.8
                        nutritional_indicators_per_item:
                          type: object
                          description: an object with food item identifiers as keys
                            and lists as values has to be provided. Each list can
                            include all nutritional codes. Any non-specified nutritional
                            code will be set to 0.
                          properties:
                            food_item_id_1:
                              type: array
                              items:
                                type: object
                                properties:
                                  indicatorCode:
                                    type: string
                                    example: FE
                                  indicatorAmount:
                                    type: number
                                    format: float
                                    example: 6.7
                            food_item_id_2:
                              type: array
                              items:
                                type: object
                                properties:
                                  indicatorCode:
                                    type: string
                                    example: FE
                                  indicatorAmount:
                                    type: number
                                    format: float
                                    example: 6.7
                      required:
                      - imageId
                required:
                - intakes
      responses:
        200:
          description: Nutritional information modified successfully!
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Nutritional information modified successfully!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    code:
                      type: integer
                    message:
                      type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: You are not the owner of this image.
                    code:
                      type: integer
                      example: 716
                - type: object
                  properties:
                    message:
                      type: string
                      example: You don't have permissions to update the image with
                        id=____
                    code:
                      type: integer
                      example: 1223
              examples:
                UserIsNotImageOwner:
                  value:
                    message: You are not the owner of this image.
                    code: 716
                NotAllowedToUpdateImage:
                  value:
                    message: You don't have permissions to update the image with id=____
                    code: 1223
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Image with id=____ does not exist.
                  code:
                    type: integer
                    example: 710
              examples:
                Image does not exist:
                  value:
                    message: Image with id=____ does not exist.
                    code: 710
      security:
      - Bearer: []
  /v2/intake/modifyTimestamp:
    post:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Modify the timestamp of an uploaded intake
      description: " Modify the timestamp of a previously uploaded intake (image).\
        \ By default the images are created with the moment of the request as the\
        \ timestamp (taking into consideration the user's assigned timezone).\n\n\
        &nbsp;\n\nThis endpoint can be used to move intakes to a moment of your choice,\
        \ so it can be taken into account properly in the nutritional intake history.\
        \ When editing the image timestamp using this endpoint its occasion will be\
        \ updated accordingly (e.g. if changing its timestamp to 12:30pm its occasion\
        \ will become 'lunch'), **unless the optional parameter `freeze_occasion`\
        \ is provided**.\n<br>\nIf `freeze_occasion` is present in the request, the\
        \ intake occasion will remain unchanged regardless of the new timestamp.\n\
        <br>\nSee more info about occasions in /intake/modifyOccasion.\n\n&nbsp;\n\
        \n**Important limitation:** This feature cannot be used with images that come\
        \ from a *kiosk*. The reason is that these images are tied to what was served\
        \ on a specific day and time. Changing their timestamp would create inconsistencies\
        \ with the meals available at that moment.\n\n&nbsp;\n\nTo know if an image\
        \ is of type *kiosk*, you can check the endpoints `/getIntakesList` or `[GET]\
        \ /intakes`. If the image has the flag `is_kiosk_image = true`, its timestamp\
        \ cannot be modified. "
      parameters:
      - in: query
        name: freeze_occasion
        required: false
        schema:
          type: string
          example: ''
        description: ' Optional parameter. If provided, the intake occasion will NOT
          be recalculated when modifying the timestamp, even if the new timestamp
          corresponds to a different meal time range. If not provided, the occasion
          will be updated automatically. '
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timestamp:
                  type: string
                  description: Timestamp that will be assigned to the image. It will
                    take into account the user's (owner of the image) timezone. Following
                    the format '%Y/%m/%d, %H:%M:%S'.
                  example: 2021/06/02, 21:19:15
                imageId:
                  type: integer
                  description: ID of the image to be modified. The image ID is obtained
                    in the recognition response. It can be obtained through the nutritional
                    information history endpoint too. The user must have access to
                    the image in order to modify it.
                  example: 123456
              required:
              - timestamp
              - imageId
        description: Parameters to update an intake timestamp.
        required: true
      responses:
        200:
          description: Image timestamp successfully updated!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
              examples:
                FormIsNotValid - Timestamp format:
                  value:
                    message: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code: 100
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: You are not the owner of this image.
                    code:
                      type: integer
                      example: 716
                - type: object
                  properties:
                    message:
                      type: string
                      example: You don't have permissions to update the image with
                        id=____
                    code:
                      type: integer
                      example: 1223
              examples:
                UserIsNotImageOwner:
                  value:
                    message: You are not the owner of this image.
                    code: 716
                NotAllowedToUpdateImage:
                  value:
                    message: You don't have permissions to update the image with id=____
                    code: 1223
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Image with id=____ does not exist.
                  code:
                    type: integer
                    example: 710
              examples:
                Image does not exist:
                  value:
                    message: Image with id=____ does not exist.
                    code: 710
      security:
      - Bearer: []
  /v2/intake/modifyOccasion:
    post:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Modify the occasion of an uploaded intake
      description: " Modify the occasion of a previously uploaded intake (image).\
        \ By default the images have an occasion assigned based on the moment of the\
        \ request as the timestamp (taking into consideration the user's assigned\
        \ timezone and if the user belongs to a company, in this case, if the company\
        \ has defined occasions).\n\n&nbsp;\n\nThis endpoint can be used to group\
        \ the intakes for each occasion of the day, so it can be taken into account,\
        \ for example, for displaying purposes. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Either 'occasion' or 'occasion_id' must be provided, but
                never both.
              properties:
                occasion:
                  type: string
                  description: |
                    Occasion that will be assigned to the image.
                    If the company does not have custom_occasions, the valid values for default occasions will be: breakfast, lunch, dinner, snack.".


                    Otherwise, the names from the custom_occasions must be used.
                  example: lunch
                occasion_id:
                  type: integer
                  description: Occasion id that will be assigned to the image. Only
                    valid if the company has valid custom_occasions.
                  example: 45
                imageId:
                  type: integer
                  description: ID of the image to be modified. The image ID is obtained
                    in the recognition response. It can be obtained through the nutritional
                    information history endpoint too. The user must have access to
                    the image in order to modify it.
                  example: 123456
              required:
              - imageId
        description: Parameters to update an intake occasion.
        required: true
      responses:
        200:
          description: Image occasion successfully updated!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided occasion is invalid. You must provide
                        one of ['breakfast','lunch','dinner','snack'].
                    code:
                      type: integer
                      example: 1011
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The company has active occasions defined but the provided
                        occasion is invalid. Active occasions defined: [u''morningmeal'',
                        u''middaymeal'', u''lastmeal'', u''snack'']'
                    code:
                      type: integer
                      example: 1639
              examples:
                InvalidDefaultOccasion:
                  value:
                    message: The provided occasion is invalid. You must provide one
                      of ['breakfast','lunch','dinner','snack'].
                    code: 1011
                InvalidCompanyOccasion:
                  value:
                    message: 'The company has active occasions defined but the provided
                      occasion is invalid. Active occasions defined: [u''morningmeal'',
                      u''middaymeal'', u''lastmeal'', u''snack'']'
                    code: 1639
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: You are not the owner of this image.
                    code:
                      type: integer
                      example: 716
                - type: object
                  properties:
                    message:
                      type: string
                      example: You don't have permissions to update the image with
                        id=____
                    code:
                      type: integer
                      example: 1223
              examples:
                UserIsNotImageOwner:
                  value:
                    message: You are not the owner of this image.
                    code: 716
                NotAllowedToUpdateImage:
                  value:
                    message: You don't have permissions to update the image with id=____
                    code: 1223
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Image with id=____ does not exist.
                  code:
                    type: integer
                    example: 710
              examples:
                Image does not exist:
                  value:
                    message: Image with id=____ does not exist.
                    code: 710
      security:
      - Bearer: []
  /v2/intake/{image_id}/modify_name:
    post:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Modify the custom name of an uploaded intake
      description: |
        Updates the custom name (intake_name) of an existing intake image.

        &nbsp;

        Requires specific company service permissions (Modify Intake Name).
      parameters:
      - in: path
        name: image_id
        schema:
          type: integer
        required: true
        description: ID of the image to be modified.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                intake_name:
                  type: string
                  description: Optional custom name for the intake/meal. Required
                    if logging a dish from scratch without an ID.
                  example: Cannelloni, spring rolls and salad
              required:
              - intake_name
        description: Parameters to update an intake name.
        required: true
      responses:
        '200':
          description: Intake name modified successfully!
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Intake name modified successfully!
        '401':
          description: Unauthorized, invalid token.
        '403':
          description: Forbidden. Company plan does not allow this method.
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: You are not the owner of this image.
                    code:
                      type: integer
                      example: 716
                - type: object
                  properties:
                    message:
                      type: string
                      example: You don't have permissions to update the image with
                        id=____
                    code:
                      type: integer
                      example: 1223
              examples:
                UserIsNotImageOwner:
                  value:
                    message: You are not the owner of this image.
                    code: 716
                NotAllowedToUpdateImage:
                  value:
                    message: You don't have permissions to update the image with id=____
                    code: 1223
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Image with id=____ does not exist.
                  code:
                    type: integer
                    example: 710
              examples:
                Image does not exist:
                  value:
                    message: Image with id=____ does not exist.
                    code: 710
      security:
      - Bearer: []
  /v2/intake/barcode_scan/{barcode_id}:
    post:
      tags:
      - Intake History
      summary: 🔴 Scans a barcode and creates a new intake for the user ⏱⭐
      description: " <span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n<span style='color:purple;\
        \ font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount\
        \ of calls per second.</strong>\n\n&nbsp;\n\nIt scans a barcode and creates\
        \ a new intake for the user.\n\n&nbsp;\n\nThe database has over 3 million\
        \ products from 150 different countries and its periodically updated based\
        \ on new products appearing in the market. "
      parameters:
      - in: path
        name: barcode_id
        schema:
          type: integer
          example: 3029330022428
        required: true
        description: ID of the barcode to be required.
      responses:
        200:
          description: Product found!
          content:
            application/json:
              schema:
                type: object
                properties:
                  barcode:
                    type: integer
                    example: 3029330022428
                  imageId:
                    type: integer
                    example: 1620662
                  occasion:
                    type: string
                    example: snack
                  product_name:
                    type: string
                    example: Tomato Ketchup
                  userId:
                    type: integer
                    example: 546
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token.
        404:
          description: Product not found.
        503:
          description: External server down.
      security:
      - Bearer: []
  /v2/barcode_scan/{barcode_id}:
    post:
      tags:
      - Intake History
      summary: 🔴 Scans a barcode and returns its dish id ⏱⭐
      description: " <span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n<span style='color:purple;\
        \ font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount\
        \ of calls per second.</strong>\n\n&nbsp;\n\nIt scans a barcode and returns\
        \ its dish id without creating any new intake for the user. This is useful\
        \ for introducing manual intakes or confirming new items into a recognized\
        \ image that contain barcode products, among others.\n\n&nbsp;\n\nThe database\
        \ has over 3 million products from 150 different countries and its periodically\
        \ updated based on new products appearing in the market. "
      parameters:
      - in: path
        name: barcode_id
        schema:
          type: integer
          example: 3029330022428
        required: true
        description: ID of the barcode to be required.
      responses:
        200:
          description: Product found!
          content:
            application/json:
              schema:
                type: object
                properties:
                  barcode:
                    type: integer
                    example: 3029330022428
                  dish_id:
                    type: integer
                    example: 1493
                  product_name:
                    type: string
                    example: Tomato Ketchup
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token.
        404:
          description: Product not found.
        503:
          description: External server down.
      security:
      - Bearer: []
  /v2/history/getTotalIntakeByDay:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Get the total nutrient intake computed from the images uploaded
        on a given date (in a span of 24h). ⏱
      description: |2-
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        Returns the sum of the nutrient intakes, obtained from the images uploaded to our API during the timespan of the day provided. This timespan takes into account the user's timezone, so the results will always contain all the information for the given day based on the user's current timezone (UTC by default).

        &nbsp;

        Note that the output of this endpoint is based on approximations obtained from the user's images and should always be supervised by an expert.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_intake_day:
                    type: object
                    description: Contains basic information of the nutrient and it's
                      amount found in the current food intake. The key 'NutrientCodeSample'
                      will be replaced by each nutrient code (for each nutrient, a
                      NutrientCodeSample will be returned).
                    properties:
                      label:
                        type: string
                        description: Translated label of the nutritional indicator.
                        example: Sugars
                      quantity:
                        type: number
                        format: float
                        description: Amount of the nutrient.
                        example: 20.3
                      unit:
                        type: string
                        description: Unit used to measure the quantity provided.
                        example: g
                description: JSON containing the total intake of calories, and the
                  amount of fat/protein/carbs that the user has obtained from the
                  images it provided during the day. The responses will use the nutrient
                  codes as keys.
                example:
                  total_intake_day:
                    CHOCDF:
                      amount: 23.45
                      label: Carbohydrates
                      unit: g
                    ENERC_KCAL:
                      amount: 213.4
                      label: Energy
                      unit: kcal
                    FAT:
                      amount: 2.3
                      label: Fats
                      unit: g
                    PROCNT:
                      amount: 3.56
                      label: Protein
                      unit: g
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
      security:
      - Bearer: []
  /v2/history/getTotalIntakeByDay/{date}:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Get the total nutrient intake computed from the images uploaded
        on a given date (in a span of 24h). ⏱
      description: |2-
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        Returns the sum of the nutrient intakes, obtained from the images uploaded to our API during the timespan of the day provided. This timespan takes into account the user's timezone, so the results will always contain all the information for the given day based on the user's current timezone (UTC by default).

        &nbsp;

        Note that the output of this endpoint is based on approximations obtained from the user's images and should always be supervised by an expert.
      parameters:
      - in: path
        name: date
        required: true
        schema:
          type: string
          format: date
        description: Date to retrieve the information from. Using the format 'YYYY-MM-DD'.
          If this is not provided it will return the information for the current day.
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Optional parameter. Required for APIUserManagers/APICompanies.
          ID of the user to retrieve the information from.
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_intake_day:
                    type: object
                    description: Contains basic information of the nutrient and it's
                      amount found in the current food intake. The key 'NutrientCodeSample'
                      will be replaced by each nutrient code (for each nutrient, a
                      NutrientCodeSample will be returned).
                    properties:
                      label:
                        type: string
                        description: Translated label of the nutritional indicator.
                        example: Sugars
                      quantity:
                        type: number
                        format: float
                        description: Amount of the nutrient.
                        example: 20.3
                      unit:
                        type: string
                        description: Unit used to measure the quantity provided.
                        example: g
                description: JSON containing the total intake of calories, and the
                  amount of fat/protein/carbs that the user has obtained from the
                  images it provided during the day. The responses will use the nutrient
                  codes as keys.
                example:
                  total_intake_day:
                    CHOCDF:
                      amount: 23.45
                      label: Carbohydrates
                      unit: g
                    ENERC_KCAL:
                      amount: 213.4
                      label: Energy
                      unit: kcal
                    FAT:
                      amount: 2.3
                      label: Fats
                      unit: g
                    PROCNT:
                      amount: 3.56
                      label: Protein
                      unit: g
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
      security:
      - Bearer: []
  /v2/history/getIntakesList:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 List all user intakes with their nutritional information and ingredients
        between two dates. ⏱
      description: " <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n&nbsp;\n\nThis endpoint\
        \ provides a history of the user's intakes between two dates based on the\
        \ content of the images the user has uploaded during that period of time.\n\
        \n&nbsp;\n\nThe response contains a list with information about every single\
        \ intake uploaded by the user (containing the timestamp, occasion, nutritional\
        \ information, ingredients list and the URL to the image*), as well as the\
        \ total intake of the main nutrients obtained from the images (calories, carbohydrates,\
        \ fat and protein). All elements in the intakes list are sorted from older\
        \ to newer.\n\n&nbsp;\n\nIf a food segmentation has been applied on one of\
        \ the images (see /segmentation endpoints), then three extra attributes will\
        \ be returned in the response. The attribute 'nutritional_info_per_item',\
        \ which contains the detailed nutritional information for each of the food\
        \ segments/regions that have been detected or confirmed on the image; 'recipe_per_item',\
        \ which contains the list of ingredients for each segment/region detected;\
        \ and 'segmentation_data', which contains the list of food segments/regions\
        \ that have been detected automatically on the image. Note that the segmentation_data\
        \ might not be directly applicable to the uploaded image size. The segmentation\
        \ pixel values are scaled depending on the 'processed_image_size' values provided\
        \ for each of the images (the images might be sometimes resized depending\
        \ on the needs of the food recognition algorithms used).\n\n&nbsp;\n\n<strong>Additional\
        \ Notes for Kiosk Images:</strong><br> When the field 'is_kiosk_image' is\
        \ <strong>True</strong>, an additional field named 'annotation_data' may be\
        \ present. This field includes user-corrected bounding boxes (bboxes) for\
        \ each detected food item, replacing the automatically generated ones provided\
        \ inside 'segmentation_data'. These manually validated coordinates should\
        \ be considered as the reference for segmentation and nutritional calculations,\
        \ as they represent verified information with higher accuracy. The presence\
        \ of 'annotation_data' indicates that the image has been manually annotated\
        \ within the Kiosk environment.\n\n&nbsp;\n\nBe aware that not all the entries\
        \ of this response will contain nutritional information and ingredients list.\
        \ If the images have not been confirmed or don't have any prediction on a\
        \ dish level, the nutritional information won't be generated. If the element\
        \ from the intake list has the flag 'hasNutritionalInfo' set to False, 'nutritional_info'\
        \ won't be present in the object. Also, confirmed dishes that are not in the\
        \ 'logmeal' database won't contribute to the nutritional information. They\
        \ will still be returned in the 'foodNames' field, and will be represented\
        \ with a null value in the 'ids' field.\n\n&nbsp;\n\nIf Food Waste Detection\
        \ services are included in your LogMeal Subscription, an extra field named\
        \ 'food_waste' will be included for each of the intakes or images returned\
        \ by this endpoint. If there is currently no waste image assigned to a specific\
        \ intake, then the field 'food_waste' will take the value None/null. Otherwise,\
        \ the full information included for each intake will be also provided for\
        \ the corresponding food waste image. The 'food_waste' contains an additional\
        \ attribute named 'matches_mapping_pre_to_waste', which provides a mapping\
        \ between the preconsumption image 'food_item_position's to the waste image\
        \ original 'food_item_position's predictions provided inside 'segmentation_data'.\
        \ This allows to reference the predicted items positions in the image. If\
        \ some element is mapped to null means that the food item is not present in\
        \ the waste image, thus it was completely consumed.\nFurthermore, also if\
        \ Food Waste Detection services are included in your LogMeal Subscription,\
        \ an extra field named 'actual_intake0 will be included for each of the intakes.\
        \ This information will be complementary to the 'food_waste' previously described\
        \ and it will specify the actual food intake by subtracting the initially\
        \ reported image minus the food waste detected.\n&nbsp;\n\n<span style='font-weight:\
        \ bold'> Note: </span> for security purposes, the URLs provided to load the\
        \ images have an expiration time of 1h since their creation. If they get expired\
        \ you will have to request a new url. "
      parameters:
      - in: query
        name: date_from
        schema:
          type: string
        required: true
        description: Datetime the data will be filtered FROM (date_from <= imageDate).
          Following the format "%Y/%m/%d, %H:%M:%S".
      - in: query
        name: date_to
        schema:
          type: string
        required: true
        description: Datetime the data will be filtered TO (imageDate <= date_to).
          Following the format "%Y/%m/%d, %H:%M:%S"
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Optional parameter. Required for APIUserManagers/APICompanies.
          ID of the user to retrieve the information from.
      responses:
        200:
          description: Intakes list successfully retrieved!
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_timezone:
                    type: string
                    example: Europe/Madrid
                    description: Timezone of the user, using the TZ Database names.
                      All timestamps in this response correspond to the moment the
                      intake was created, dynamically calculated based on the user's
                      time zone at that moment. This ensures the timestamp is preserved
                      even if the user subsequently changes time zone.
                  intakes_list:
                    type: array
                    description: List of intakes of the user that have been found
                      inside the provided date range.
                    items:
                      type: object
                      properties:
                        intake_name:
                          type: string
                          description: Optional custom name for the intake/meal. Required
                            if logging a dish from scratch without an ID.
                          example: Cannelloni, spring rolls and salad
                        image_id:
                          type: integer
                          description: ID of the image related to this food intake.
                          example: 123
                        processed_image_size:
                          type: object
                          properties:
                            width:
                              type: integer
                              example: 500
                              description: Width of the processed image. Note that
                                it might not match the uploaded image width. Use this
                                information to interpret the segmentation polygon
                                and the bounding box extracted by the food recognition
                                algorithms.
                            height:
                              type: integer
                              example: 400
                              description: Height of the processed image. Note that
                                it might not match the uploaded image height. Use
                                this information to interpret the segmentation polygon
                                and the bounding box extracted by the food recognition
                                algorithms.
                        quantity_prediction_status:
                          type: string
                          description: 'Describes the status of the quantity estimation
                            procedure that might be running in background for this
                            image. Note: if status is null it means no automated quantity
                            estimation procedure has taken place.'
                          nullable: true
                          enum:
                          - running
                          - done
                          - error
                        foodName:
                          type: string
                          example: spaghetti bolognese
                          description: Name of the food/recipe. If there are multiple
                            foods for this image, a list of foodNames will be returned
                            instead.
                        foodGroup:
                          type: array
                          items:
                            type: integer
                          example:
                          - meat
                          - dairy_products
                          description: A list containing the names of the food groups
                        ids:
                          type: integer
                          example: 324
                          description: IDs of the dishes the information has been
                            obtained from. If there are multiple foods for this image,
                            a list of ids will be returned instead. For dishes coming
                            from manual inputs (not in our database) a null ID will
                            be provided. Note that dishes with null ids won't have
                            effect on the nutritional information returned.
                        image_url:
                          type: string
                          description: URL to access the image. This URL has an expiration
                            time of 1 day. This value will be null in case it corresponds
                            to a manualInput (see endpoint /intake/manualInput)
                          example: https://storage.logmeal.com/apiImages/123.jpg
                        occasion:
                          type: string
                          description: Occasion of the food intake, based on the image
                            timestamp. One of ['breakfast', 'lunch', 'dinner', 'snack']
                          example: breakfast
                        occasion_info:
                          description: Contains information about the occasion.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Occasion id. Null if default occasion
                                type: integer
                                example: 45
                              translation:
                                description: Translation to the language of the request
                                  if available. Not available with default occasions.
                                type: string
                                example: cena
                        timestamp:
                          type: string
                          description: Timestamp of the image. Following the format
                            '%Y/%m/%d, %H:%M:%S'
                          example: 2020/03/02, 21:19:15
                        is_kiosk_image:
                          type: boolean
                          description: "Flag indicating whether the image was acquired\
                            \ using a **LogMeal Kiosk** device.\n\nWhen this value\
                            \ is `true`, the image originates from a Kiosk and therefore:\n\
                            \  - The image may include an additional field named `annotation_data`,\
                            \ which contains **user-corrected bounding boxes** \n\
                            \    for the segmentation process. These should be used\
                            \ instead of the automatically generated ones in `segmentation_data`,\
                            \ \n    as they have higher accuracy.\n\nFor more information,\
                            \ refer to the Kiosk API documentation (api.logmeal.com/kiosk/docs).\"\
                            \n"
                          example: 'True'
                        hasNutritionalInfo:
                          type: boolean
                          description: Boolean that determines if this intake entry
                            has the 'nutritional_info' field available.
                          example: 'True'
                        serving_size:
                          type: number
                          format: float
                          example: 16.0
                          description: Detected weight for the product if detected
                            automatically or confirmed by the user. Depending on the
                            context, it can also correspond to the standard quantity
                            of food corresponding to one portion for the average person.
                        nutritional_info:
                          type: object
                          description: Object containing all the nutritional information
                            related to the food intake.
                          properties:
                            calories:
                              type: number
                              format: float
                              description: Total amount of calories obtained from
                                this food intake.
                              example: 340.26
                            totalNutrients:
                              type: object
                              description: Contains basic information of the nutrient
                                and it's amount found in the current food intake.
                                The key 'NutrientCodeSample' will be replaced by each
                                nutrient code (for each nutrient, a NutrientCodeSample
                                will be returned).
                              properties:
                                label:
                                  type: string
                                  description: Translated label of the nutritional
                                    indicator.
                                  example: Sugars
                                quantity:
                                  type: number
                                  format: float
                                  description: Amount of the nutrient.
                                  example: 20.3
                                unit:
                                  type: string
                                  description: Unit used to measure the quantity provided.
                                  example: g
                        nutritional_info_per_item:
                          description: List of nutritional info for each of the food
                            items on the image.
                          type: array
                          items:
                            type: object
                            description: Nutritional information related to one of
                              the food segments/regions detected or confirmed on the
                              image.
                            properties:
                              food_item_position:
                                description: Identifier for a food item in the segmentation_results
                                  list. This value can either be an integer (if providing
                                  from the original food segmentation result) or a
                                  string (if confirmed an extra region that was not
                                  originally detected).
                                type: integer
                                example: 1
                              hasNutriScore:
                                description: Either if the food item has nutri score
                                  or not (only present of Custom Plans).
                                type: boolean
                                example: true
                              hasNutritionalInfo:
                                description: Either if the food item has nutritional
                                  info or not.
                                type: integer
                                example: 1
                              id:
                                description: Identifier of the food item/dish detected
                                  on this region.
                                type: integer
                                example: 234
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
                              serving_size:
                                description: Food quantity (in grams) corresponding
                                  to this food item.
                                type: number
                                format: float
                                example: 56.705
                              nutritional_info:
                                type: object
                                description: Object containing all the nutritional
                                  information related to the food intake.
                                properties:
                                  calories:
                                    type: number
                                    format: float
                                    description: Total amount of calories obtained
                                      from this food intake.
                                    example: 340.26
                                  totalNutrients:
                                    type: object
                                    description: Contains basic information of the
                                      nutrient and it's amount found in the current
                                      food intake. The key 'NutrientCodeSample' will
                                      be replaced by each nutrient code (for each
                                      nutrient, a NutrientCodeSample will be returned).
                                    properties:
                                      label:
                                        type: string
                                        description: Translated label of the nutritional
                                          indicator.
                                        example: Sugars
                                      quantity:
                                        type: number
                                        format: float
                                        description: Amount of the nutrient.
                                        example: 20.3
                                      unit:
                                        type: string
                                        description: Unit used to measure the quantity
                                          provided.
                                        example: g
                                  dailyIntakeReference:
                                    type: object
                                    description: 'Contains information about the nutrient
                                      intake with relation to the daily reference
                                      value the user should intake. The key ''DailyReferenceNutrientCodeSample''
                                      will be replaced by each nutrient code we have
                                      daily reference values for. These are only approximations,
                                      they should be used as a simple reference to
                                      help the users understand how every single intake
                                      affects their total daily nutrients. '
                                    properties:
                                      label:
                                        type: string
                                        description: Translated label of the nutritional
                                          indicator.
                                        example: Sugars
                                      level:
                                        type: string
                                        description: Level that we assign to the nutrient
                                          with relation to the daily reference value
                                          the user should intake. It's value will
                                          be one of ['NONE', 'LOW', 'MEDIUM', 'HIGH'].
                                          You can use this levels to display which
                                          nutrients from the intake represent a high
                                          portion of the user's expected intake.
                                        example: HIGH
                                      percent:
                                        type: number
                                        format: float
                                        description: Percentage of the total amount
                                          of the nutrient the user should intake with
                                          relation to the daily reference value.
                                        example: 25.3
                        recipe:
                          type: array
                          description: Array containing the ingredients and their
                            quantity of the recipe.
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              measure:
                                type: object
                                description: Only available for Monitor plans and
                                  higher. Weight information for the current ingredient.
                                  The 'preferred' field will display the user's preferred
                                  measurement system, unless it has been manually
                                  set for this ingredient by calling /nutrition/confirm/ingredients.
                                properties:
                                  metric:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      short:
                                        type: string
                                        description: Short name of the weight measure.
                                      type:
                                        description: Type of weight measure displayed.
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  preferred:
                                    oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        short:
                                          type: string
                                          description: Short name of the weight measure.
                                        type:
                                          description: Type of weight measure displayed.
                                          type: string
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        type:
                                          type: string
                                          description: Type of weight measure displayed.
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                              name:
                                type: string
                              unit:
                                type: string
                              weight:
                                type: number
                            example:
                              id: 144
                              name: spaghetti
                              unit: g
                              weight: 85.0
                        recipe_per_item:
                          type: array
                          items:
                            type: object
                            properties:
                              food_item_position:
                                example: 1
                                oneOf:
                                - type: integer
                                - type: string
                              foodGroups:
                                description: List of food groups belonging to the
                                  identified food item.
                                type: array
                                items:
                                  type: object
                                  description: Nutritional information related to
                                    one of the food segments/regions detected or confirmed
                                    on the image.
                                  properties:
                                    id:
                                      description: Food Group identifier
                                      type: integer
                                      example: 1
                                    name:
                                      description: Name of the food group translated
                                        into the user language
                                      type: string
                                      example: vegetables
                              dish_id:
                                description: Id of the identified food item.
                                type: integer
                              measure:
                                type: object
                                description: Only available for Monitor plan and higher.
                                  Weight information for the current dish. The 'preferred'
                                  field will display the user's preferred measurement
                                  system, unless it has been manually set for this
                                  dish by calling /nutrition/confirm/quantity.
                                properties:
                                  metric:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: ID of the returned weight measure.
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      name:
                                        type: string
                                        description: Translated name of the weight
                                          measure.
                                      short:
                                        type: string
                                        description: Short name of the weight measure.
                                      type:
                                        description: Type of weight measure displayed.
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  portions:
                                    type: object
                                    description: Portion information for the current
                                      dish.
                                    properties:
                                      grams_conversion:
                                        type: number
                                        description: Amount of grams that correspond
                                          to one unit of this weight measure.
                                      quantity:
                                        type: number
                                        description: Amount of portions in this dish.
                                      type:
                                        type: string
                                        enum:
                                        - weight
                                        - cooking_measures
                                        - portions
                                  preferred:
                                    description: Weight information displayed in the
                                      user's preferred measurement system, unless
                                      it has been manually set for this dish by calling
                                      /nutrition/confirm/ingredients.
                                    oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        short:
                                          type: string
                                          description: Short name of the weight measure.
                                        type:
                                          description: Type of weight measure displayed.
                                          type: string
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          description: ID of the returned weight measure.
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        name:
                                          type: string
                                          description: Translated name of the weight
                                            measure.
                                        type:
                                          type: string
                                          description: Type of weight measure displayed.
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                                    - type: object
                                      description: Portion information for the current
                                        dish.
                                      properties:
                                        grams_conversion:
                                          type: number
                                          description: Amount of grams that correspond
                                            to one unit of this weight measure.
                                        quantity:
                                          type: number
                                          description: Amount of portions in this
                                            dish.
                                        type:
                                          type: string
                                          enum:
                                          - weight
                                          - cooking_measures
                                          - portions
                              levels:
                                description: Only available for Monitor plans and
                                  higher. Shows the current modulation levels for
                                  this segment.
                                type: object
                                properties:
                                  salt:
                                    type: string
                                    enum:
                                    - high
                                    - medium
                                    - low
                                    - none
                                  sugar:
                                    type: string
                                    enum:
                                    - high
                                    - medium
                                    - low
                                    - none
                                  oil:
                                    type: string
                                    enum:
                                    - high
                                    - medium
                                    - low
                                    - none
                              recipe:
                                type: array
                                description: Array containing the ingredients and
                                  their quantity of the recipe.
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    measure:
                                      type: object
                                      description: Only available for Monitor plans
                                        and higher. Weight information for the current
                                        ingredient. The 'preferred' field will display
                                        the user's preferred measurement system, unless
                                        it has been manually set for this ingredient
                                        by calling /nutrition/confirm/ingredients.
                                      properties:
                                        metric:
                                          type: object
                                          properties:
                                            id:
                                              type: integer
                                              description: ID of the returned weight
                                                measure.
                                            grams_conversion:
                                              type: number
                                              description: Amount of grams that correspond
                                                to one unit of this weight measure.
                                            name:
                                              type: string
                                              description: Translated name of the
                                                weight measure.
                                            short:
                                              type: string
                                              description: Short name of the weight
                                                measure.
                                            type:
                                              description: Type of weight measure
                                                displayed.
                                              type: string
                                              enum:
                                              - weight
                                              - cooking_measures
                                              - portions
                                        preferred:
                                          oneOf:
                                          - type: object
                                            properties:
                                              id:
                                                type: integer
                                                description: ID of the returned weight
                                                  measure.
                                              grams_conversion:
                                                type: number
                                                description: Amount of grams that
                                                  correspond to one unit of this weight
                                                  measure.
                                              name:
                                                type: string
                                                description: Translated name of the
                                                  weight measure.
                                              short:
                                                type: string
                                                description: Short name of the weight
                                                  measure.
                                              type:
                                                description: Type of weight measure
                                                  displayed.
                                                type: string
                                                enum:
                                                - weight
                                                - cooking_measures
                                                - portions
                                          - type: object
                                            properties:
                                              id:
                                                type: integer
                                                description: ID of the returned weight
                                                  measure.
                                              grams_conversion:
                                                type: number
                                                description: Amount of grams that
                                                  correspond to one unit of this weight
                                                  measure.
                                              name:
                                                type: string
                                                description: Translated name of the
                                                  weight measure.
                                              type:
                                                type: string
                                                description: Type of weight measure
                                                  displayed.
                                                enum:
                                                - weight
                                                - cooking_measures
                                                - portions
                                    name:
                                      type: string
                                    unit:
                                      type: string
                                    weight:
                                      type: number
                                  example:
                                    id: 144
                                    name: spaghetti
                                    unit: g
                                    weight: 85.0
                              serving_size:
                                example: 85.0
                                type: number
                          description: In the case of food segmentation, this field
                            shows an array of recipes for each food segment.
                        segmentation_data:
                          description: "List of segmentation information for each\
                            \ of the food segments or regions automatically detected\
                            \ in the image.\n\nEach element represents one detected\
                            \ food item and includes its position, bounding box and\
                            \ polygonal segmentation data.\n\n&nbsp;\n\n**Note:**\
                            \  \nFor images where `is_kiosk_image` is set to `true`,\
                            \ an additional field named `annotation_data` may also\
                            \ be present.  \nIn that case, the bounding boxes provided\
                            \ in `annotation_data` should be considered the **corrected\
                            \ and more accurate** \nversion of the segmentation data\
                            \ shown here, as they come from user annotation rather\
                            \ than automatic detection.\n"
                          type: array
                          items:
                            type: object
                            description: Information for one of the found segments/regions
                            properties:
                              food_item_position:
                                description: Integer that identifies each of the food
                                  items found on the segmentation process.
                                type: integer
                                example: 1
                              center:
                                description: Center for the detected food item (center
                                  of contained_bbox).
                                type: object
                                properties:
                                  x:
                                    type: integer
                                    example: 162
                                  y:
                                    type: integer
                                    example: 367
                              contained_bbox:
                                description: Coordinates of the bounding box that
                                  contains the detected food item.
                                type: object
                                properties:
                                  x:
                                    type: integer
                                    example: 40
                                  y:
                                    type: integer
                                    example: 231
                                  h:
                                    type: integer
                                    example: 273
                                  w:
                                    type: integer
                                    example: 245
                              polygon:
                                description: 'Specific polygon surrounding the detected
                                  food item. Format: [x1, y1, x2, y2, x3, y3, ...,
                                  xN, yN], by drawing lines from (x1, y1) to (x2,
                                  y2), ..., (xN-1, yN-1) to (xN, yN) and (xN, yN)
                                  to (x1, y1), the whole polygon can be drawn.'
                                type: array
                                items:
                                  type: integer
                                example:
                                - 92
                                - 231
                                - 91
                                - 232
                                - 85
                                - 232
                                - 85
                                - 233
                                - 95
                                - 231
                        image_nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the image.
                                The parameter is only returned if the APIUser has
                                access to the 'Recommend' plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                for more information on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted image. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                        dysphagia:
                          type: object
                          properties:
                            adhesiveness:
                              description: |
                                JSON where key value will be the food item position on the image and its value will be a number referring to the adhesiveness of the intake where 1 would be the lowest level and 5 the highest one.

                                "1": 4,

                                "2": 1,

                                "3": 4
                              type: object
                              properties:
                                food_item_position_1:
                                  example: 4
                                  type: integer
                                food_item_position_2:
                                  example: 1
                                  type: integer
                                food_item_position_3:
                                  example: 4
                                  type: integer
                            swallowing:
                              description: |
                                JSON where key value will be the food item position on the image and its value will be a number referring to the swallowing difficulty of the intake where 1 would be the easiest level and 5 the hardest one.

                                "1": 3,

                                "2": 3,

                                "3": 5
                              type: object
                              properties:
                                food_item_position_1:
                                  example: 3
                                  type: integer
                                food_item_position_2:
                                  example: 3
                                  type: integer
                                food_item_position_3:
                                  example: 5
                                  type: integer
                        annotation_data:
                          type: object
                          description: "Contains manually corrected bounding boxes\
                            \ (*bboxes*) for image segmentation.  \nThis field is\
                            \ **only present** when:\n  - `is_kiosk_image` is `true`,\
                            \ **and**\n  - the image has been annotated by a user.\n\
                            \nThe keys correspond to the `food_item_position` identifiers,\
                            \  \nand each value provides the coordinates (`x`, `y`,\
                            \ `w`, `h`) of the annotated bounding box.\n\nThese coordinates\
                            \ represent **user-corrected segmentations** and should\
                            \ be used instead of \nthe automatically generated data\
                            \ in the `segmentation_data` field, as they have a higher\
                            \ accuracy.\n"
                          additionalProperties:
                            type: object
                            properties:
                              x:
                                type: integer
                                description: X coordinate (top-left corner of the
                                  bounding box).
                                example: 200
                              y:
                                type: integer
                                description: Y coordinate (top-left corner of the
                                  bounding box).
                                example: 352
                              w:
                                type: integer
                                description: Width of the bounding box in pixels.
                                example: 181
                              h:
                                type: integer
                                description: Height of the bounding box in pixels.
                                example: 159
                  total_result:
                    type: object
                    properties:
                      ENERC_KCAL:
                        type: number
                        format: float
                        example: 2085.89
                        description: Total intake of calories during the given period
                          of time. The Units used are KCal.
                      CHOCDF:
                        type: number
                        format: float
                        example: 308.74
                        description: Total intake of carbohydrates during the given
                          period of time. The Units used are Grams.
                      FAT:
                        type: number
                        format: float
                        example: 57.17
                        description: Total intake of fat during the given period of
                          time. The Units used are Grams.
                      PROCNT:
                        type: number
                        format: float
                        example: 77.18
                        description: Total intake of protein during the given period
                          of time. The Units used are Grams.
              examples:
                Intakes List Example:
                  value:
                    intakes_list:
                    - favorite_image_id_link: null
                      foodGroup:
                      - meat
                      - dairy products
                      - noodles/pasta
                      - vegetables/legumes
                      - fried food
                      foodName:
                      - canelones de carne
                      - rollitos de primavera
                      - ensalada con ketchup
                      hasNutritionalInfo: true
                      ids:
                      - 947
                      - 7
                      - null
                      image_id: 1365065
                      intake_name: Canelones, rollitos y ensalada
                      processed_image_size:
                        height: 400
                        width: 500
                      image_nutri_score:
                        nutri_score_category: A
                        nutri_score_standardized: 81
                      image_url: https://staging.storage1.logmeal.es:6020/apiImages/1365065.jpg?storageToken=.eJyrVkqtKMgsSizJzM-LT0ksSVWyUjIyMDLSNTDVNbAMMTSzMjQGIj1TMzNDMwMlHaWSygKQmqLUxBQgLzM3Pb4gsSQDKKKfWJDpmZuYnlqsb2hsZmpgZqqXVZAOVOMY4Bmfk58MtgKoDsTMUaoFAHUvJBs.T3uWTETTWUzQdx8vVKpGdd8lZdo
                      is_kiosk_image: false
                      nutritional_info:
                        calories: 485.87
                        totalNutrients:
                          ALC:
                            label: Alcohol
                            quantity: 0.0
                            unit: g
                          CA:
                            label: Calcio
                            quantity: 106.07000000000001
                            unit: mg
                          CAFFN:
                            label: Cafeína
                            quantity: 0.0
                            unit: mg
                          CHOCDF:
                            label: Carbohidratos
                            quantity: 27.740000000000002
                            unit: g
                          CHOLE:
                            label: Colesterol
                            quantity: 134.55
                            unit: mg
                          ENERC_KCAL:
                            label: Energía
                            quantity: 485.87
                            unit: kcal
                          F18D3CN3:
                            label: Ácido alfa-linolénico (ALA)
                            quantity: 0.0
                            unit: g
                          F20D5:
                            label: Ácido eicosapentaenoico (EPA)
                            quantity: 0.020999999999999998
                            unit: g
                          F22D6:
                            label: Ácido docosahexaenoico (DHA)
                            quantity: 0.0021
                            unit: g
                          FAMS:
                            label: Grasas monosaturadas
                            quantity: 10.45
                            unit: g
                          FAPU:
                            label: Poliinsaturada
                            quantity: 3.69
                            unit: g
                          FASAT:
                            label: Saturadas
                            quantity: 8.120000000000001
                            unit: g
                          FAT:
                            label: Grasas
                            quantity: 24.86
                            unit: g
                          FATRN:
                            label: Grasas trans
                            quantity: 0.07
                            unit: g
                          FE:
                            label: Hierro
                            quantity: 3.5999999999999996
                            unit: mg
                          FIBTG:
                            label: Fibra
                            quantity: 2.54
                            unit: g
                          FOLAC:
                            label: Ácido fólico
                            quantity: 0.0
                            unit: µg
                          FOLDFE:
                            label: Folato equivalente (total)
                            quantity: 93.97
                            unit: µg
                          FOLFD:
                            label: Folato (comida)
                            quantity: 93.97
                            unit: µg
                          K:
                            label: Potasio
                            quantity: 714.03
                            unit: mg
                          MG:
                            label: Magnesio
                            quantity: 76.93
                            unit: mg
                          NA:
                            label: Sodio
                            quantity: 498.96
                            unit: mg
                          NIA:
                            label: Niacina (B3)
                            quantity: 10.07
                            unit: mg
                          P:
                            label: Fósforo
                            quantity: 357.68
                            unit: mg
                          PROCNT:
                            label: Proteína
                            quantity: 36.73
                            unit: g
                          RIBF:
                            label: Riboflavina (B2)
                            quantity: 0.41000000000000003
                            unit: mg
                          SUGAR:
                            label: Azúcares
                            quantity: 3.15
                            unit: g
                          SUGAR.added:
                            label: Azucares añadidos
                            quantity: 0.54
                            unit: g
                          THIA:
                            label: Tiamina (B1)
                            quantity: 0.32
                            unit: mg
                          TOCPHA:
                            label: Vitamina E
                            quantity: 2.34
                            unit: mg
                          VITA_RAE:
                            label: Vitamina A
                            quantity: 281.34000000000003
                            unit: µg
                          VITB12:
                            label: Vitamina B12
                            quantity: 1.74
                            unit: µg
                          VITB6A:
                            label: Vitamina B6
                            quantity: 0.73
                            unit: mg
                          VITC:
                            label: Vitamina C
                            quantity: 19.74
                            unit: mg
                          VITD:
                            label: Vitamina D
                            quantity: 15.68
                            unit: µg
                          VITK1:
                            label: Vitamina K
                            quantity: 206.15
                            unit: µg
                          ZN:
                            label: Zinc
                            quantity: 4.62
                            unit: mg
                      nutritional_info_per_item:
                      - food_item_position: 3
                        hasNutriScore: true
                        hasNutritionalInfo: true
                        id: 947
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        nutritional_info:
                          calories: 276.46
                          totalNutrients:
                            ALC:
                              label: Alcohol
                              quantity: 0.0
                              unit: g
                            CA:
                              label: Calcio
                              quantity: 106.07000000000001
                              unit: mg
                            CAFFN:
                              label: Cafeína
                              quantity: 0.0
                              unit: mg
                            CHOCDF:
                              label: Carbohidratos
                              quantity: 27.740000000000002
                              unit: g
                            CHOLE:
                              label: Colesterol
                              quantity: 134.55
                              unit: mg
                            ENERC_KCAL:
                              label: Energía
                              quantity: 485.87
                              unit: kcal
                            F18D3CN3:
                              label: Ácido alfa-linolénico (ALA)
                              quantity: 0.0
                              unit: g
                            F20D5:
                              label: Ácido eicosapentaenoico (EPA)
                              quantity: 0.020999999999999998
                              unit: g
                            F22D6:
                              label: Ácido docosahexaenoico (DHA)
                              quantity: 0.0021
                              unit: g
                            FAMS:
                              label: Grasas monosaturadas
                              quantity: 10.45
                              unit: g
                            FAPU:
                              label: Poliinsaturada
                              quantity: 3.69
                              unit: g
                            FASAT:
                              label: Saturadas
                              quantity: 8.120000000000001
                              unit: g
                            FAT:
                              label: Grasas
                              quantity: 24.86
                              unit: g
                            FATRN:
                              label: Grasas trans
                              quantity: 0.07
                              unit: g
                            FE:
                              label: Hierro
                              quantity: 3.5999999999999996
                              unit: mg
                            FIBTG:
                              label: Fibra
                              quantity: 2.54
                              unit: g
                            FOLAC:
                              label: Ácido fólico
                              quantity: 0.0
                              unit: µg
                            FOLDFE:
                              label: Folato equivalente (total)
                              quantity: 93.97
                              unit: µg
                            FOLFD:
                              label: Folato (comida)
                              quantity: 93.97
                              unit: µg
                            K:
                              label: Potasio
                              quantity: 714.03
                              unit: mg
                            MG:
                              label: Magnesio
                              quantity: 76.93
                              unit: mg
                            NA:
                              label: Sodio
                              quantity: 498.96
                              unit: mg
                            NIA:
                              label: Niacina (B3)
                              quantity: 10.07
                              unit: mg
                            P:
                              label: Fósforo
                              quantity: 357.68
                              unit: mg
                            PROCNT:
                              label: Proteína
                              quantity: 36.73
                              unit: g
                            RIBF:
                              label: Riboflavina (B2)
                              quantity: 0.41000000000000003
                              unit: mg
                            SUGAR:
                              label: Azúcares
                              quantity: 3.15
                              unit: g
                            SUGAR.added:
                              label: Azucares añadidos
                              quantity: 0.54
                              unit: g
                            THIA:
                              label: Tiamina (B1)
                              quantity: 0.32
                              unit: mg
                            TOCPHA:
                              label: Vitamina E
                              quantity: 2.34
                              unit: mg
                            VITA_RAE:
                              label: Vitamina A
                              quantity: 281.34000000000003
                              unit: µg
                            VITB12:
                              label: Vitamina B12
                              quantity: 1.74
                              unit: µg
                            VITB6A:
                              label: Vitamina B6
                              quantity: 0.73
                              unit: mg
                            VITC:
                              label: Vitamina C
                              quantity: 19.74
                              unit: mg
                            VITD:
                              label: Vitamina D
                              quantity: 15.68
                              unit: µg
                            VITK1:
                              label: Vitamina K
                              quantity: 206.15
                              unit: µg
                            ZN:
                              label: Zinc
                              quantity: 4.62
                              unit: mg
                        serving_size: 56.70500000000001
                      - food_item_position: ext2
                        hasNutriScore: true
                        hasNutritionalInfo: true
                        id: 7
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        nutritional_info:
                          calories: 209.4
                          totalNutrients:
                            ALC:
                              label: Alcohol
                              quantity: 0.0
                              unit: g
                            CA:
                              label: Calcio
                              quantity: 87.7
                              unit: mg
                            CAFFN:
                              label: Cafeína
                              quantity: 0.0
                              unit: mg
                            CHOCDF:
                              label: Carbohidratos
                              quantity: 27.71
                              unit: g
                            CHOLE:
                              label: Colesterol
                              quantity: 24.55
                              unit: mg
                            ENERC_KCAL:
                              label: Energía
                              quantity: 209.4
                              unit: kcal
                            F18D3CN3:
                              label: Ácido alfa-linolénico (ALA)
                              quantity: 0.0
                              unit: g
                            F20D5:
                              label: Ácido eicosapentaenoico (EPA)
                              quantity: 0.020999999999999998
                              unit: g
                            F22D6:
                              label: Ácido docosahexaenoico (DHA)
                              quantity: 0.0021
                              unit: g
                            FAMS:
                              label: Grasas monosaturadas
                              quantity: 3.57
                              unit: g
                            FAPU:
                              label: Poliinsaturada
                              quantity: 1.72
                              unit: g
                            FASAT:
                              label: Saturadas
                              quantity: 2.04
                              unit: g
                            FAT:
                              label: Grasas
                              quantity: 8.14
                              unit: g
                            FATRN:
                              label: Grasas trans
                              quantity: 0.03
                              unit: g
                            FE:
                              label: Hierro
                              quantity: 1.91
                              unit: mg
                            FIBTG:
                              label: Fibra
                              quantity: 2.54
                              unit: g
                            FOLAC:
                              label: Ácido fólico
                              quantity: 0.0
                              unit: µg
                            FOLDFE:
                              label: Folato equivalente (total)
                              quantity: 80.36
                              unit: µg
                            FOLFD:
                              label: Folato (comida)
                              quantity: 80.36
                              unit: µg
                            K:
                              label: Potasio
                              quantity: 394.25
                              unit: mg
                            MG:
                              label: Magnesio
                              quantity: 50.17
                              unit: mg
                            NA:
                              label: Sodio
                              quantity: 418.45
                              unit: mg
                            NIA:
                              label: Niacina (B3)
                              quantity: 1.81
                              unit: mg
                            P:
                              label: Fósforo
                              quantity: 129.52
                              unit: mg
                            PROCNT:
                              label: Proteína
                              quantity: 7.35
                              unit: g
                            RIBF:
                              label: Riboflavina (B2)
                              quantity: 0.15
                              unit: mg
                            SUGAR:
                              label: Azúcares
                              quantity: 3.15
                              unit: g
                            SUGAR.added:
                              label: Azucares añadidos
                              quantity: 0.54
                              unit: g
                            THIA:
                              label: Tiamina (B1)
                              quantity: 0.12
                              unit: mg
                            TOCPHA:
                              label: Vitamina E
                              quantity: 2.15
                              unit: mg
                            VITA_RAE:
                              label: Vitamina A
                              quantity: 237.55
                              unit: µg
                            VITB12:
                              label: Vitamina B12
                              quantity: 0.2
                              unit: µg
                            VITB6A:
                              label: Vitamina B6
                              quantity: 0.24
                              unit: mg
                            VITC:
                              label: Vitamina C
                              quantity: 19.63
                              unit: mg
                            VITD:
                              label: Vitamina D
                              quantity: 0.1
                              unit: µg
                            VITK1:
                              label: Vitamina K
                              quantity: 204.74
                              unit: µg
                            ZN:
                              label: Zinc
                              quantity: 0.91
                              unit: mg
                        serving_size: 0
                      - food_item_position: ext1
                        hasNutriScore: false
                        hasNutritionalInfo: false
                        id: null
                        nutritional_info: {}
                        serving_size: null
                      occasion: breakfast
                      occasion_info:
                        id: null
                        translation: breakfast
                      segmentation_data:
                      - center:
                          x: 162
                          y: 367
                        contained_bbox:
                          h: 273
                          w: 245
                          x: 40
                          y: 231
                        food_item_position: 1
                        polygon:
                        - 92
                        - 231
                        - 91
                        - 232
                        - 95
                        - 231
                      - center:
                          x: 385
                          y: 338
                        contained_bbox:
                          h: 297
                          w: 251
                          x: 260
                          y: 190
                        food_item_position: 2
                        polygon:
                        - 430
                        - 190
                        - 428
                        - 191
                        - 425
                        - 191
                        - 460
                        - 191
                        - 458
                        - 191
                        - 457
                        - 190
                      - center:
                          x: 273
                          y: 175
                        contained_bbox:
                          h: 258
                          w: 325
                          x: 111
                          y: 46
                        food_item_position: 3
                        polygon:
                        - 295
                        - 46
                        - 293
                        - 47
                        - 328
                        - 47
                        - 327
                        - 46
                      serving_size: 101.70500000000001
                      timestamp: 2022/05/09, 09:32:39
                    total_result:
                      CHOCDF: 27.740000000000002
                      ENERC_KCAL: 485.87
                      FAT: 24.86
                      PROCNT: 36.73
                    user_timezone: CET
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Date format is not valid:
                  value:
                    message: The date must be formatted as '%Y/%m/%d, %H:%M:%S'.
                    code: 100
                Date range is not valid:
                  value:
                    message: '''date_to'' must be greater (in time) than ''date_from'''
                    code: 100
      security:
      - Bearer: []
  /v2/history/getDailySummary:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Obtain a daily intake summary. ⏱
      description: " <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n&nbsp;\n\nThis endpoint\
        \ provides a daily summary of a user given a date. It also returns a dictionary\
        \ named 'translations' which includes the translations into the user-preferred\
        \ language for all food groups and subgroups included in the summary. For\
        \ each day it informs of:\n&nbsp;\n- Daily calorie distribution: How many\
        \ calories were eaten throughout the day by occasions. Grams and % of the\
        \ total.\n&nbsp;\n- Daily energy: For calories, carbs, fat and protein the\
        \ amount reported and recommended amount.\n&nbsp;\n- Daily portions: Recommended\
        \ daily portions for dairy products, grains and tubers, vegetables, fruit,\
        \ whole grain and water. For each one it returns a variable whether the goal\
        \ was achieved, the number of eaten portions and the recommended portion range.\
        \ It also returns a field called contribution_by_category, where we can see\
        \ how the total eaten portions and quantity of the food group divide in each\
        \ category belonging to the food group. The total eaten portions are calculated\
        \ by adding all the eaten portions of the different categories and then rounding\
        \ up if >= 0.85 (more than 85% of a portion is considered as one) and down\
        \ if < 0.85. The image ID's that contain the food group in their prediction\
        \ are included in the field image_ids.\n&nbsp;\n- Portion information: Gives\
        \ extra information about the quantities used to calculate the portions "
      parameters:
      - in: query
        name: date
        schema:
          type: string
        required: true
        description: Following the format "%Y/%m/%d".
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Optional parameter. Required for APIUserManagers/APICompanies.
          ID of the user to retrieve the information from.
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  daily_calorie_distribution:
                    type: object
                    properties:
                      lunch:
                        type: object
                        properties:
                          calories:
                            type: integer
                            example: 702
                          percentage:
                            type: integer
                            example: 50
                      breakfast:
                        type: object
                        properties:
                          calories:
                            type: integer
                            example: 702
                          percentage:
                            type: integer
                            example: 50
                  daily_energy:
                    type: object
                    properties:
                      calories:
                        type: object
                        properties:
                          day_intake:
                            type: integer
                            example: 1404
                          recommended_value:
                            type: integer
                            example: 2058
                      carbs:
                        type: object
                        properties:
                          day_intake:
                            type: integer
                            example: 208
                          recommended_value:
                            type: integer
                            example: 232
                      fat:
                        type: object
                        properties:
                          day_intake:
                            type: integer
                            example: 43
                          recommended_value:
                            type: integer
                            example: 80
                      protein:
                        type: object
                        properties:
                          day_intake:
                            type: integer
                            example: 45
                          recommended_value:
                            type: integer
                            example: 103
                  daily_portions:
                    type: object
                    properties:
                      Dairy Products:
                        type: object
                        properties:
                          contribution_by_category:
                            type: array
                            items:
                              type: object
                              properties:
                                eaten_portions:
                                  type: integer
                                eaten_quantity:
                                  type: integer
                          image_ids:
                            type: array
                            items:
                              type: integer
                            example:
                            - 1533786
                            - 1533787
                            - 1533782
                          daily_portions_achieved:
                            type: boolean
                            example: false
                          eaten_portions:
                            type: integer
                            example: 0
                          eaten_quantity:
                            type: number
                            format: float
                            example: 0
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                                example: 3
                              min:
                                type: integer
                                example: 1
                      Fruit:
                        type: object
                        properties:
                          contribution_by_category:
                            type: array
                            items:
                              type: object
                              properties:
                                eaten_portions:
                                  type: integer
                                eaten_quantity:
                                  type: integer
                          image_ids:
                            type: array
                            items:
                              type: integer
                            example:
                            - 1533786
                            - 1533787
                            - 1533782
                          daily_portions_achieved:
                            type: boolean
                            example: false
                          eaten_portions:
                            type: integer
                            example: 0
                          eaten_quantity:
                            type: number
                            format: float
                            example: 0
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                                example: null
                              min:
                                type: integer
                                example: 3
                      Grains and Tubers:
                        type: object
                        properties:
                          contribution_by_category:
                            type: array
                            items:
                              type: object
                              properties:
                                eaten_portions:
                                  type: integer
                                eaten_quantity:
                                  type: integer
                          image_ids:
                            type: array
                            items:
                              type: integer
                            example:
                            - 1533786
                            - 1533787
                            - 1533782
                          daily_portions_achieved:
                            type: boolean
                            example: true
                          eaten_portions:
                            type: integer
                            example: 0
                          eaten_quantity:
                            type: number
                            format: float
                            example: 0
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                                example: 6
                              min:
                                type: integer
                                example: null
                      Vegetables:
                        type: object
                        properties:
                          contribution_by_category:
                            type: array
                            items:
                              type: object
                              properties:
                                eaten_portions:
                                  type: integer
                                eaten_quantity:
                                  type: integer
                          image_ids:
                            type: array
                            items:
                              type: integer
                            example:
                            - 1533786
                            - 1533787
                            - 1533782
                          daily_portions_achieved:
                            type: boolean
                            example: false
                          eaten_portions:
                            type: integer
                            example: 0
                          eaten_quantity:
                            type: number
                            format: float
                            example: 0
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                                example: null
                              min:
                                type: integer
                                example: 2
                      Whole Grain:
                        type: object
                        properties:
                          contribution_by_category:
                            type: array
                            items:
                              type: object
                              properties:
                                eaten_portions:
                                  type: integer
                                eaten_quantity:
                                  type: integer
                          image_ids:
                            type: array
                            items:
                              type: integer
                            example:
                            - 1533786
                            - 1533787
                            - 1533782
                          daily_portions_achieved:
                            type: boolean
                            example: false
                          eaten_portions:
                            type: integer
                            example: 0
                          eaten_quantity:
                            type: number
                            format: float
                            example: 0
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                                example: null
                              min:
                                type: integer
                                example: 2
                      Water:
                        type: object
                        properties:
                          contribution_by_category:
                            type: array
                            items:
                              type: object
                              properties:
                                eaten_portions:
                                  type: integer
                                eaten_quantity:
                                  type: integer
                          image_ids:
                            type: array
                            items:
                              type: integer
                            example:
                            - 1533786
                            - 1533787
                            - 1533782
                          daily_portions_achieved:
                            type: boolean
                            example: false
                          eaten_portions:
                            type: integer
                            example: 0
                          eaten_quantity:
                            type: number
                            format: float
                            example: 0
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                                example: null
                              min:
                                type: integer
                                example: 2
                  portion_information:
                    type: object
                    properties:
                      legume:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      processed meat:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      meat:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      nut:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      seed:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      fish:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      egg:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      seafood:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      red meat:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                  language:
                    type: string
                    description: Language of the summary
                    example: spa
                  translations:
                    type: object
                    description: Translations for summary food groups and subgroups
                      in the requested language
                    properties:
                      summary_food_groups:
                        type: object
                        additionalProperties:
                          type: string
                        description: Translations for high-level summary food groups
                        example:
                          Dairy Products: productos lácteos
                          Egg: huevo
                          Fish: pescado
                          Fruit: fruta
                          Grains and Tubers: cereales y tubérculos
                          Legumes: legumbres
                          Meat: carne
                          Nuts: frutos secos
                          Red Meat: carne roja
                          Vegetables: verduras
                          Water: agua
                          Whole Grain: cereal integral
                      summary_food_subgroups:
                        type: object
                        additionalProperties:
                          type: string
                        description: Translations for food subgroups (category scoring)
                          used in the summary
                        example:
                          artificial sweetener: edulcorante artificial
                          bread: pan
                          egg: huevo
                          fish: pescado
                          fruit: fruta
                          hard cheese: queso curado
                          legume: legumbres
                          meat: carne
                          milk: leche
                          nut: fruto seco
                          pasta: pasta
                          processed meat: carne procesada
                          red meat: carne roja
                          refined carb: carbohidrato refinado
                          rice: arroz
                          seafood: marisco
                          seed: semilla
                          soft cheese: queso blando
                          tuber: tubérculo
                          vegetable: verdura
                          water: agua
                          whole grain: cereal integral
                          yogurt: yogur
              examples:
                Intakes List Example:
                  value:
                    language: eng
                    daily_calorie_distribution:
                      tentempié:
                        calories: 943
                        percentage: 100
                    daily_energy:
                      calories:
                        day_intake: 943
                        recommended_value: 3295
                      carbs:
                        day_intake: 56
                        recommended_value: 371
                      fat:
                        day_intake: 50
                        recommended_value: 97
                      protein:
                        day_intake: 64
                        recommended_value: 165
                    daily_portions:
                      Dairy Products:
                        contribution_by_category:
                          hard cheese:
                            eaten_portions: 0
                            eaten_quantity: 0
                          milk:
                            eaten_portions: 0
                            eaten_quantity: 0
                          soft cheese:
                            eaten_portions: 0
                            eaten_quantity: 0
                          yogurt:
                            eaten_portions: 0
                            eaten_quantity: 0
                        daily_portions_achieved: false
                        eaten_portions: 0
                        eaten_quantity: 0
                        image_ids: []
                        recommended_portions:
                          max: 3
                          min: 1
                      Fruit:
                        contribution_by_category:
                          fruit:
                            eaten_portions: 0
                            eaten_quantity: 0
                        daily_portions_achieved: false
                        eaten_portions: 0
                        eaten_quantity: 0
                        image_ids: []
                        recommended_portions:
                          max: null
                          min: 3
                      Grains and Tubers:
                        contribution_by_category:
                          bread:
                            eaten_portions: 0
                            eaten_quantity: 0
                          pasta:
                            eaten_portions: 1.421
                            eaten_quantity: 85.26
                          rice:
                            eaten_portions: 0
                            eaten_quantity: 0
                          tuber:
                            eaten_portions: 0
                            eaten_quantity: 0
                        daily_portions_achieved: true
                        eaten_portions: 1
                        eaten_quantity: 85.26
                        image_ids:
                        - 1533789
                        recommended_portions:
                          max: 6
                          min: null
                      Vegetables:
                        contribution_by_category:
                          vegetable:
                            eaten_portions: 0.27105
                            eaten_quantity: 54.21
                        daily_portions_achieved: false
                        eaten_portions: 0
                        eaten_quantity: 54.21
                        image_ids:
                        - 1533789
                        recommended_portions:
                          max: null
                          min: 2
                    portion_information:
                      bread:
                        food_group: Grains and Tubers
                        portion_quantity: 40
                        unit: g
                      fruit:
                        food_group: Fruit
                        portion_quantity: 133.3
                        unit: g
                      hard cheese:
                        food_group: Dairy Products
                        portion_quantity: 50
                        unit: g
                      milk:
                        food_group: Dairy Products
                        portion_quantity: 200
                        unit: ml
                      pasta:
                        food_group: Grains and Tubers
                        portion_quantity: 60
                        unit: g
                      rice:
                        food_group: Grains and Tubers
                        portion_quantity: 60
                        unit: g
                      soft cheese:
                        food_group: Dairy Products
                        portion_quantity: 100
                        unit: g
                      tuber:
                        food_group: Grains and Tubers
                        portion_quantity: 175
                        unit: g
                      vegetable:
                        food_group: Vegetables
                        portion_quantity: 200
                        unit: g
                      yogurt:
                        food_group: Dairy Products
                        portion_quantity: 250
                        unit: g
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Date format is not valid:
                  value:
                    message: The date must be formatted as '%Y/%m/%d
                    code: 100
      security:
      - Bearer: []
  /v2/history/getWeeklySummary:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Obtain a weekly intake summary. ⏱
      description: |2
         <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint provides a weekly summary of a user given a date. Any date can be passed. The information returned will be of the week that day belongs to. It also returns a dictionary named 'translations' which includes the translations into the user-preferred language for all food groups and subgroups included in the summary. For every week it informs of:
        &nbsp;
        - Day by day summary: Summary of a specific day (very similar to the response of /v2/history/getDailySummary).
        &nbsp;
        - Week: Returns the monday and sunday date of the week the passed date belongs to.
        &nbsp;
        - Week averages: For every macronutrient and the energy (carbs, fat, protein and calories) the daily average reported along with the recommended value and the achieved percentage.
        &nbsp;
        - Weekly occasion distribution: For every reported occasion it returns the total calories reported along with the percentage they represent of the total week calories.
        &nbsp;
        - Weekly portions: Recommended weekly portions for legumes, fish, eggs, nuts, meat and red meat. For each one it returns a variable with a color whether the goal was achieved, the number of eaten portions, quantity and the recommended portion range. Transparent color means there is a minium defined but it has not been achieved. Green means the eaten portions matches the recommendation. Red the rest of cases. It also returns a field called contribution_by_category, where we can see how the total eaten portions and quantity of the food group divide in each category belonging to the food group. The total eaten portions are calculated by adding all the eaten portions of the different categories and then rounding up if >= 0.85 (more than 85% of a portion is considered as one) and down if < 0.85. The image ID's that contain the food group in their prediction are included in the field image_ids.
        &nbsp;
        - Portion information: Gives extra information about the quantities used to calculate the portions

        &nbsp; &nbsp;

        NOTE: if the user does not consume a minimum amount of calories per day, the intakes information for that date will not be included in the weekly averages computation. The minimum calories value depends on the 'sex' of the user: female = 1000kcal, male = 1200kcal, N/A = 1100kcal.
      parameters:
      - in: query
        name: date
        schema:
          type: string
        required: true
        description: Following the format "%Y/%m/%d".
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Optional parameter. Required for APIUserManagers/APICompanies.
          ID of the user to retrieve the information from.
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  day_by_day_summary:
                    type: object
                    properties:
                      monday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                      tuesday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                      wednesday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                      thursday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                      friday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                      saturday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                      sunday:
                        type: object
                        properties:
                          daily_calorie_distribution:
                            type: object
                            properties:
                              lunch:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                              breakfast:
                                type: object
                                properties:
                                  calories:
                                    type: integer
                                    example: 702
                                  percentage:
                                    type: integer
                                    example: 50
                          daily_energy:
                            type: object
                            properties:
                              calories:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 1404
                              carbs:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 208
                              fat:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 43
                              protein:
                                type: object
                                properties:
                                  day_intake:
                                    type: integer
                                    example: 45
                          daily_portions:
                            type: object
                            properties:
                              Dairy Products:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 324.6
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 3
                                      min:
                                        type: integer
                                        example: 1
                              Fruit:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 3
                              Grains and Tubers:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: true
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: 6
                                      min:
                                        type: integer
                                        example: null
                              Vegetables:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Whole Grain:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                              Water:
                                type: object
                                properties:
                                  contribution_by_category:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        eaten_portions:
                                          type: integer
                                        eaten_quantity:
                                          type: integer
                                  image_ids:
                                    type: array
                                    items:
                                      type: integer
                                    example:
                                    - 1533786
                                    - 1533787
                                    - 1533782
                                  daily_portions_achieved:
                                    type: boolean
                                    example: false
                                  eaten_portions:
                                    type: integer
                                    example: 0
                                  eaten_quantity:
                                    type: number
                                    format: float
                                    example: 0
                                  recommended_portions:
                                    type: object
                                    properties:
                                      max:
                                        type: integer
                                        example: null
                                      min:
                                        type: integer
                                        example: 2
                          date:
                            type: string
                            example: 2023/04/21
                          portion_information:
                            type: object
                            properties:
                              legume:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              processed meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              nut:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seed:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              fish:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              egg:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              seafood:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                              red meat:
                                type: object
                                properties:
                                  food_group:
                                    type: string
                                  unit:
                                    type: string
                                  portion_quantity:
                                    type: integer
                                required:
                                - food_group
                                - unit
                                - portion_quantity
                          language:
                            type: string
                            description: Language of the summary
                            example: spa
                  week:
                    type: string
                    description: The date range of the week
                    example: 2024/02/26 - 2024/03/03
                  portion_information:
                    type: object
                    properties:
                      legume:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      processed meat:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      meat:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      nut:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      seed:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      fish:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      egg:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      seafood:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                      red meat:
                        type: object
                        properties:
                          food_group:
                            type: string
                          unit:
                            type: string
                          portion_quantity:
                            type: integer
                        required:
                        - food_group
                        - unit
                        - portion_quantity
                  week_averages:
                    type: object
                    properties:
                      calories:
                        type: object
                        properties:
                          achieved_percentage:
                            type: integer
                            description: The percentage of the recommended calories
                              achieved
                            example: 94
                          average:
                            type: integer
                            description: The average calories consumed in the week
                            example: 1935
                          recommended:
                            type: integer
                            description: The recommended calories to consume in the
                              week
                            example: 2058
                      carbs:
                        type: object
                        properties:
                          achieved_percentage:
                            type: integer
                            description: The percentage of the recommended carbs achieved
                            example: 72
                          average:
                            type: integer
                            description: The average carbs consumed in the week
                            example: 169
                          recommended:
                            type: integer
                            description: The recommended carbs to consume in the week
                            example: 232
                      fat:
                        type: object
                        properties:
                          achieved_percentage:
                            type: integer
                            description: The percentage of the recommended fat achieved
                            example: 145
                          average:
                            type: integer
                            description: The average fat consumed in the week
                            example: 116
                          recommended:
                            type: integer
                            description: The recommended fat to consume in the week
                            example: 80
                      protein:
                        type: object
                        properties:
                          achieved_percentage:
                            type: integer
                            description: The percentage of the recommended protein
                              achieved
                            example: 65
                          average:
                            type: integer
                            description: The average protein consumed in the week
                            example: 67
                          recommended:
                            type: integer
                            description: The recommended protein to consume in the
                              week
                            example: 103
                  week_occasion_distribution:
                    type: object
                    properties:
                      lunch:
                        type: object
                        properties:
                          calories:
                            type: integer
                          percentage:
                            type: integer
                      breakfast:
                        type: object
                        properties:
                          calories:
                            type: integer
                          percentage:
                            type: integer
                  weekly_recommendation_summary:
                    type: object
                    properties:
                      Egg:
                        type: object
                        properties:
                          eaten_portions:
                            type: integer
                          eaten_quantity:
                            type: number
                            format: float
                          portion_consumption_color:
                            type: string
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                              min:
                                type: integer
                        example:
                          eaten_portions: 0
                          eaten_quantity: 32
                          portion_consumption_color: green
                          recommended_portions:
                            max: 7
                            min: null
                      Fish:
                        type: object
                        properties:
                          eaten_portions:
                            type: integer
                          eaten_quantity:
                            type: number
                            format: float
                          portion_consumption_color:
                            type: string
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                              min:
                                type: integer
                        example:
                          eaten_portions: 0
                          eaten_quantity: 12
                          portion_consumption_color: transparent
                          recommended_portions:
                            max: 4
                            min: 2
                      Legumes:
                        type: object
                        properties:
                          eaten_portions:
                            type: integer
                          eaten_quantity:
                            type: number
                            format: float
                          portion_consumption_color:
                            type: string
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                              min:
                                type: integer
                        example:
                          eaten_portions: 0
                          eaten_quantity: 0
                          portion_consumption_color: transparent
                          recommended_portions:
                            max: null
                            min: 3
                      Meat:
                        type: object
                        properties:
                          eaten_portions:
                            type: integer
                          eaten_quantity:
                            type: number
                            format: float
                          portion_consumption_color:
                            type: string
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                              min:
                                type: integer
                        example:
                          eaten_portions: 0
                          eaten_quantity: 11
                          portion_consumption_color: green
                          recommended_portions:
                            max: 4
                            min: null
                      Nuts:
                        type: object
                        properties:
                          eaten_portions:
                            type: integer
                          eaten_quantity:
                            type: number
                            format: float
                          portion_consumption_color:
                            type: string
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                              min:
                                type: integer
                        example:
                          eaten_portions: 23
                          eaten_quantity: 678
                          portion_consumption_color: green
                          recommended_portions:
                            max: null
                            min: 3
                      Red Meat:
                        type: object
                        properties:
                          eaten_portions:
                            type: integer
                          eaten_quantity:
                            type: number
                            format: float
                          portion_consumption_color:
                            type: string
                          recommended_portions:
                            type: object
                            properties:
                              max:
                                type: integer
                              min:
                                type: integer
                        example:
                          eaten_portions: 0
                          eaten_quantity: 12
                          portion_consumption_color: green
                          recommended_portions:
                            max: 2
                            min: null
                  language:
                    type: string
                    description: Language of the summary
                    example: spa
                  translations:
                    type: object
                    description: Translations for summary food groups and subgroups
                      in the requested language
                    properties:
                      summary_food_groups:
                        type: object
                        additionalProperties:
                          type: string
                        description: Translations for high-level summary food groups
                        example:
                          Dairy Products: productos lácteos
                          Egg: huevo
                          Fish: pescado
                          Fruit: fruta
                          Grains and Tubers: cereales y tubérculos
                          Legumes: legumbres
                          Meat: carne
                          Nuts: frutos secos
                          Red Meat: carne roja
                          Vegetables: verduras
                          Water: agua
                          Whole Grain: cereal integral
                      summary_food_subgroups:
                        type: object
                        additionalProperties:
                          type: string
                        description: Translations for food subgroups (category scoring)
                          used in the summary
                        example:
                          artificial sweetener: edulcorante artificial
                          bread: pan
                          egg: huevo
                          fish: pescado
                          fruit: fruta
                          hard cheese: queso curado
                          legume: legumbres
                          meat: carne
                          milk: leche
                          nut: fruto seco
                          pasta: pasta
                          processed meat: carne procesada
                          red meat: carne roja
                          refined carb: carbohidrato refinado
                          rice: arroz
                          seafood: marisco
                          seed: semilla
                          soft cheese: queso blando
                          tuber: tubérculo
                          vegetable: verdura
                          water: agua
                          whole grain: cereal integral
                          yogurt: yogur
              examples:
                Intakes List Example:
                  value:
                    day_by_day_summary:
                      friday:
                        language: eng
                        daily_calorie_distribution: {}
                        daily_energy:
                          calories:
                            day_intake: 0
                          carbs:
                            day_intake: 0
                          fat:
                            day_intake: 0
                          protein:
                            day_intake: 0
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 0
                                eaten_quantity: 0
                              pasta:
                                eaten_portions: 0
                                eaten_quantity: 0
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/28
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                      monday:
                        language: eng
                        daily_calorie_distribution:
                          cena:
                            calories: 440
                            percentage: 10
                          comida:
                            calories: 1992
                            percentage: 45
                          desayuno:
                            calories: 2039
                            percentage: 46
                        daily_energy:
                          calories:
                            day_intake: 4471
                          carbs:
                            day_intake: 320
                          fat:
                            day_intake: 229
                          protein:
                            day_intake: 301
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 5.05504812319538
                                eaten_quantity: 252.752406159769
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0.7501203079884504
                                eaten_quantity: 75.01203079884503
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 5
                            eaten_quantity: 327.76443695861406
                            image_ids:
                            - 1533786
                            - 1533782
                            - 1533787
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 1.3381723809330712
                                eaten_quantity: 178.37837837837841
                            daily_portions_achieved: false
                            eaten_portions: 1
                            eaten_quantity: 178.37837837837841
                            image_ids:
                            - 1533788
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 5
                                eaten_quantity: 200
                              pasta:
                                eaten_portions: 2.0833333333333335
                                eaten_quantity: 125
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 1.1428571428571428
                                eaten_quantity: 200
                            daily_portions_achieved: false
                            eaten_portions: 8
                            eaten_quantity: 525
                            image_ids:
                            - 1533786
                            - 1533782
                            - 1533788
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 1.3873509785049727
                                eaten_quantity: 277.4701957009945
                            daily_portions_achieved: false
                            eaten_portions: 1
                            eaten_quantity: 277.4701957009945
                            image_ids:
                            - 1533786
                            - 1533787
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/24
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                      saturday:
                        language: eng
                        daily_calorie_distribution: {}
                        daily_energy:
                          calories:
                            day_intake: 0
                          carbs:
                            day_intake: 0
                          fat:
                            day_intake: 0
                          protein:
                            day_intake: 0
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 0
                                eaten_quantity: 0
                              pasta:
                                eaten_portions: 0
                                eaten_quantity: 0
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/29
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                      sunday:
                        language: eng
                        daily_calorie_distribution: {}
                        daily_energy:
                          calories:
                            day_intake: 0
                          carbs:
                            day_intake: 0
                          fat:
                            day_intake: 0
                          protein:
                            day_intake: 0
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 0
                                eaten_quantity: 0
                              pasta:
                                eaten_portions: 0
                                eaten_quantity: 0
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/30
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                      thursday:
                        language: eng
                        daily_calorie_distribution: {}
                        daily_energy:
                          calories:
                            day_intake: 0
                          carbs:
                            day_intake: 0
                          fat:
                            day_intake: 0
                          protein:
                            day_intake: 0
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 0
                                eaten_quantity: 0
                              pasta:
                                eaten_portions: 0
                                eaten_quantity: 0
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/27
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                      tuesday:
                        language: eng
                        daily_calorie_distribution:
                          comida:
                            calories: 206
                            percentage: 100
                        daily_energy:
                          calories:
                            day_intake: 206
                          carbs:
                            day_intake: 2
                          fat:
                            day_intake: 17
                          protein:
                            day_intake: 12
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 1.02
                                eaten_quantity: 51
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 1
                            eaten_quantity: 51
                            image_ids:
                            - 1533791
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 0
                                eaten_quantity: 0
                              pasta:
                                eaten_portions: 0
                                eaten_quantity: 0
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/25
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                      wednesday:
                        language: eng
                        daily_calorie_distribution:
                          tentempié:
                            calories: 943
                            percentage: 100
                        daily_energy:
                          calories:
                            day_intake: 943
                          carbs:
                            day_intake: 56
                          fat:
                            day_intake: 50
                          protein:
                            day_intake: 64
                        daily_portions:
                          Dairy Products:
                            contribution_by_category:
                              hard cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              milk:
                                eaten_portions: 0
                                eaten_quantity: 0
                              soft cheese:
                                eaten_portions: 0
                                eaten_quantity: 0
                              yogurt:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: 3
                              min: 1
                          Fruit:
                            contribution_by_category:
                              fruit:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 0
                            image_ids: []
                            recommended_portions:
                              max: null
                              min: 3
                          Grains and Tubers:
                            contribution_by_category:
                              bread:
                                eaten_portions: 0
                                eaten_quantity: 0
                              pasta:
                                eaten_portions: 1.421
                                eaten_quantity: 85.26
                              rice:
                                eaten_portions: 0
                                eaten_quantity: 0
                              tuber:
                                eaten_portions: 0
                                eaten_quantity: 0
                            daily_portions_achieved: true
                            eaten_portions: 1
                            eaten_quantity: 85.26
                            image_ids:
                            - 1533789
                            recommended_portions:
                              max: 6
                              min: null
                          Vegetables:
                            contribution_by_category:
                              vegetable:
                                eaten_portions: 0.27105
                                eaten_quantity: 54.21
                            daily_portions_achieved: false
                            eaten_portions: 0
                            eaten_quantity: 54.21
                            image_ids:
                            - 1533789
                            recommended_portions:
                              max: null
                              min: 2
                        date: 2023/07/26
                        portion_information:
                          bread:
                            food_group: Grains and Tubers
                            portion_quantity: 40
                            unit: g
                          fruit:
                            food_group: Fruit
                            portion_quantity: 133.3
                            unit: g
                          hard cheese:
                            food_group: Dairy Products
                            portion_quantity: 50
                            unit: g
                          milk:
                            food_group: Dairy Products
                            portion_quantity: 200
                            unit: ml
                          pasta:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          rice:
                            food_group: Grains and Tubers
                            portion_quantity: 60
                            unit: g
                          soft cheese:
                            food_group: Dairy Products
                            portion_quantity: 100
                            unit: g
                          tuber:
                            food_group: Grains and Tubers
                            portion_quantity: 175
                            unit: g
                          vegetable:
                            food_group: Vegetables
                            portion_quantity: 200
                            unit: g
                          yogurt:
                            food_group: Dairy Products
                            portion_quantity: 250
                            unit: g
                    portion_information:
                      egg:
                        food_group: Egg
                        portion_quantity: 55
                        unit: g
                      fish:
                        food_group: Fish
                        portion_quantity: 150
                        unit: g
                      legume:
                        food_group: Legumes
                        portion_quantity: 70
                        unit: g
                      meat:
                        food_group: Meat
                        portion_quantity: 100
                        unit: g
                      nut:
                        food_group: Nuts
                        portion_quantity: 20
                        unit: g
                      processed meat:
                        food_group: Red Meat
                        portion_quantity: 100
                        unit: g
                      red meat:
                        food_group: Red Meat
                        portion_quantity: 100
                        unit: g
                      seafood:
                        food_group: Fish
                        portion_quantity: 150
                        unit: g
                      seed:
                        food_group: Nuts
                        portion_quantity: 20
                        unit: g
                    week: 2023/07/24 - 2023/07/30
                    week_averages:
                      calories:
                        achieved_percentage: 56
                        average: 1873
                        recommended: 3295
                      carbs:
                        achieved_percentage: 33
                        average: 126
                        recommended: 371
                      fat:
                        achieved_percentage: 101
                        average: 98
                        recommended: 97
                      protein:
                        achieved_percentage: 75
                        average: 125
                        recommended: 165
                    week_occasion_distribution:
                      cena:
                        calories: 440
                        percentage: 7
                      comida:
                        calories: 2198
                        percentage: 39
                      desayuno:
                        calories: 2039
                        percentage: 36
                      tentempié:
                        calories: 943
                        percentage: 16
                    weekly_recommendation_summary:
                      Egg:
                        contribution_by_category:
                          egg:
                            eaten_portions: 0.2758624259923586
                            eaten_quantity: 15.172433429579723
                        eaten_portions: 0
                        eaten_quantity: 15.172433429579723
                        image_ids:
                        - 1533787
                        portion_consumption_color: green
                        recommended_portions:
                          max: 7
                          min: null
                      Fish:
                        contribution_by_category:
                          fish:
                            eaten_portions: 2.815810810810811
                            eaten_quantity: 422.3716216216216
                          seafood:
                            eaten_portions: 0
                            eaten_quantity: 0
                        eaten_portions: 2
                        eaten_quantity: 422.3716216216216
                        image_ids:
                        - 1533788
                        - 1533789
                        portion_consumption_color: green
                        recommended_portions:
                          max: 4
                          min: 2
                      Legumes:
                        contribution_by_category:
                          legume:
                            eaten_portions: 1.2857142857142858
                            eaten_quantity: 90
                        eaten_portions: 1
                        eaten_quantity: 90
                        image_ids:
                        - 1533789
                        portion_consumption_color: transparent
                        recommended_portions:
                          max: null
                          min: 3
                      Meat:
                        contribution_by_category:
                          meat:
                            eaten_portions: 1.295
                            eaten_quantity: 129.5
                        eaten_portions: 1
                        eaten_quantity: 129.5
                        image_ids:
                        - 1533789
                        portion_consumption_color: green
                        recommended_portions:
                          max: 4
                          min: null
                      Nuts:
                        contribution_by_category:
                          nut:
                            eaten_portions: 5
                            eaten_quantity: 100
                          seed:
                            eaten_portions: 0
                            eaten_quantity: 0
                        eaten_portions: 5
                        eaten_quantity: 100
                        image_ids:
                        - 1533788
                        portion_consumption_color: green
                        recommended_portions:
                          max: null
                          min: 3
                      Red Meat:
                        contribution_by_category:
                          processed meat:
                            eaten_portions: 0.22943679820340068
                            eaten_quantity: 22.94367982034007
                          red meat:
                            eaten_portions: 2.8074493102341993
                            eaten_quantity: 280.74493102341995
                        eaten_portions: 3
                        eaten_quantity: 303.68861084376
                        image_ids:
                        - 1533787
                        - 1533788
                        portion_consumption_color: red
                        recommended_portions:
                          max: 2
                          min: null
                    language: eng
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Date format is not valid:
                  value:
                    message: The date must be formatted as '%Y/%m/%d
                    code: 100
      security:
      - Bearer: []
  /v2/history/hasIntake:
    get:
      tags:
      - Intake History
      summary: ⚫🔴🔵 Returns the number of intakes a given user has on a date or range
        of dates
      description: " This endpoint provides the number of intakes reported for a user\
        \ on a given date.\n\n&nbsp;\n\nProvide either the parameter date if only\
        \ one date is wanted or provide both date_from and date_to if a range is wanted. "
      parameters:
      - in: query
        name: date
        schema:
          type: string
        description: Following the format "%Y/%m/%d".
      - in: query
        name: date_from
        schema:
          type: string
        description: Following the format "%Y/%m/%d".
      - in: query
        name: date_to
        schema:
          type: string
        description: Following the format "%Y/%m/%d".
      - in: query
        name: user_id
        schema:
          type: integer
        description: Optional parameter. Required for APIUserManagers/APICompanies.
          ID of the user to retrieve the information from.
      responses:
        200:
          description: Successful response with the number of intakes
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: integer
                description: The number of intakes for the user on the specified date(s).
                example:
                  2023/08/21: 4
                  2023/08/22: 2
                  2023/08/23: 0
                  2023/08/24: 2
                  2023/08/25: 0
                  2023/08/26: 0
                  2023/08/27: 0
                  2023/08/28: 6
                  2023/08/29: 3
                  2023/08/30: 4
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Date format is not valid:
                  value:
                    message: The date must be formatted as '%Y/%m/%d, %H:%M:%S'.
                    code: 100
      security:
      - Bearer: []
  /v2/intake/createOccasionGroup:
    post:
      tags:
      - Custom Occasions
      summary: ⚫🔵 Create a new occasion group
      description: " Create an occasion group. Update the company occasions by blocks\
        \ of occasions (occasion group). Assign a custom name and time range to each\
        \ of the new occasions.\n\n&nbsp;\n\nIn every block, there must be one default\
        \ occasion with no time range defined.\n\n&nbsp;\n\nmaps_to_occasion will\
        \ contain a direct mapping between the default system occasions and the one\
        \ that is being created. It is necessary in order to give recommendations\
        \ using the company occasions.\n\n&nbsp;\n\nEverytime this endpoint is called\
        \ with a valid occasion group, it gets set as the active group and if there\
        \ already was an active one it gets set to inactive. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                occasions:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: morningmeal
                      init_time:
                        type: string
                        format: time
                        example: 07:00:00
                      end_time:
                        type: string
                        format: time
                        example: 08:00:00
                      default:
                        type: boolean
                        example: false
                      maps_to_occasion:
                        type: string
                        example: breakfast
                    required:
                    - name
                    - default
                    - maps_to_occasion
                  example:
                  - name: morningmeal
                    init_time: 07:00:00
                    end_time: 08:00:00
                    default: false
                    maps_to_occasion: breakfast
                  - name: middaymeal
                    init_time: 09:00:00
                    end_time: '15:00:00'
                    default: false
                    maps_to_occasion: lunch
                  - name: lastmeal
                    init_time: '20:00:00'
                    end_time: '22:00:00'
                    default: false
                    maps_to_occasion: dinner
                  - name: Picar
                    default: true
                    maps_to_occasion: snack
        description: Parameters to create an occasion group.
        required: true
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  new_occasions_and_ids:
                    type: object
                    additionalProperties:
                      type: integer
                      example: 14
                    example: morningmeal
              example:
                new_occasions_and_ids:
                  morningmeal: 13
                  middaymeal: 14
                  lastmeal: 15
                  snack: 16
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: Occasions should be a list of dictionaries.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Each occasion should be a dictionary.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Name field is required and should be a string.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Default field is required and should be a boolean.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'maps_to_occasion field is required and should be a
                        string containing one of the default occasions: [''breakfast'',''lunch'',''dinner'',''snack'']'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'Invalid occasion attribute: {}'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: There are repeated occasion names.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Name field is required.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Init time and End time fields are required when default
                        is False.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: End time should be greater than Init time.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Init and end time should not be provided when default
                        is True.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: At least one default occasion is required.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Only one default occasion is allowed.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: Occasions can not overlap.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: The time must be formatted as '%H:%M:%S'
                    code:
                      type: integer
                      example: 100
        401:
          description: Unauthorized, invalid token.
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/intake/getOccasionGroups:
    get:
      tags:
      - Custom Occasions
      summary: ⚫🔵🔴 Get existing occasion groups
      description: |
        Get all the occasion groups for the company in the request. It will return the active and inactive occasion groups and the system's default occasions, containing information about each occasion group and each occasion.

        A time range can be specified as query parameters (init_time and end_time), and it will only return the occasion groups that fall within the specified time range. This applies only to the inactive occasions. Active occasions will always be included in the response. If no time range is specified, all occasion groups will be returned.

        If no occasion groups have been defined, it will only return the system's default occasions.
      parameters:
      - in: query
        name: init_time
        schema:
          type: string
          format: date
          example: '2023-03-20'
        description: Start date of the time range to filter occasion groups. Following
          the format "%Y-%m-%d"
      - in: query
        name: end_time
        schema:
          type: string
          format: date
          example: '2023-03-24'
        description: End date of the time range to filter occasion groups. Following
          the format "%Y-%m-%d"
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      active:
                        type: array
                        items:
                          type: object
                          properties:
                            end_time:
                              type: string
                              example: '2023-05-10'
                              nullable: true
                            id:
                              type: integer
                            init_time:
                              type: string
                              example: '2023-05-11'
                            occasions:
                              type: array
                              items:
                                type: object
                                properties:
                                  default:
                                    type: boolean
                                  end_time:
                                    type: string
                                    example: '18:00:00'
                                    nullable: true
                                  id:
                                    type: integer
                                    nullable: true
                                  init_time:
                                    type: string
                                    example: '15:00:00'
                                    nullable: true
                                  maps_to_default:
                                    type: string
                                    example: lunch
                                  name:
                                    type: string
                                    example: Second Meal
                                  translations:
                                    type: object
                                    properties:
                                      translations:
                                        type: object
                                        properties:
                                          cat:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: catalan
                                              name:
                                                type: string
                                                example: dinar
                                          eng:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: english
                                              name:
                                                type: string
                                                example: lunch
                                          esp:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: spanish
                                              name:
                                                type: string
                                                example: comida
                                          fre:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: french
                                              name:
                                                type: string
                                                example: déjeuner
                                          ger:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: german
                                              name:
                                                type: string
                                                example: Mittagessen
                                          gre:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: greek
                                              name:
                                                type: string
                                                example: μεσημεριανό γεύμα
                                          ita:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: italian
                                              name:
                                                type: string
                                                example: pranzo
                                          nld:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: dutch
                                              name:
                                                type: string
                                                example: lunch
                                          spa:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: spanish
                                              name:
                                                type: string
                                                example: comida
                                          tur:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: turkish
                                              name:
                                                type: string
                                                example: öğle yemeği
                      default_occasions:
                        type: array
                        items:
                          type: object
                          properties:
                            default:
                              type: boolean
                            end_time:
                              type: string
                              example: '18:00:00'
                              nullable: true
                            id:
                              type: integer
                              nullable: true
                            init_time:
                              type: string
                              example: '15:00:00'
                              nullable: true
                            maps_to_default:
                              type: string
                              example: lunch
                            name:
                              type: string
                              example: Second Meal
                            translations:
                              type: object
                              properties:
                                translations:
                                  type: object
                                  properties:
                                    cat:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: catalan
                                        name:
                                          type: string
                                          example: dinar
                                    eng:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: english
                                        name:
                                          type: string
                                          example: lunch
                                    esp:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: spanish
                                        name:
                                          type: string
                                          example: comida
                                    fre:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: french
                                        name:
                                          type: string
                                          example: déjeuner
                                    ger:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: german
                                        name:
                                          type: string
                                          example: Mittagessen
                                    gre:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: greek
                                        name:
                                          type: string
                                          example: μεσημεριανό γεύμα
                                    ita:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: italian
                                        name:
                                          type: string
                                          example: pranzo
                                    nld:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: dutch
                                        name:
                                          type: string
                                          example: lunch
                                    spa:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: spanish
                                        name:
                                          type: string
                                          example: comida
                                    tur:
                                      type: object
                                      properties:
                                        language:
                                          type: string
                                          example: turkish
                                        name:
                                          type: string
                                          example: öğle yemeği
                      inactive:
                        type: array
                        items:
                          type: object
                          properties:
                            end_time:
                              type: string
                              example: '2023-05-10'
                              nullable: true
                            id:
                              type: integer
                            init_time:
                              type: string
                              example: '2023-05-11'
                            occasions:
                              type: array
                              items:
                                type: object
                                properties:
                                  default:
                                    type: boolean
                                  end_time:
                                    type: string
                                    example: '18:00:00'
                                    nullable: true
                                  id:
                                    type: integer
                                    nullable: true
                                  init_time:
                                    type: string
                                    example: '15:00:00'
                                    nullable: true
                                  maps_to_default:
                                    type: string
                                    example: lunch
                                  name:
                                    type: string
                                    example: Second Meal
                                  translations:
                                    type: object
                                    properties:
                                      translations:
                                        type: object
                                        properties:
                                          cat:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: catalan
                                              name:
                                                type: string
                                                example: dinar
                                          eng:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: english
                                              name:
                                                type: string
                                                example: lunch
                                          esp:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: spanish
                                              name:
                                                type: string
                                                example: comida
                                          fre:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: french
                                              name:
                                                type: string
                                                example: déjeuner
                                          ger:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: german
                                              name:
                                                type: string
                                                example: Mittagessen
                                          gre:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: greek
                                              name:
                                                type: string
                                                example: μεσημεριανό γεύμα
                                          ita:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: italian
                                              name:
                                                type: string
                                                example: pranzo
                                          nld:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: dutch
                                              name:
                                                type: string
                                                example: lunch
                                          spa:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: spanish
                                              name:
                                                type: string
                                                example: comida
                                          tur:
                                            type: object
                                            properties:
                                              language:
                                                type: string
                                                example: turkish
                                              name:
                                                type: string
                                                example: öğle yemeği
              examples:
                GetOccasionGroupsResponse:
                  value:
                    result:
                      active:
                        '2':
                          end_time: null
                          id: 2
                          init_time: '2023-05-10'
                          occasions:
                          - default: false
                            end_time: 08:00:00
                            id: 5
                            init_time: 06:00:00
                            maps_to_default: breakfast
                            name: first meal
                            translations:
                            - translations:
                                cat:
                                  language: catalan
                                  name: first meal
                                eng:
                                  language: english
                                  name: first meal
                                esp:
                                  language: spanish
                                  name: almuerzo
                                fre:
                                  language: french
                                  name: first meal
                                ger:
                                  language: german
                                  name: first meal
                                gre:
                                  language: greek
                                  name: first meal
                                ita:
                                  language: italian
                                  name: first meal
                                nld:
                                  language: dutch
                                  name: first meal
                                spa:
                                  language: spanish
                                  name: almuerzo
                                tur:
                                  language: turkish
                                  name: first meal
                          - default: false
                            end_time: '15:00:00'
                            id: 6
                            init_time: 09:00:00
                            maps_to_default: lunch
                            name: second meal
                            translations:
                              cat:
                                language: catalan
                                name: second meal
                              eng:
                                language: english
                                name: second meal
                              esp:
                                language: spanish
                                name: second meal
                              fre:
                                language: french
                                name: second meal
                              ger:
                                language: german
                                name: second meal
                              gre:
                                language: greek
                                name: second meal
                              ita:
                                language: italian
                                name: second meal
                              nld:
                                language: dutch
                                name: second meal
                              spa:
                                language: spanish
                                name: second meal
                              tur:
                                language: turkish
                                name: second meal
                          - default: false
                            end_time: '22:00:00'
                            id: 7
                            init_time: '20:00:00'
                            maps_to_default: dinner
                            name: third meal
                            translations:
                              cat:
                                language: catalan
                                name: third meal
                              eng:
                                language: english
                                name: third meal
                              esp:
                                language: spanish
                                name: third meal
                              fre:
                                language: french
                                name: third meal
                              ger:
                                language: german
                                name: third meal
                              gre:
                                language: greek
                                name: third meal
                              ita:
                                language: italian
                                name: third meal
                              nld:
                                language: dutch
                                name: third meal
                              spa:
                                language: spanish
                                name: third meal
                              tur:
                                language: turkish
                                name: third meal
                          - default: true
                            end_time: null
                            id: 8
                            init_time: null
                            maps_to_default: snack
                            name: snack
                            translations:
                              cat:
                                language: catalan
                                name: aperitiu
                              eng:
                                language: english
                                name: snack
                              esp:
                                language: spanish
                                name: snack
                              fre:
                                language: french
                                name: snack
                              ger:
                                language: german
                                name: snack
                              gre:
                                language: greek
                                name: snack
                              ita:
                                language: italian
                                name: snack
                              nld:
                                language: dutch
                                name: snack
                              spa:
                                language: spanish
                                name: snack
                              tur:
                                language: turkish
                                name: snack
                      default_occasions:
                      - default: false
                        end_time: '15:00:00'
                        id: null
                        init_time: '12:00:00'
                        maps_to_default: lunch
                        name: lunch
                        translations:
                          cat:
                            language: catalan
                            name: dinar
                          eng:
                            language: english
                            name: lunch
                          esp:
                            language: spanish
                            name: comida
                          fre:
                            language: french
                            name: déjeuner
                          ger:
                            language: german
                            name: Mittagessen
                          gre:
                            language: greek
                            name: μεσημεριανό γεύμα
                          ita:
                            language: italian
                            name: pranzo
                          nld:
                            language: dutch
                            name: lunch
                          spa:
                            language: spanish
                            name: comida
                          tur:
                            language: turkish
                            name: öğle yemeği
                      - default: false
                        end_time: '10:00:00'
                        id: null
                        init_time: '6:00:00'
                        maps_to_default: breakfast
                        name: breakfast
                        translations:
                          cat:
                            language: catalan
                            name: esmorzar
                          eng:
                            language: english
                            name: breakfast
                          esp:
                            language: spanish
                            name: desayuno
                          fre:
                            language: french
                            name: petit-déjeuner
                          ger:
                            language: german
                            name: Frühstück
                          gre:
                            language: greek
                            name: πρωινό
                          ita:
                            language: italian
                            name: colazione
                          nld:
                            language: dutch
                            name: ontbijt
                          spa:
                            language: spanish
                            name: desayuno
                          tur:
                            language: turkish
                            name: kahvaltı
                      - default: true
                        end_time: null
                        id: null
                        init_time: null
                        maps_to_default: snack
                        name: snack
                        translations:
                          cat:
                            language: catalan
                            name: aperitiu
                          eng:
                            language: english
                            name: snack
                          esp:
                            language: spanish
                            name: tentempié
                          fre:
                            language: french
                            name: collation
                          ger:
                            language: german
                            name: Snack
                          gre:
                            language: greek
                            name: ενδιάμεσο γεύμα
                          ita:
                            language: italian
                            name: spuntino
                          nld:
                            language: dutch
                            name: snack
                          spa:
                            language: spanish
                            name: tentempié
                          tur:
                            language: turkish
                            name: atıştırmalık
                      - default: false
                        end_time: '23:00:00'
                        id: null
                        init_time: '18:00:00'
                        maps_to_default: dinner
                        name: dinner
                        translations:
                          cat:
                            language: catalan
                            name: sopar
                          eng:
                            language: english
                            name: dinner
                          esp:
                            language: spanish
                            name: cena
                          fre:
                            language: french
                            name: dîner
                          ger:
                            language: german
                            name: Abendessen
                          gre:
                            language: greek
                            name: δείπνο
                          ita:
                            language: italian
                            name: cena
                          nld:
                            language: dutch
                            name: avondeten
                          spa:
                            language: spanish
                            name: cena
                          tur:
                            language: turkish
                            name: akşam yemeği
                      inactive:
                        '1':
                          end_time: '2023-05-10'
                          id: 1
                          init_time: '2023-05-10'
                          occasions:
                          - default: false
                            end_time: 08:00:00
                            id: 1
                            init_time: 06:00:00
                            maps_to_default: breakfast
                            name: esmorzar
                            translations:
                              cat:
                                language: catalan
                                name: esmorzar
                              eng:
                                language: english
                                name: esmorzar
                              esp:
                                language: spanish
                                name: esmorzar
                              fre:
                                language: french
                                name: esmorzar
                              ger:
                                language: german
                                name: esmorzar
                              gre:
                                language: greek
                                name: esmorzar
                              ita:
                                language: italian
                                name: esmorzar
                              nld:
                                language: dutch
                                name: esmorzar
                              spa:
                                language: spanish
                                name: esmorzar
                              tur:
                                language: turkish
                                name: esmorzar
                          - default: false
                            end_time: '15:00:00'
                            id: 2
                            init_time: 09:00:00
                            maps_to_default: lunch
                            name: dinar
                            translations:
                              cat:
                                language: catalan
                                name: dinar
                              eng:
                                language: english
                                name: dinar
                              esp:
                                language: spanish
                                name: dinar
                              fre:
                                language: french
                                name: dinar
                              ger:
                                language: german
                                name: dinar
                              gre:
                                language: greek
                                name: dinar
                              ita:
                                language: italian
                                name: dinar
                              nld:
                                language: dutch
                                name: dinar
                              spa:
                                language: spanish
                                name: dinar
                              tur:
                                language: turkish
                                name: dinar
                          - default: false
                            end_time: '22:00:00'
                            id: 3
                            init_time: '20:00:00'
                            maps_to_default: dinner
                            name: sopar
                            translations:
                              cat:
                                language: catalan
                                name: sopar
                              eng:
                                language: english
                                name: sopar
                              esp:
                                language: spanish
                                name: sopar
                              fre:
                                language: french
                                name: sopar
                              ger:
                                language: german
                                name: sopar
                              gre:
                                language: greek
                                name: sopar
                              ita:
                                language: italian
                                name: sopar
                              nld:
                                language: dutch
                                name: sopar
                              spa:
                                language: spanish
                                name: sopar
                              tur:
                                language: turkish
                                name: sopar
                          - default: true
                            end_time: null
                            id: 4
                            init_time: null
                            maps_to_default: snack
                            name: picar
                            translations:
                              cat:
                                language: catalan
                                name: aperitiu
                              eng:
                                language: english
                                name: picar
                              esp:
                                language: spanish
                                name: tentempié
                              fre:
                                language: french
                                name: picar
                              ger:
                                language: german
                                name: picar
                              gre:
                                language: greek
                                name: picar
                              ita:
                                language: italian
                                name: spuntino
                              nld:
                                language: dutch
                                name: picar
                              spa:
                                language: spanish
                                name: tentempié
                              tur:
                                language: turkish
                                name: picar
        400:
          description: Bad request
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: End time should be greater than Init time.
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: init_time/end_time is required if end_time/init_time
                        is given
                    code:
                      type: integer
                      example: 100
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/intake/createOccasionTranslation:
    post:
      tags:
      - Custom Occasions
      summary: ⚫🔵 Create a new occasion translation
      description: ' Create an occasion translation for a defined occasion in a given
        language. Translations will belong to a occasion. If a new occasion group
        is created the translations will be stored but not active anymore. '
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                occasion_id:
                  type: integer
                  description: Occasion id. Use /getOccasionGroups to obtain them
                  example: 6
                translation:
                  type: string
                  description: Translation to the specified language
                  example: Desayuno
                language:
                  type: string
                  description: Language of the translation
                  example: spa
        description: Parameters to create an occasion group.
        required: true
      responses:
        200:
          description: Occasion translation created/updated successfully!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'Parameter language is not valid. Valid values are
                        {''ger'': ''german'', ''gre'': ''greek'', ''nld'': ''dutch'',
                        ''fre'': ''french'', ''eng'': ''english'', ''ita'': ''italian'',
                        ''spa'': ''spanish'', ''tur'': ''turkish'', ''cat'': ''catalan'',
                        ''heb'': ''hebrew''}'''
                    code:
                      type: integer
                      example: 708
                - type: object
                  properties:
                    message:
                      type: string
                      example: No occasions defined for this company
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The company has occasions defined but the provided
                        occasion is invalid. Occasions defined: [1, 2, 3]'
                    code:
                      type: integer
                      example: 100
        401:
          description: Unauthorized, invalid token.
        404:
          description: Not found
      security:
      - Bearer: []
  /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\nfor each one.\n\nThe returned information\
        \ helps to understand which data is needed to assign a nutritional plan to\
        \ a client,\nwhich is done via the endpoint: `POST /nutritional_plan`.\n\n\
        Each plan includes the names and data types that should be included in the\
        \ creation request, \nserving as a guide to correctly build that request.\n"
      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: []
  /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.\n\n&nbsp;\n\nThe\
        \ 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
                          nullable: true
                          example: 438
                        calorie_surplus:
                          type: integer
                          nullable: true
                          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
                          nullable: true
                          example: 3
                        weight_init:
                          type: number
                          format: float
                          example: 70.0
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
      security:
      - Bearer: []
  /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.\n\
        \n\nIf a nutritional plan already exists for today's date, it will be **deleted\
        \ and replaced**. If there's an active\nplan, it will be **deactivated**.\n\
        \n---  \nRequirements\n\n\n- The user profile must contain the following data:\n\
        \  - **Weight**\n  - **Height**\n  - **Sex**\n  - **Lifestyle**\n  \n- If\
        \ missing, the request will fail with a detailed error and instructions to\
        \ update the profile using:\n  - `/v2/profile/modifyUserProfileInfo` (\U0001F534\
        \ APIUSER)\n  - `/v2/users/modifyUserProfileInfo` (\U0001F535 APIUSERMANAGER)\n\
        \n    \n---\n**Field Requirements by Plan Type**\n---\n\n- Type: **BALANCED_DIET**\
        \  \n  - Required Fields: **type, user_id**  \nDescription: No further parameters\
        \ are required.\n\n---\n\n- Type: **GAIN_MUSCLE**  \n  - Required Fields:\
        \ **type, user_id, growth_intensity, date**  \nDescription: Requires both\
        \ the muscle growth intensity and the goal date to be specified.\n\n---\n\n\
        - Type: **WEIGHT_LOSS**  \n  - Required Fields: **type, user_id, weight_goal,\
        \ date**  \nDescription: Requires a target weight and future date.\n\n---\n\
        \nRefer to the __`v2/nutritional_plan/info`__ endpoint to retrieve required\
        \ fields dynamically based on plan type.\n"
      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.0
                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: []
    delete:
      tags:
      - Nutritional Plans
      summary: 🔴🔵 Delete a nutritional plan by its ID.
      description: "Permanently deletes a nutritional plan based on its unique ID.\
        \ \nThis action is irreversible and will remove all data associated with the\
        \ plan.\n**NOTE**: If the deleted nutrition plan had an associated measure\
        \ goal, that goal will also be deleted.\n\n\nMake sure the nutritional plan\
        \ ID provided corresponds to an existing plan assigned to the user.\n"
      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: []
  /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.\n\nThis endpoint returns:\n- Estimated\
        \ timeframes to reach a weight goal.\n- Ideal weight recommendations.\n- Potential\
        \ outcomes based on intensity/duration (for muscle gain).\n\nAdditionally,\
        \ depending on the parameters provided in the payload,\nthe endpoint may also\
        \ perform a **nutritional goals simulation**.\nThis simulation calculates\
        \ the daily caloric and macronutrient targets\nrequired to reach the intended\
        \ outcome, using either the target weight\nsupplied by the user or the weight\
        \ recommendation generated during the\nplan simulation, depending on the plan\
        \ type and the fields provided.\n\n---\nRequirements\n\n\n- The user profile\
        \ must contain the following data:\n  - **Weight**\n  - **Height**\n  - **Sex**\n\
        \  - **Lifestyle**\n\n- If missing, the request will fail with a detailed\
        \ error and instructions to update the profile using:\n  - `/v2/profile/modifyUserProfileInfo`\
        \ (\U0001F534 APIUSER)\n  - `/v2/users/modifyUserProfileInfo` (\U0001F535\
        \ APIUSERMANAGER)\n\n---\n**Optional Fields by Plan Type**\n---\n\nType: **WEIGHT_LOSS**\
        \  \n  - Optional Fields: **weight_goal, date**  \n\n\nDescription:\n- _No\
        \ `weight_goal` or `date` provided_:  \n  - Returns ideal healthy weight range\
        \ and estimated timeframe to reach it.\n  - No nutritional simulation will\
        \ be performed.\n\n- _`weight_goal` provided_:  \n  - Returns estimated timeframes\
        \ to reach the target weight.\n  - No nutritional simulation will be performed.\n\
        \n- _`date` provided_:  \n  - Returns the lowest achievable weight by the\
        \ given date, based on the maximum healthy caloric deficit.\n  - Nutritional\
        \ simulation is performed using the weight recommendation generated in the\
        \ plan simulation.\n\n- _Both `weight_goal` and `date` are provided_:  \n\
        \  - 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.\n\
        \  - Nutritional simulation is performed using the target weight provided\
        \ in the payload.\n\n\nSpecial Case Handling:\n- If the user is already at\
        \ their ideal weight:\n  - The timeframe fields will return today's date.\n\
        \  - A `\"warning\"` field will be included to indicate this situation.\n\n\
        - If the user is **below** their ideal weight:\n  - The timeframe fields will\
        \ return today's date.\n  - A `\"warning\"` field will explain that weight\
        \ loss is not necessary.\n\n- If the user has **BMI < 18.5**:\n  - The timeframe\
        \ fields will return today's date.\n  - A `\"warning\"` field will inform\
        \ that a weight loss plan is not recommended for underweight individuals.\n\
        \n---\n\nType: **GAIN_MUSCLE**  \n  - Optional Fields: **growth_intensity,\
        \ date**  \n\n\nDescription:\n- _No `growth_intensity` or `date`_:  \n  -\
        \ Returns suggested presets for intensity and duration.\n  - No nutritional\
        \ simulation will be performed.\n\n- _Both provided_:  \n  - Returns estimated\
        \ weight goal, maximum weight gain, and BMI alert if unhealthy.\n  - Nutritional\
        \ simulation is performed using the weight recommendation generated in the\
        \ plan simulation.\n\n- _Only `growth_intensity` or `date` is provided_: \
        \ \n  - Causes an error because both values are required for internal calculations.\n\
        \n---\n\nType: **BALANCED_DIET**  \n  - Optional Fields: None \n\n\nDescription:\n\
        - _This plan doesn't require any parameters as no further calculations or\
        \ simulations are needed._\n  - Returns an object containing only the nutritional\
        \ goals simulation to maintain the user's current weight.\n\n---\n"
      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
                  format: float
                  nullable: true
                  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.0
                date:
                  type: string
                  format: date
                  nullable: true
                  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
                  format: float
                  nullable: true
                  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
                      nullable: true
                      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.0
                          label: Energía
                          range:
                          - 1776.5
                          - 1963.5
                          unit: kcal
                        FAT:
                          average_value: 72.72
                          label: Grasas
                          range:
                          - 40.0
                          - 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
                      nullable: true
                      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
                      nullable: true
                      example: null
                    growth_intensity:
                      type: object
                      properties:
                        low:
                          type: number
                          example: 0.25
                        moderate:
                          type: number
                          example: 0.5
                        high:
                          type: number
                          example: 1.0
                    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.0
                      description: Maximum healthy weight gain achievable within the
                        specified timeframe and intensity.
                    weight_goal:
                      type: number
                      format: float
                      example: 84.0
                      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.0
                          label: Energía
                          range:
                          - 1776.5
                          - 1963.5
                          unit: kcal
                        FAT:
                          average_value: 72.72
                          label: Grasas
                          range:
                          - 40.0
                          - 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.0
                          label: Energía
                          range:
                          - 1776.5
                          - 1963.5
                          unit: kcal
                        FAT:
                          average_value: 72.72
                          label: Grasas
                          range:
                          - 40.0
                          - 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: []
  /v2/daily_nutritional_goal:
    get:
      tags:
      - Daily Nutritional Goal
      summary: ⚫🔴🔵 Get all the existent daily goals from a user.
      description: " Retrieve the previously created intake goals. If this endpoint\
        \ is called by an APIUser it will return its current daily nutritional goals.\n\
        If this endpoint is called by an APICompany/APIUserManager an extra parameter\
        \ with the ID of the user to get the information from is required. "
      parameters:
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Parameter only required to APICompanies and APIUserManagers.
          ID of the user ID to get the goals from.
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: Nutritional goal successfully deleted!
          content:
            application/json:
              schema:
                type: object
                properties:
                  nutritional_goals:
                    type: object
                    properties:
                      DailyNutritionalGoalSample:
                        type: object
                        description: Contains the information of a nutritional goal.
                          The key 'DailyNutritionalGoalSample' will be replaced by
                          each nutrient code that has a goal assigned.
                        properties:
                          average_value:
                            type: number
                            format: float
                            example: 15.0
                            description: Average value of the goal (mean between the
                              ranges).
                          label:
                            type: string
                            description: Translated label of the nutritional indicator.
                            example: Sugars
                          range:
                            type: array
                            example:
                            - 10.0
                            - 20.0
                            description: Array containing the range of the nutritional
                              goal, with the minimum value at the first position,
                              and the maximum at the second.
                          unit:
                            type: string
                            description: Unit used to measure the quantity provided.
                            example: g
                  result:
                    type: string
                    example: Daily nutritional goals successfully retrieved!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: APIUser does not exist.
                    code:
                      type: integer
                      example: 1201
              examples:
                APIUserDoesNotExist:
                  value:
                    message: APIUser does not exist.
                    code: 1201
      security:
      - Bearer: []
    post:
      tags:
      - Daily Nutritional Goal
      summary: ⚫🔴🔵 Create a daily goal for a specific nutrient.
      description: " Create a daily intake goal for an specific nutritional indicator.\
        \ The daily nutritional goals a user has will be taken into consideration\
        \ to generate the intake recommendation (/v2/nutrition/getRecommendedDailyIntake).\
        \ If a goal for the given nutrient already exists, it will be updated.\n\n\
        &nbsp;\n\nNote that creating a goal for the daily calorie intake ('ENERC_KCAL')\
        \ will modify the amount of the recommended main nutrients the user should\
        \ ingest, but the creation of goals for the main nutrients won't effect the\
        \ total calories the user should ingest. Be careful when creating goals, make\
        \ sure the goals match properly the relationship between all the nutritional\
        \ indicators (e.g. An increment of calorie intake, implies an increment of\
        \ carbohydrates, fats and protein).\n\n&nbsp;\n\nA nutritional goal consists\
        \ on two values that determine the quantity range the users should ingest\
        \ through their meals.\n\n&nbsp;\n\nThe available indicators with their respective\
        \ units can be found by using the endpoint '/v2/info/nutrients'.\n\n&nbsp;\n\
        \nAny custom nutritional indicator defined can also be set as a goal. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nutrient_code:
                  type: string
                  example: VITC
                  enum:
                  - CA
                  - CHOCDF
                  - CHOLE
                  - ENERC_KCAL
                  - FAMS
                  - FAPU
                  - FASAT
                  - FAT
                  - FATRN
                  - FE
                  - FIBTG
                  - FOLAC
                  - FOLDFE
                  - FOLFD
                  - K
                  - MG
                  - NA
                  - NIA
                  - P
                  - PROCNT
                  - RIBF
                  - SUGAR
                  - SUGAR.added
                  - THIA
                  - TOCPHA
                  - VITA_RAE
                  - VITB12
                  - VITB6A
                  - VITC
                  - VITD
                  - VITK1
                  - ZN
                  - F20D5
                  - F22D6
                  - F18D3CN3
                  - CAFFN
                  - ALC
                  description: Code of the nutritional indicator. Read the endpoint
                    description to find all the options with their related unit.
                min_amount:
                  type: number
                  format: float
                  example: 1650.0
                  description: Minimum value of the goal range.
                max_amount:
                  type: number
                  format: float
                  example: 1890.0
                  description: Maximum value of the goal range.
                user_id:
                  type: integer
                  example: 123
                  description: Optional for user managers/companies. ID of the user
                    to add a goal to. You must be the owner of / have access to the
                    user in order to do any modification.
              required:
              - nutrient_code
              - min_amount
              - max_amount
        description: Parameters to create the nutritional goal. Managers/APICompanies
          can provide an APIUser ID to modify a specific user's goals.
        required: true
      responses:
        200:
          description: Nutritional goal successfully created!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The provided nutritional indicator code does not exist.
                      You can find the available nutrient codes in this response.
                  code:
                    type: integer
                    example: 1315
                  available_nutritional_codes:
                    type: array
                    items:
                      type: string
                    example:
                    - CA
                    - CHOCDF
                    - CHOLE
                    - ENERC_KCAL
                    - FAMS
                    - FAPU
                    - FASAT
                    - FAT
                    - FATRN
                    - FE
                    - FIBTG
                    - FOLAC
                    - FOLDFE
                    - FOLFD
                    - K
                    - MG
                    - NA
                    - NIA
                    - P
                    - PROCNT
                    - RIBF
                    - SUGAR
                    - SUGAR.added
                    - THIA
                    - TOCPHA
                    - VITA_RAE
                    - VITB12
                    - VITB6A
                    - VITC
                    - VITD
                    - VITK1
                    - ZN
                    - F20D5
                    - F22D6
                    - F18D3CN3
                    - CAFFN
                    - ALC
      security:
      - Bearer: []
    delete:
      tags:
      - Daily Nutritional Goal
      summary: ⚫🔴🔵 Delete an existent daily goal for a specific nutrient.
      description: Delete a previously created intake goal, for a specific nutrient.
      parameters:
      - in: query
        name: user_id
        schema:
          type: integer
        description: Parameter only required for APICompanies and APIUserManagers.
          ID of the user ID to get the goals from.
      - in: query
        name: nutrient_code
        schema:
          type: string
          enum:
          - CA
          - CHOCDF
          - CHOLE
          - ENERC_KCAL
          - FAMS
          - FAPU
          - FASAT
          - FAT
          - FATRN
          - FE
          - FIBTG
          - FOLAC
          - FOLDFE
          - FOLFD
          - K
          - MG
          - NA
          - NIA
          - P
          - PROCNT
          - RIBF
          - SUGAR
          - SUGAR.added
          - THIA
          - TOCPHA
          - VITA_RAE
          - VITB12
          - VITB6A
          - VITC
          - VITD
          - VITK1
          - ZN
          - F20D5
          - F22D6
          - F18D3CN3
          - CAFFN
          - ALC
        required: true
        example: VITC
        description: Code of the nutritional indicator. Read the endpoint description
          to find all the options with their related unit.
      responses:
        200:
          description: Nutritional goal successfully deleted!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Nutrient code does not exist:
                  value:
                    type: object
                    properties:
                      message:
                        type: string
                        example: The provided nutritional indicator code does not
                          exist. You can find the available nutrient codes in this
                          response.
                      code:
                        type: integer
                        example: 1315
                      available_nutritional_codes:
                        type: array
                        items:
                          type: string
                        example:
                        - CA
                        - CHOCDF
                        - CHOLE
                        - ENERC_KCAL
                        - FAMS
                        - FAPU
                        - FASAT
                        - FAT
                        - FATRN
                        - FE
                        - FIBTG
                        - FOLAC
                        - FOLDFE
                        - FOLFD
                        - K
                        - MG
                        - NA
                        - NIA
                        - P
                        - PROCNT
                        - RIBF
                        - SUGAR
                        - SUGAR.added
                        - THIA
                        - TOCPHA
                        - VITA_RAE
                        - VITB12
                        - VITB6A
                        - VITC
                        - VITD
                        - VITK1
                        - ZN
                        - F20D5
                        - F22D6
                        - F18D3CN3
                        - CAFFN
                        - ALC
                Nutritional goal does not exist:
                  value:
                    type: object
                    properties:
                      message:
                        type: string
                        example: A nutritional goal for the provided nutrient code
                          does not exist.
                      code:
                        type: integer
                        example: 1316
      security:
      - Bearer: []
  /v2/daily_nutritional_goal/autocompute:
    post:
      tags:
      - Daily Nutritional Goal
      summary: 🔵⚫ Autocompute a daily goal for a specific list of nutrients.
      description: " Automatically computes and posts a daily intake goal given a\
        \ list of nutrients and a user. There is an optional force parameter that\
        \ will not take into consideration if the user had previous goals for the\
        \ nutrients in the list and will recompute and update them. Otherwise the\
        \ daily nutritional goals a user has will be taken into consideration and\
        \ won't be updated. If force is not true only the nutrients in the nutrient\
        \ list that don't have a goal defined for the user will be calculated.\n\n\
        &nbsp;\n\nIf the nutrient list is empty or it isn't passed all nutrient goals\
        \ will be recalculated if force is true. Otherwise only the ones missing in\
        \ the user's goals. If force is not passed it will be false by default.\n\n\
        &nbsp;\n\nThe user profile attributes used for macros calculations (Fat, Protein,\
        \ Carbs, Energy) are sex, height, weight, birth, and lifestyle. Only sex and\
        \ age are used for the other nutrients. If the user does not have enough information\
        \ on its profile, global average values are used for each non-provided user\
        \ profile attribute.\n\n&nbsp;\n\nThe available indicators with their respective\
        \ units can be found by using the endpoint '/v2/info/nutrients'.\n\n&nbsp;\n\
        \nThe following nutrients do not give an autocalculation. They will appear\
        \ as null in the response (manual goal can still be set): F20D5, F22D6, FOLAC,\
        \ FOLFD, CAFFN, ALC. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: integer
                  example: 1238
                  description: ID of the user to add a goal to. You must be the owner
                    have access to the user in order to do any modification.
                nutrient_list:
                  type: array
                  example:
                  - MG
                  - FAT
                  description: Nutrients you want compute automatically taking into
                    account the force parameter. If empty or not passed all the available
                    nutrients will be computed
                force:
                  type: boolean
                  example: true
                  description: If true, every nutrient in nutrient_list will be recalculated.
                    If false, only the ones with no previous goal. If not passed,
                    it is false by default
              required:
              - user_id
        description: Parameters to autocompute the daily nutritional goals
        required: true
      responses:
        200:
          description: Daily nutritional goals successfully calculated!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The provided nutritional indicator code does not exist.
                      You can find the available nutrient codes in this response.
                  code:
                    type: integer
                    example: 1315
                  available_nutritional_codes:
                    type: array
                    items:
                      type: string
                    example:
                    - CA
                    - CHOCDF
                    - CHOLE
                    - ENERC_KCAL
                    - FAMS
                    - FAPU
                    - FASAT
                    - FAT
                    - FATRN
                    - FE
                    - FIBTG
                    - FOLAC
                    - FOLDFE
                    - FOLFD
                    - K
                    - MG
                    - NA
                    - NIA
                    - P
                    - PROCNT
                    - RIBF
                    - SUGAR
                    - SUGAR.added
                    - THIA
                    - TOCPHA
                    - VITA_RAE
                    - VITB12
                    - VITB6A
                    - VITC
                    - VITD
                    - VITK1
                    - ZN
                    - F20D5
                    - F22D6
                    - F18D3CN3
                    - CAFFN
                    - ALC
      security:
      - Bearer: []
  /v2/custom_nutritional_indicator:
    get:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Get all the existent custom nutritional indicators.
      description: " Retrieve the previously created custom nutritional indicators.\n\
        Get all of them or just the one passed as a parameter. "
      parameters:
      - in: query
        name: code
        schema:
          type: string
          example: RSPBRRY_KET
        required: false
        description: Parameter only required to get a specific indicator. If not provided
          all the available ones will be retrieved.
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      RSPBRRY_KTNS:
                        type: object
                        properties:
                          default_label:
                            type: string
                            example: Raspberry Keatons
                          id:
                            type: integer
                            example: 14
                          translations:
                            type: array
                            items:
                              type: object
                              properties:
                                language:
                                  type: string
                                  example: spanish
                                translation:
                                  type: string
                                  example: Keatons de Frambuesa
                          unit:
                            type: string
                            example: mg
                      CNZYM_Q10:
                        type: object
                        properties:
                          default_label:
                            type: string
                            example: Coenzyme Q10
                          id:
                            type: integer
                            example: 13
                          translations:
                            type: array
                            items:
                              type: object
                              properties:
                                language:
                                  type: string
                                  example: spanish
                                translation:
                                  type: string
                                  example: Coenzima Q10
                                unit:
                                  type: string
                                  example: mg
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code is not valid. It should be one of
                        these: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided code is not valid. No nutritional indicators
                        defined.
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code already exists. Existing nutritional
                        indicators: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'This indicator is one of the LogMeal defaults. Provide
                        a custom one. LogMeal indicators: [''ZN'', ''FOLFD'', ''FIBTG'',
                        ''VITB12'', ''VITK1'', ''F20D5'', ''K'', ''FAMS'', ''VITA_RAE'',
                        ''P'', ''CHOCDF'', ''FE'', ''VITC'', ''SUGAR'', ''F18D3CN3'',
                        ''SUGAR.added'', ''VITD'', ''PROCNT'', ''MG'', ''VITB6A'',
                        ''F22D6'', ''FOLDFE'', ''NA'', ''FAPU'', ''NIA'', ''FASAT'',
                        ''FAT'', ''ENERC_KCAL'', ''TOCPHA'', ''FATRN'', ''FOLAC'',
                        ''CHOLE'', ''THIA'', ''CA'', ''RIBF'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'Parameter language is not valid. Valid values are
                        {''ger'': ''german'', ''gre'': ''greek'', ''nld'': ''dutch'',
                        ''fre'': ''french'', ''eng'': ''english'', ''ita'': ''italian'',
                        ''spa'': ''spanish'', ''tur'': ''turkish'', ''cat'': ''catalan'',
                        ''heb'': ''hebrew''}'''
                    code:
                      type: integer
                      example: 708
      security:
      - Bearer: []
    post:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Create a custom nutritional indicator.
      description: " Create a custom nutritional indicator. They will be added to\
        \ the available indicators and can be used, for example, to set goals or to\
        \ be present in a custom recipe's nutritional information.\n\n&nbsp;\n\nThe\
        \ available indicators with their respective units can be found by using the\
        \ endpoint '/v2/info/nutrients'. "
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  example: RSPBRRY_KET
                unit:
                  type: string
                  example: mg
                default_label:
                  type: string
                  example: Raspberry Keatons
              description: JSON object containing the attributes of the new custom
                nutritional indicator.
      responses:
        200:
          description: Nutritional indicator successfully created
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code is not valid. It should be one of
                        these: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided code is not valid. No nutritional indicators
                        defined.
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code already exists. Existing nutritional
                        indicators: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'This indicator is one of the LogMeal defaults. Provide
                        a custom one. LogMeal indicators: [''ZN'', ''FOLFD'', ''FIBTG'',
                        ''VITB12'', ''VITK1'', ''F20D5'', ''K'', ''FAMS'', ''VITA_RAE'',
                        ''P'', ''CHOCDF'', ''FE'', ''VITC'', ''SUGAR'', ''F18D3CN3'',
                        ''SUGAR.added'', ''VITD'', ''PROCNT'', ''MG'', ''VITB6A'',
                        ''F22D6'', ''FOLDFE'', ''NA'', ''FAPU'', ''NIA'', ''FASAT'',
                        ''FAT'', ''ENERC_KCAL'', ''TOCPHA'', ''FATRN'', ''FOLAC'',
                        ''CHOLE'', ''THIA'', ''CA'', ''RIBF'']'
                    code:
                      type: integer
                      example: 1641
      security:
      - Bearer: []
    delete:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Delete an existent custom nutritional indicator.
      description: |-
        Delete a previously created custom nutritional indicator.

        &nbsp;

        If there is any nutritional goal defined for that custom indicator it will be deleted
      parameters:
      - in: query
        name: code
        schema:
          type: string
          example: RSPBRRY_KET
        required: true
        description: Code of the custom nutritional indicator to be deleted.
      responses:
        200:
          description: Nutritional indicator successfully deleted
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided code is not valid. No nutritional indicators
                        defined.
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code already exists. Existing nutritional
                        indicators: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
      security:
      - Bearer: []
    patch:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Patch an existent custom nutritional indicator.
      description: Patch a previously created custom nutritional indicator.
      parameters:
      - in: query
        name: code
        schema:
          type: string
          example: RSPBRRY_KET
        required: true
        description: Code of the custom nutritional indicator to be patched.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  example: RSPBRRY_KET
                  description: The new code for the custom nutritional indicator.
                    Optional.
                unit:
                  type: string
                  example: mg
                  description: The new unit for the custom nutritional indicator.
                    Optional.
                default_label:
                  type: string
                  example: Raspberry Keatons
                  description: The new default label for the custom nutritional indicator.
                    Optional.
              description: The request body contains the parameters to be updated.
      responses:
        200:
          description: Nutritional indicator successfully updated
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code is not valid. It should be one of
                        these: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided code is not valid. No nutritional indicators
                        defined.
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code already exists. Existing nutritional
                        indicators: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: Provide at least a value to update
                    code:
                      type: integer
                      example: 100
      security:
      - Bearer: []
  /v2/custom_nutritional_indicator_translation:
    post:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Create a custom nutritional indicator translation.
      description: " Create a translation for an specific custom nutritional indicator.\n\
        \n&nbsp;\n\nAll the available indicators with their respective units can be\
        \ found by using the endpoint '/v2/info/nutrients'.\n\n&nbsp;\n\nThe defined\
        \ translations can be retrieved by using the endpoint 'GET /v2/info/custom_nutritional_indicator'. "
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  example: RSPBRRY_KET
                translation:
                  type: string
                  example: Keatons de Frambuesa
                language:
                  type: string
                  example: spa
              description: JSON object containing the attributes of the new custom
                nutritional indicator translation.
      responses:
        200:
          description: Nutritional indicator translation successfully created
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code is not valid. It should be one of
                        these: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'Parameter language is not valid. Valid values are
                        {''ger'': ''german'', ''gre'': ''greek'', ''nld'': ''dutch'',
                        ''fre'': ''french'', ''eng'': ''english'', ''ita'': ''italian'',
                        ''spa'': ''spanish'', ''tur'': ''turkish'', ''cat'': ''catalan'',
                        ''heb'': ''hebrew''}'''
                    code:
                      type: integer
                      example: 708
                - type: object
                  properties:
                    message:
                      type: string
                      example: There is already a translation for this indicator in
                        spanish
                    code:
                      type: integer
                      example: 100
      security:
      - Bearer: []
    delete:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Delete an existent custom nutritional indicator translation.
      description: Delete a previously created custom nutritional indicator translation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  example: RSPBRRY_KET
                  description: The translation code to be deleted.
                language:
                  type: string
                  example: spa
                  description: The translation language to be deleted.
              description: The request body contains the parameters to indentify the
                translation to be deleted.
      responses:
        200:
          description: Nutritional indicator translation successfully deleted
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided code is not valid. No nutritional indicators
                        defined.
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code already exists. Existing nutritional
                        indicators: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: default label can't be deleted. Only updated.
                    code:
                      type: integer
                      example: 1642
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'No translations defined for RSPBRRY_KET in turkish.
                        This indicator has these translation languages defined: [u''catalan'',
                        u''english'', u''german'', u''catalan'', u''german'']'
                    code:
                      type: integer
                      example: 1642
                - type: object
                  properties:
                    message:
                      type: string
                      example: No translations defined for RSPBRRY_KET
                    code:
                      type: integer
                      example: 1642
      security:
      - Bearer: []
    patch:
      tags:
      - Custom Nutritional Indicators
      summary: ⚫🔵 Patch an existent custom nutritional indicator translation.
      description: Patch a previously created custom nutritional indicator translation.
      parameters:
      - in: query
        name: code
        schema:
          type: string
          example: RSPBRRY_KET
          description: Code of the custom nutritional indicator translation to be
            patched.
        required: true
        description: The code of the custom nutritional indicator translation to be
          updated.
      - in: query
        name: base_language
        schema:
          type: string
          example: spa
          description: Language of the custom nutritional indicator translation to
            be patched.
        required: true
        description: The base language of the custom nutritional indicator translation
          to be updated.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                language:
                  type: string
                  example: spa
                  description: The new language for the custom nutritional indicator
                    translation. Optional.
                translation:
                  type: string
                  example: Keatons de Frambuesa
                  description: The new translation for the custom nutritional indicator
                    translation. Optional.
              description: The request body contains the parameters to be updated.
      responses:
        200:
          description: Nutritional indicator translation successfully updated
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code is not valid. It should be one of
                        these: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided code is not valid. No nutritional indicators
                        defined.
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'The provided code already exists. Existing nutritional
                        indicators: [u''RSPBRRY_KTNS'', u''CNZYM_Q10'']'
                    code:
                      type: integer
                      example: 1641
                - type: object
                  properties:
                    message:
                      type: string
                      example: Provide at least a value to update
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'Parameter language is not valid. Valid values are
                        {''ger'': ''german'', ''gre'': ''greek'', ''nld'': ''dutch'',
                        ''fre'': ''french'', ''eng'': ''english'', ''ita'': ''italian'',
                        ''spa'': ''spanish'', ''tur'': ''turkish'', ''cat'': ''catalan'',
                        ''heb'': ''hebrew''}'''
                    code:
                      type: integer
                      example: 708
      security:
      - Bearer: []
  /v2/custom_recipe:
    post:
      tags:
      - Custom Recipes
      summary: 🔵⚫ Create a custom recipe.
      description: " Allows creating a custom recipe that will only be visible by\
        \ your company. You can create recipes that will be consumed exclusively by\
        \ your users. You can provide a default dish name, ingredient_list and nutritional_indicators\
        \ for each custom recipe. Note that all ingredients and nutrients quantities\
        \ must be introduced for the standard serving size of the recipe.\n\n&nbsp;\n\
        \nFurthermore, you can optionally provide a set of translations for your dish\
        \ to all the available languages (see endpoint /v2/info/languages to know\
        \ which is the set of valid languages). The users will visualize the translation\
        \ corresponding to his/her language. If a language's value is set to null,\
        \ the stored translation for that language will be deleted. **IMPORTANT: note\
        \ that at least the language 'eng' MUST be provided if you want the recognition\
        \ algorithms to automatically detect the custom recipes.**\n\n&nbsp;\n\nTo\
        \ identify an ingredient it can be done in two different ways. Either passing\
        \ an 'ingredientId' (it must be a valid ingredient id from the LogMeal system)\
        \ or an 'ingredientName'. When passing a Name, the ingredient, will be present\
        \ in the recipe and will be usable but it will not have some functionalities\
        \ since it is not in the system and there is no data associated to it. It\
        \ could be anything.\n\n&nbsp;\n\nRefer to GET '/v2/info/nutrients' to see\
        \ a list of valid nutrient codes. Where you can find the 'indicatorCode' and\
        \ unit for the 'indicatorAmount' for all the available nutrients. Refer to\
        \ GET '/v2/dataset/ingredients', it will return all the valid ingredients\
        \ names and their ids. All values for 'ingredientAmount' must be reported\
        \ in grams and all values for 'indicatorAmount' must be reported in the indicator-specific\
        \ unit reported in '/v2/info/nutrients'.\n\n&nbsp;\n\nIf a list of ingredients\
        \ is provided but not a list of nutrients, the nutritional information will\
        \ be automatically calculated based on the list of ingredients stored in the\
        \ system. It's important to note that only ingredients with a valid, existing\
        \ and associated ID will be considered.\n\n&nbsp;\n\nAlternatively, it is\
        \ also possible to provide only the nutritional indicators without specifying\
        \ any ingredients. In this case, the system will use the provided nutritional\
        \ data as-is, without performing any automatic calculation or ingredient validation.\
        \ This option can be useful when the exact composition of the recipe is unknown\
        \ or when you only need to register the nutritional profile directly.\n\n\
        &nbsp;\n\nThis endpoint has an 'image' parameter in the request body which\
        \ is in the 'multipart/form-data', and other parameters are in 'application/json'.\
        \ You can check it from the dropdown from the right corner. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dish_name:
                  type: string
                  example: Salad with tomato and seeds
                sugar_modulation:
                  type: boolean
                  example: 'true'
                  enum:
                  - 'true'
                  - 'false'
                  default: 'false'
                  description: Whether the user could possibly choose to include added
                    sugar to the recipe (e.g. coffees, yogurts, etc.).
                ingredient_list:
                  type: array
                  description: Ingredient can only be identified by ingredientId or
                    by ingredientName. Not both. Provide only one.
                  items:
                    type: object
                    properties:
                      ingredientId:
                        type: integer
                        example: 15
                      ingredientName:
                        type: string
                        example: Spirulina
                      ingredientAmount:
                        type: number
                        format: float
                        example: 5.0
                    required:
                    - ingredientId
                    - ingredientName
                    - ingredientAmount
                  example:
                  - ingredientId: 14
                    ingredientAmount: 3.0
                  - ingredientId: 59
                    ingredientAmount: 4.5
                nutritional_indicators:
                  type: array
                  items:
                    type: object
                    properties:
                      indicatorCode:
                        type: string
                        example: FE
                      indicatorAmount:
                        type: number
                        format: float
                        example: 6.7
                    required:
                    - indicatorCode
                    - indicatorAmount
                  example:
                  - indicatorCode: FE
                    indicatorAmount: 6.7
                  - indicatorCode: CA
                    indicatorAmount: 2.8
                translations:
                  type: object
                  properties:
                    eng:
                      type: string
                      example: Salad with tomato and seeds
                    spa:
                      type: string
                      nullable: true
                      example: Ensalada con tomate y semillas
                    cat:
                      type: string
                      nullable: true
                      example: null
              required:
              - dish_name
              - ingredient_list
              - nutritional_indicators
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Custom recipe successfully created!
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Custom recipe successfully created!
                  custom_recipe_id:
                    type: integer
                    example: 1
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    get:
      tags:
      - Custom Recipes
      summary: 🔵⚫🔴 Get some basic information about all the active custom recipes.
      description: ' This endpoint is used to get all active custom recipes.'
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: Custom recipes retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  custom_recipes:
                    type: array
                    items:
                      type: object
                      properties:
                        custom_recipe_id:
                          type: integer
                          example: 1
                          description: ID of a custom recipe.
                        dish:
                          type: string
                          example: spaghetti bolognese
                          description: Name of the dish.
                        image_url:
                          type: string
                          description: URL to access the reference image.
                          example: https://storage.logmeal.com/apiImages/123.jpg
                  result:
                    type: string
                    example: Custom recipes retrieved successfully.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/custom_recipe/{custom_recipe_id}:
    get:
      tags:
      - Custom Recipes
      summary: 🔵⚫🔴 Get the complete information for a specific custom recipe.
      description: ' This endpoint is used to get a single custom recipe referred
        by the provided ''custom_recipe_id'' parameter. It returns all the information
        associated to that specific recipe (dish name, image url, ingredients list,
        nutritional indicators, etc.). '
      parameters:
      - in: path
        name: custom_recipe_id
        schema:
          type: integer
        required: true
        description: ID of the custom recipe to get the information from.
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        200:
          description: Custom recipe retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  custom_recipe:
                    type: object
                    properties:
                      custom_recipe_id:
                        type: integer
                        example: 1
                        description: ID of a custom recipe.
                      dish:
                        type: string
                        example: spaghetti bolognese
                        description: Name of the dish.
                      sugar_modulation:
                        type: boolean
                        example: 'true'
                        enum:
                        - 'true'
                        - 'false'
                        description: Whether the user could possibly choose to include
                          added sugar to the recipe (e.g. coffees, yogurts, etc.).
                      image_url:
                        type: string
                        description: URL to access the image.
                        example: https://storage.logmeal.com/apiImages/123.jpg
                      ingredient_list:
                        type: array
                        items:
                          type: object
                          properties:
                            ingredientId:
                              type: integer
                              example: 12
                            ingredientName:
                              type: string
                              example: oil
                            ingredientAmount:
                              type: number
                              format: float
                              example: 5.0
                      nutritional_indicators:
                        type: array
                        items:
                          type: object
                          properties:
                            indicatorCode:
                              type: string
                              example: FE
                            indicatorAmount:
                              type: number
                              format: float
                              example: 6.7
                      translations:
                        type: object
                        properties:
                          default:
                            type: string
                            example: spaghetti bolognese
                          eng:
                            type: string
                            example: spaghetti bolognese
                          spa:
                            type: string
                            example: espagueti a la boloñesa
                  result:
                    type: string
                    example: Custom recipe retrieved successfully.
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    delete:
      tags:
      - Custom Recipes
      summary: 🔵⚫ Deactivate an existing custom recipe.
      description: ' This endpoint is used to deactivate an existing custom recipe
        created by APICompany and APIUserManager. This means that all the food intakes
        attached to this custom recipe will remain untouched but the recipe will not
        be available anymore for future intake assignments. '
      parameters:
      - in: path
        name: custom_recipe_id
        schema:
          type: integer
        required: true
        description: Custom recipe ID to delete an existing custom recipe.
      responses:
        200:
          description: Custom recipe deleted successfully.
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    patch:
      tags:
      - Custom Recipes
      summary: 🔵⚫ Edit an existing custom recipe.
      description: " This endpoint is used when the user wants to update the details\
        \ of a custom recipe referred by the provided 'custom_recipe_id' parameter.\
        \ The parameters that can be edited are image, dish_name, translations, ingredient_list\
        \ and nutritional_indicators. If any of the parameters are provided in the\
        \ request body then it will update the respective recipe with the new values.\
        \ If a list of ingredients ids provided but not a list of nutrients, the nutritional\
        \ information will be automatically calculated based on the list of ingredients\
        \ stored in the system. It's important to note that only ingredients with\
        \ a valid, existing and associated ID will be considered.\n\n&nbsp;\n\nFor\
        \ the 'translations' parameter, each language code maps to the translated\
        \ dish name. You can pass a string value to update or add a translation. If\
        \ a language's value is set to null, the stored translation for that language\
        \ will be deleted.\n\n&nbsp;\n\nRefer to POST '/v2/custom_recipe' in order\
        \ to understand the required format for each of the optional parameters.\n\
        \n&nbsp;\n\nThis endpoint has an 'image' parameter in the request body which\
        \ is in the 'multipart/form-data', and other parameters are in 'application/json'.\
        \ You can check it from the dropdown from the right corner. "
      parameters:
      - in: path
        name: custom_recipe_id
        schema:
          type: integer
          example: 123
        required: true
        description: ID of the custom recipe.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dish_name:
                  type: string
                  example: Salad with tomato and seeds
                sugar_modulation:
                  type: boolean
                  example: 'true'
                  enum:
                  - 'true'
                  - 'false'
                  default: 'false'
                  description: Whether the user could possibly choose to include added
                    sugar to the recipe (e.g. coffees, yogurts, etc.).
                ingredient_list:
                  type: array
                  description: Ingredient can only be identified by ingredientId or
                    by ingredientName. Not both. Provide only one.
                  items:
                    type: object
                    properties:
                      ingredientId:
                        type: integer
                        example: 15
                      ingredientName:
                        type: string
                        example: Spirulina
                      ingredientAmount:
                        type: number
                        format: float
                        example: 5.0
                  example:
                  - ingredientId: 14
                    ingredientAmount: 3.0
                  - ingredientId: 59
                    ingredientAmount: 4.5
                nutritional_indicators:
                  type: array
                  items:
                    type: object
                    properties:
                      indicatorCode:
                        type: string
                        example: FE
                      indicatorAmount:
                        type: number
                        format: float
                        example: 6.7
                  example:
                  - indicatorCode: FE
                    indicatorAmount: 6.7
                  - indicatorCode: CA
                    indicatorAmount: 2.8
                translations:
                  type: object
                  properties:
                    eng:
                      type: string
                      example: Salad with tomato and seeds
                    spa:
                      type: string
                      nullable: true
                      example: Ensalada con tomate y semillas
                    cat:
                      type: string
                      nullable: true
                      example: null
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
      responses:
        200:
          description: Custom recipe edited successfully.
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/favorites:
    post:
      tags:
      - APIUser Favorite Meals
      summary: 🔴 Create a favorite instance for a user. ⏱
      description: |2

        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint creates a favorite instance for a user using an existent image id and all confirmed dishes in the image together with their quantities. This way users can store their more preferred dishes and meals as their favorites and use them to introduce food intakes in the future in an easier way. Furthermore, this information will be internally used to better customize the user experience.

        &nbsp;
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                imageId:
                  type: integer
                  example: 3
                  description: id of the image
                name:
                  type: string
                  example: new name
                  description: Name of the favorite (defaults to the list of dishes
                    confirmed in the image).
              required:
              - imageId
        description: Parameters to create the favorite for an user.
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  favorite_image_id:
                    type: integer
                    example: 135766
                    description: id of the favorite instance created
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    get:
      tags:
      - APIUser Favorite Meals
      summary: 🔴 Get all favorites of a user. ⏱
      description: "\n<span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n&nbsp;\n\nThis endpoint\
        \ returns all previously created favorites for a user. "
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_favorites:
                    type: array
                    items:
                      description: Object containing the information of the each favorite
                        associated to the user.
                      type: object
                      properties:
                        favorite_image_id:
                          description: Id of the favorite instance. This is equivalent
                            to an image_id.
                          type: integer
                          example: 45
                        name:
                          description: Name of the favorite
                          type: string
                          example: breakfast meal
                        image_url:
                          description: URL to access the image. This URL has an expiration
                            time of 1 day. This value will be null in case it corresponds
                            to a manualInput (see endpoint /intake/manualInput)
                          type: string
                          example: https://www.edamam.com/food-img/205/205e6bf2399b85d34741892ef91cc603.jpg
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    delete:
      tags:
      - APIUser Favorite Meals
      summary: 🔴 Delete an existent favorite of a user.
      description: ' This endpoint deletes a previously created favorite instance
        for an APIUser. '
      parameters:
      - in: query
        name: favorite_image_id
        schema:
          type: integer
        required: true
        description: Id of the favorite instance that needs to be deleted.
      responses:
        200:
          description: User favorite successfully deleted!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Nutrient code does not exist:
                  value:
                    type: object
                    properties:
                      message:
                        type: string
                        example: The provided nutritional indicator code does not
                          exist. You can find the available nutrient codes in this
                          response.
                      code:
                        type: integer
                        example: 1315
                      available_nutritional_codes:
                        type: array
                        items:
                          type: string
                        example:
                        - CA
                        - CHOCDF
                        - CHOLE
                        - ENERC_KCAL
                        - FAMS
                        - FAPU
                        - FASAT
                        - FAT
                        - FATRN
                        - FE
                        - FIBTG
                        - FOLAC
                        - FOLDFE
                        - FOLFD
                        - K
                        - MG
                        - NA
                        - NIA
                        - P
                        - PROCNT
                        - RIBF
                        - SUGAR
                        - SUGAR.added
                        - THIA
                        - TOCPHA
                        - VITA_RAE
                        - VITB12
                        - VITB6A
                        - VITC
                        - VITD
                        - VITK1
                        - ZN
                        - F20D5
                        - F22D6
                        - F18D3CN3
                        - CAFFN
                        - ALC
                Nutritional goal does not exist:
                  value:
                    type: object
                    properties:
                      message:
                        type: string
                        example: A nutritional goal for the provided nutrient code
                          does not exist.
                      code:
                        type: integer
                        example: 1316
      security:
      - Bearer: []
    patch:
      tags:
      - APIUser Favorite Meals
      summary: 🔴 Edits the name for an existent favorite of a user.
      description: ' This endpoint can be used to edit the name of a previously created
        favorite instance for an APIUser. '
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                favorite_image_id:
                  type: integer
                  example: 3
                  description: id of the favorite
                name:
                  type: string
                  example: new name
                  description: New name of the favorite
              required:
              - favorite_image_id
              - name
      responses:
        200:
          description: User favorite successfully edited!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/favorites/intake:
    post:
      tags:
      - APIUser Favorite Meals
      summary: 🔴 Assign a favorite instance to user intake. ⏱
      description: "\n<span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span>\
        \ <strong>Limited amount of calls per second.</strong>\n\n&nbsp;\n\nThis endpoint\
        \ assigns an existing favorite instance (favorite_id) to either a manual intake\
        \ or the recognition results for an image uploaded by the user(imageId). This\
        \ allows reusing all the information stored in the favorite instance without\
        \ requiring a re-introduction by the user.\n\n&nbsp;\n\nFor more information\
        \ on manual input, see endpoint '/v2/intake/manualInput'. "
      parameters:
      - in: query
        name: favorite_image_id
        schema:
          type: integer
        required: true
        description: Id of the favorite instance that needs to be assigned.
      - in: query
        name: imageId
        schema:
          type: integer
        required: true
        description: Id of the image. This image can either be an API image or manual
          input image.
      responses:
        200:
          description: User favorite assigned successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/measure:
    get:
      tags:
      - Body Measures
      summary: ⚫🔴🔵 Get all the existent body measures from a company.
      description: ' Retrieve the previously created body measures. '
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    description: List of body measures and their units.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The name of the body measure.
                        unit:
                          type: string
                          description: The unit of measurement for the body measure.
              examples:
                GetBodyMeasureExampleResponse:
                  value:
                    result:
                    - name: weight
                      unit: kg
                    - name: waist
                      unit: cm
                    - name: height
                      unit: cm
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    post:
      tags:
      - Body Measures
      summary: ⚫🔵 Create a body measure for a company.
      description: " Create a body measure for a company.\n\n&nbsp;\n\nA body measure\
        \ consists of a name and its unit.\n\n&nbsp;\n\nThe company has a series of\
        \ measures that are necessary for the correct functioning of the application.\
        \ If you try to create any of them with the reserved name, an error will be\
        \ shown to the user along with a list of the reserved measures. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: height
                  description: Name of the body measure to be created
                unit:
                  type: string
                  example: cm
                  description: Unit of the body measure to be created
              required:
              - name
              - unit
        description: Parameters to create the body measure.
        required: true
      responses:
        200:
          description: Body measure created successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 'height already exists. Existing measures: [u''weight'',
                      u''height'']'
                  code:
                    type: integer
                    example: 1645
      security:
      - Bearer: []
    patch:
      tags:
      - Body Measures
      summary: ⚫🔵 Update a body measure for a company.
      description: " Create a body measure for a company.\n\n&nbsp;\n\nProvide at\
        \ least one of the two values to update.\n\n&nbsp;\n\nThe company has a series\
        \ of measures that are necessary for the correct functioning of the application.\
        \ If an attempt is made to modify any of them with values that are not allowed,\
        \ an error will be displayed to the user informing them of the fields allowed\
        \ in this modification. For example 'weight' has two possible units 'kg' or\
        \ 'lb'. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: height
                  description: Name of the body measure to be updated
                new_name:
                  type: string
                  example: height
                  description: New name for the body measure
                new_unit:
                  type: string
                  example: cm
                  description: New unit for the body measure
              required:
              - name
        description: Parameters to update the body measure.
        required: true
      responses:
        200:
          description: Body measure updated successfully!
        400:
          description: 'The unit ''gr'' is not available for the measure ''weight''.
            Available measures for ''weight'' are: [''kg'', ''lb'']'
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 'waist does not exist. Existing measures: [u''weight'',
                      u''height'']'
                  code:
                    type: integer
                    example: 1645
      security:
      - Bearer: []
    delete:
      tags:
      - Body Measures
      summary: ⚫🔵 Delete an existent body measure.
      description: " Delete a previously created body measure. **NOTE**: If the deleted\
        \ goal was associated with a nutrition plan, the plan will also be deleted.\n\
        \n&nbsp;\n\nThe company has a series of measures that are necessary for the\
        \ correct functioning of the application. If you try to delete any of them,\
        \ an error will be displayed to the user, preventing the loss of information.\
        \ For example 'weight'. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: height
                  description: Name of the body measure to be deleted
              required:
              - name
        description: Parameters to delete the body measure.
        required: true
      responses:
        200:
          description: Body measure deleted successfully!
        400:
          description: The measurement you are trying to delete cannot be deleted
            as it is necessary for the correct functioning of the application.
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: 'waist does not exist. Existing measures: [u''weight'',
                      u''height'']'
                  code:
                    type: integer
                    example: 1645
      security:
      - Bearer: []
  /v2/user_measure:
    get:
      tags:
      - Body Measures
      summary: 🔴🔵 Get user body measures values.
      description: ' Retrieve the previously created user body measures. '
      parameters:
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Parameter only required to APIUserManagers.
      - in: query
        name: measure_name
        example: weight
        schema:
          type: string
        required: false
        description: Optional parameter. If provided, the response will be filtered
          and only results for this specific measure will be returned.
      - in: query
        name: fromDate
        example: 2000/01/01
        schema:
          type: string
          format: date
        required: false
        description: Optional parameter. If provided, the response will be filtered
          and only results logged after this date will be returned.
      - in: query
        name: toDate
        example: 2000/12/12
        schema:
          type: string
          format: date
        required: false
        description: Optional parameter. If provided, the response will be filtered
          and only results that have been recorded prior to this date will be returned.
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    description: List of user body measures and their units.
                    items:
                      type: object
                      properties:
                        measure:
                          type: string
                          description: The name of the body measure.
                        unit:
                          type: string
                          description: The unit of measurement for the body measure.
                        date:
                          type: string
                          description: Date of the measurement insertion.
                        value:
                          type: number
                          format: float
                          description: Value inserted for the body measure.
              examples:
                GetUserBodyMeasuresExampleResponse:
                  value:
                    result:
                    - measure: waist
                      date: 2023/05/10
                      unit: cm
                      value: 150.0
                      active: true
                    - measure: weight
                      date: 2023/05/12
                      unit: kg
                      value: 80.0
                      active: false
                    - measure: weight
                      date: 2023/05/29
                      unit: kg
                      value: 75.0
                      active: true
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    post:
      tags:
      - Body Measures
      summary: 🔴🔵 Insert a value for a user measurement.
      description: " Insert a body measure for a user.\n\n&nbsp;\n\nA user body measure\
        \ consists of a name for the measure, a value and a date (optional). If the\
        \ date is not provided the actual date will be used. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: height
                  description: Name of the user body measure to be inserted
                value:
                  type: number
                  format: float
                  example: 185
                  description: Value of the user body measure to be inserted
                date:
                  type: string
                  example: 2023/01/20
                  description: Date of the user body measurement being inserted
              required:
              - measure_name
              - value
        description: Parameters to insert the user body measure.
        required: true
      responses:
        200:
          description: User body measure inserted successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'waist does not exist. Existing measures: [u''weight'',
                        u''height'']'
                    code:
                      type: integer
                      example: 1645
      security:
      - Bearer: []
    delete:
      tags:
      - Body Measures
      summary: 🔴🔵 Delete an existent user body measure.
      description: " Delete a previously created user body measure.\n\n&nbsp;\n\n\
        If timestamp is not provided all the measures with the passed name will be\
        \ deleted. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: weight
                  description: Name of the user body measure to be deleted
                date:
                  type: string
                  example: 2023/01/20
                  description: Date of the user body measurement being deleted
              required:
              - measure_name
        description: Parameters to delete the user body measure.
        required: true
      responses:
        200:
          description: User body measure deleted successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'waist does not exist. Existing measures: [u''weight'',
                        u''height'']'
                    code:
                      type: integer
                      example: 1645
      security:
      - Bearer: []
  /v2/user_measure_goal:
    get:
      tags:
      - Body Measures
      summary: 🔴🔵 Get user body measure goals values.
      description: ' Retrieve the previously created user body measure goals. '
      parameters:
      - in: query
        name: user_id
        schema:
          type: integer
        required: false
        description: Parameter only required to APIUserManagers.
      - in: query
        name: measure_name
        example: weight
        schema:
          type: string
        required: false
        description: Optional parameter. If provided, the response will be filtered
          and only results for this specific measure will be returned.
      - in: query
        name: fromDate
        example: 2000/01/01
        schema:
          type: string
          format: date
        required: false
        description: Optional parameter. If provided, the response will be filtered
          and only results logged after this date will be returned.
      - in: query
        name: toDate
        example: 2000/12/12
        schema:
          type: string
          format: date
        required: false
        description: Optional parameter. If provided, the response will be filtered
          and only results that have been recorded prior to this date will be returned.
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    description: List of user body measure goals and their respective
                      units.
                    items:
                      type: object
                      properties:
                        active:
                          type: boolean
                          description: Either if the user_measure_goal is currently
                            active or not. This way we can differentiate which goal
                            the user is currently working on.
                        date:
                          type: string
                          description: Date by which the user wants to meet the body
                            measure goal.
                        id:
                          type: number
                          format: integer
                          description: ID of the user measure goal.
                        measure:
                          type: string
                          description: The name of the body measure.
                        unit:
                          type: string
                          description: The unit of measurement for the body measure
                            goal.
                        value:
                          type: number
                          format: float
                          description: Value inserted for the body measure.
              examples:
                GetUserBodyMeasuresExampleResponse:
                  value:
                    result:
                    - measure: waist
                      date: 2023/05/10
                      unit: cm
                      value: 150.0
                      active: true
                    - measure: weight
                      date: 2023/05/12
                      unit: kg
                      value: 80.0
                      active: false
                    - measure: weight
                      date: 2023/05/29
                      unit: kg
                      value: 75.0
                      active: true
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    post:
      tags:
      - Body Measures
      summary: 🔴🔵 Insert a value for a user measurement goal.
      description: " Insert a body measure for a user.\n\n&nbsp;\n\nA user body measure\
        \ goal consists of a name for the measure, a value and a date. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: height
                  description: Name of the user body measure goal to be inserted
                value:
                  type: number
                  format: float
                  example: 185
                  description: Value of the user body measure goal to be inserted
                date:
                  type: string
                  example: 2023/01/20
                  description: Date by which the user wants to meet the body measure
                    goal
              required:
              - measure_name
              - value
              - date
        description: Parameters to insert the user body measure goal.
        required: true
      responses:
        200:
          description: User body measure goal inserted successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'waist does not exist. Existing measures: [u''weight'',
                        u''height'']'
                    code:
                      type: integer
                      example: 1645
      security:
      - Bearer: []
    delete:
      tags:
      - Body Measures
      summary: 🔴🔵 Delete an existent user body measure goal.
      description: " Delete a previously created user body measure goal.\n\n&nbsp;\n\
        \nIf timestamp is not provided all the measure goals with the passed name\
        \ will be deleted. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                measure_name:
                  type: string
                  example: weight
                  description: Name of the user body measure to be deleted
                date:
                  type: string
                  example: 2023/01/20
                  description: Date of the user body measurement being deleted
              required:
              - measure_name
        description: Parameters to delete the user body measure goal.
        required: true
      responses:
        200:
          description: User body measure goal deleted successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The date must be formatted as '%Y/%m/%d, %H:%M:%S'
                    code:
                      type: integer
                      example: 100
                - type: object
                  properties:
                    message:
                      type: string
                      example: 'waist does not exist. Existing measures: [u''weight'',
                        u''height'']'
                    code:
                      type: integer
                      example: 1645
      security:
      - Bearer: []
  /v2/dataset/referenceIngredients:
    get:
      tags:
      - Units of Measurement and Easy Modulation
      summary: ⚫🔴🔵 Returns a list of ingredients that can be used as salt, sugar and
        oil for a dish.
      description: This endpoint returns a complete list of the ingredients that can
        be used as the user's choice of salt, sugar and oil. When calculating recipe
        information we'll check if the user has defined any of these reference ingredients
        and use them instead of any other types of salt, sugar & oil present in the
        recipe.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  salt:
                    type: array
                    items:
                      type: object
                      properties:
                        avgQuantity:
                          type: number
                          description: Average quantity of this ingredient in all
                            recipes.
                        id:
                          type: integer
                          example: 562
                        modifier_type:
                          type: string
                          enum:
                          - null
                          - sugar
                          - salt
                          - oil
                        name:
                          type: string
                          example: oil
                        unit:
                          type: string
                          enum:
                          - g
                          - ml
                        state:
                          type: string
                          enum:
                          - solid
                          - liquid
                      description: An object describing an ingredient, with its id
                        and name translated into your language.
                    description: An array of ingredients objects.
                    example:
                    - id: 114
                      name: Eggplant
                    - id: 569
                      name: Egg
                  sugar:
                    type: array
                    items:
                      type: object
                      properties:
                        avgQuantity:
                          type: number
                          description: Average quantity of this ingredient in all
                            recipes.
                        id:
                          type: integer
                          example: 562
                        modifier_type:
                          type: string
                          enum:
                          - null
                          - sugar
                          - salt
                          - oil
                        name:
                          type: string
                          example: oil
                        unit:
                          type: string
                          enum:
                          - g
                          - ml
                        state:
                          type: string
                          enum:
                          - solid
                          - liquid
                      description: An object describing an ingredient, with its id
                        and name translated into your language.
                    description: An array of ingredients objects.
                    example:
                    - id: 114
                      name: Eggplant
                    - id: 569
                      name: Egg
                  oil:
                    type: array
                    items:
                      type: object
                      properties:
                        avgQuantity:
                          type: number
                          description: Average quantity of this ingredient in all
                            recipes.
                        id:
                          type: integer
                          example: 562
                        modifier_type:
                          type: string
                          enum:
                          - null
                          - sugar
                          - salt
                          - oil
                        name:
                          type: string
                          example: oil
                        unit:
                          type: string
                          enum:
                          - g
                          - ml
                        state:
                          type: string
                          enum:
                          - solid
                          - liquid
                      description: An object describing an ingredient, with its id
                        and name translated into your language.
                    description: An array of ingredients objects.
                    example:
                    - id: 114
                      name: Eggplant
                    - id: 569
                      name: Egg
        '400':
          description: Invalid syntax
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '401':
          description: Unauthorized, invalid token
        '403':
          description: You are not allowed to this method.
        '404':
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/weightMeasures/dishes:
    get:
      tags:
      - Units of Measurement and Easy Modulation
      summary: ⚫🔴🔵 Returns information about all weight measures used to display dish
        weights.
      description: |
        This endpoint returns an object populated with useful information for displaying dish weight measures such as the
        full length and abbreviated name of each measure, and its conversion rate to grams. The conversion rate is
        specially important as our API requires all weights to be provided to us in grams.

        All measures returned will be translated into the user-preferred language. Check endpoint '/profile/modifyUserProfileInfo' for extra details.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  cooking_measures:
                    type: object
                    properties:
                      id:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: ID for this measure.
                          grams_conversion:
                            type: number
                            format: float
                            description: Number of grams for 1 unit of this measure.
                          name:
                            type: string
                            description: Translated name of this unit.
                  weight:
                    type: object
                    properties:
                      id:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: ID for this measure.
                          grams_conversion:
                            type: number
                            format: float
                            description: Number of grams for 1 unit of this measure.
                          name:
                            type: string
                            description: Translated name of this unit.
                          short:
                            type: string
                            description: A short name for this unit.
                          system:
                            type: string
                            description: Type of measurement system being used, metric
                              or imperial.
                          state:
                            type: string
                            enum:
                            - liquid
                            - solid
                            description: Typical state of the dish. This indicates
                              which 'weight' measures are allowed depending on the
                              corresponding dish type provided in /dataset/dishes.
                              For dishes under type 'drink' the state 'liquid' applies.
                              For any other food type the state 'solid' applies.
        '400':
          description: Invalid syntax
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '401':
          description: Unauthorized, invalid token
        '403':
          description: You are not allowed to this method.
        '404':
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dataset/weightMeasures/ingredients:
    get:
      tags:
      - Units of Measurement and Easy Modulation
      summary: ⚫🔴🔵 Returns information about all weight measures used to display ingredient
        weights.
      description: |
        This endpoint returns an object populated with useful information for displaying ingredient weight measures such as the
        full length and abbreviated name of each measure, and its conversion rate to grams. The conversion rate is
        specially important as our API requires all weights to be provided to us in grams.

        All measures returned will be translated into the user-preferred language. Check endpoint '/profile/modifyUserProfileInfo' for extra details.
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  cooking_measures:
                    type: object
                    properties:
                      id:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: ID for this measure.
                          grams_conversion:
                            type: number
                            format: float
                            description: Number of grams for 1 unit of this measure.
                          name:
                            type: string
                            description: Translated name of this unit.
                  weight:
                    type: object
                    properties:
                      id:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: ID for this measure.
                          grams_conversion:
                            type: number
                            format: float
                            description: Number of grams for 1 unit of this measure.
                          name:
                            type: string
                            description: Translated name of this unit.
                          short:
                            type: string
                            description: A short name for this unit.
                          system:
                            type: string
                            description: Type of measurement system being used, metric
                              or imperial.
                          state:
                            type: string
                            enum:
                            - liquid
                            - solid
                            description: Typical state of the ingredient. This indicates
                              which 'weight' measures are allowed depending on the
                              corresponding ingredient state provided in /dataset/ingredients.
        '400':
          description: Invalid syntax
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        '401':
          description: Unauthorized, invalid token
        '403':
          description: You are not allowed to this method.
        '404':
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/managers:
    get:
      tags:
      - External Management
      summary: ⚫ Retrieve all the APIUserManager your company has.
      description: " This endpoint provides information about the APIUserManagers\
        \ your company has created.\n\n&nbsp;\n\nThe response contains the IDs, email,\
        \ username and token of each APIUserManager returned. "
      responses:
        200:
          description: APIUserManagers retrieved successfully!
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_user_managers:
                    type: object
                    properties:
                      USER_MANAGER_ID:
                        type: object
                        properties:
                          email:
                            type: string
                            example: samplemail@mail.com
                            description: Email of the APIUserManager.
                          username:
                            type: string
                            example: sampleusername
                            description: Username of the APIUserManager.
                          token:
                            type: string
                            example: f3a265ff8c1070c4f7d9b54b352d3384e936fe33
                            description: Token of the APIUserManager to access our
                              API endpoints.
                          last_login:
                            type: string
                            format: date-time
                            example: Wed, 17 Jul 2024 15:01:57 GMT
                            description: Datetime timestamp of the last login performed
                              by the manager.
                          language:
                            type: string
                            example: eng
                            description: Three-letter 639-2/T code describing the
                              language chosen by the APIUserManager.
                        description: Object returned for each APIUserManager. Contains
                          the basic information of the APIUserManager.
                    description: Object containing multiple entries, where the key
                      of the object is each of the APIUserManager's IDs.
                  result:
                    type: string
                    example: APIUserManagers retrieved successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
    post:
      tags:
      - External Management
      summary: ⚫ Create a new APIUserManager for your company.
      description: " This endpoint is used to create a new APIUserManager.\n\n&nbsp;\n\
        \nTo create a new APIUserManager a username, an email and a password must\
        \ be provided. Ensure that the passwords you use are securely provided to\
        \ the physical person that will use the account. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: Username that will be assigned to the APIUserManager
                    account
                  example: sampleusername
                email:
                  type: string
                  description: Email that will be assigned to the APIUserManager account.
                  example: sampleemail@email.com
                password:
                  type: string
                  description: Password that will be assigned to the APIUserManager
                    account.
                  example: securepassword
                language:
                  type: string
                  default: eng
                  example: eng
                  enum:
                  - spa
                  - cat
                  - eng
                  - ita
                  - nld
                  - fre
                  - ger
                  - tur
                  - gre
                  - heb
                  description: Default language assigned to the APIUserManager. It
                    must be a three-letter ISO 639-2/T code
              required:
              - username
              - email
              - password
        description: Parameters to create a new APIUserManager.
        required: true
      responses:
        200:
          description: APIUserManager created successfully!
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 727
                        description: ID of the user manager that has been created.
                      username:
                        type: string
                        example: sampleusername
                        description: Username of the user manager that has been created.
                      email:
                        type: string
                        example: samplemail@mail.com
                        description: Email of the user manager that has been created.
                      token:
                        type: string
                        example: 76eec63ccc13fa9626de4b1916461ef5c5e33946
                        description: Token of the user manager that has been created.
                      language:
                        type: string
                        example: eng
                        description: Three-letter 639-2/T code describing the language
                          chosen by the APIUserManager.
                    description: Object that contains the basic information of the
                      APIUserManager that has been created.
                  result:
                    type: string
                    example: APIUserManager created successfully!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: A user with the provided username already exists.
                    code:
                      type: integer
                      example: 808
                - type: object
                  properties:
                    message:
                      type: string
                      example: A user with the provided email already exists.
                    code:
                      type: integer
                      example: 811
              examples:
                UsernameAlreadyExists:
                  value:
                    message: A user with the provided username already exists.
                    code: 808
                EmailAlreadyExists:
                  value:
                    message: A user with the provided email already exists.
                    code: 811
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
      security:
      - Bearer: []
  /v2/managers/{manager_id}:
    patch:
      tags:
      - External Management
      summary: ⚫🔵 Update the profile information for an existent APIUserManager from
        your company.
      description: " This endpoint is used to edit the profile information of an existent\
        \ APIUserManager.\n\n&nbsp;\n\nYou must provide its user ID through the endpoint\
        \ path. Make sure you obtain the APIUserManager ID properly by using the '/v2/managers'\
        \ GET endpoint. "
      parameters:
      - in: path
        name: manager_id
        schema:
          type: integer
        required: true
        description: ID of the APIUserManager to be edited. The user manager ID can
          be obtained in the '/v2/managers' GET endpoint.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                language:
                  type: string
                  example: eng
                  description: Three-letter 639-2/T code describing the language chosen
                    by/for the APIUserManager.
      responses:
        200:
          description: The profile information has been successfully modified!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager with the given user ID does not exist.
                    code:
                      type: integer
                      example: 1222
              examples:
                APIUserManagerDoesNotExist:
                  value:
                    message: An APIUserManager with the given user ID does not exist.
                    code: 1222
      security:
      - Bearer: []
    delete:
      tags:
      - External Management
      summary: ⚫ Delete an existent APIUserManager from your company.
      description: " This endpoint is used to delete an existent APIUserManager.\n\
        \n&nbsp;\n\nTo delete an APIUserManager you must provide its user ID through\
        \ the endpoint path. Make sure you obtain the APIUserManager ID properly by\
        \ using the '/v2/managers' GET endpoint. "
      parameters:
      - in: path
        name: manager_id
        schema:
          type: integer
        required: true
        description: ID of the APIUserManager to be deleted. The user manager ID can
          be obtained in the '/v2/managers' GET endpoint.
      responses:
        200:
          description: APIUserManager deleted successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager with the given user ID does not exist.
                    code:
                      type: integer
                      example: 1222
              examples:
                APIUserManagerDoesNotExist:
                  value:
                    message: An APIUserManager with the given user ID does not exist.
                    code: 1222
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided APIUserManager could not be deleted. Ensure
                        that both you own this user, and that it is a user manager.
                    code:
                      type: integer
                      example: 1219
              examples:
                APIUserManagerDeleteError:
                  value:
                    message: The provided APIUserManager could not be deleted. Ensure
                      that both you own this user, and that it is a user manager.
                    code: 1219
      security:
      - Bearer: []
  /v2/managers/createAPIUserManager:
    post:
      deprecated: true
      tags:
      - External Management
      summary: ⚫ Create a new APIUserManager for your company.
      description: ' DEPRECATED NAME. Use POST /v2/managers instead. '
      responses:
        '200':
          description: Successful response
  /v2/managers/userAccess:
    post:
      tags:
      - External Management
      summary: ⚫ Create a new Access Entry for one of your APIUserManagers.
      description: " This endpoint is used to create a new Access Entry for one of\
        \ your APIUserManagers. An access entry consists in a relationship between\
        \ an APIUserManager and an APIUser. Creating this entry will give the APIUserManager\
        \ access to the provided APIUser information, with the ability to modify some\
        \ of the information/nutritional goals of the APIUser.\n\n&nbsp;\n\nTo create\
        \ an access entry, both the user ID of the APIUserManager and the APIUser\
        \ are required. Ensure that you are giving access to the proper users, as\
        \ sensitive information of the APIUser might be shared with the APIUserManager. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                manager_id:
                  type: integer
                  description: User ID of the APIUserManager.
                  example: 123
                user_id:
                  type: integer
                  description: User ID of the APIUser.
                  example: 321
              required:
              - manager_id
              - user_id
        description: Parameters to create a new APIUserManager Access Entry.
        required: true
      responses:
        200:
          description: APIUser manager access created successfully!
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager access entry for the given user already
                        exists.
                    code:
                      type: integer
                      example: 1220
              examples:
                APIUserManagerAccessEntryAlreadyExists:
                  value:
                    message: An APIUserManager access entry for the given user already
                      exists.
                    code: 1220
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: APIUser does not exist.
                    code:
                      type: integer
                      example: 1201
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager with the given user ID does not exist.
                    code:
                      type: integer
                      example: 1222
              examples:
                APIUserDoesNotExist:
                  value:
                    message: APIUser does not exist.
                    code: 1201
                APIUserManagerDoesNotExist:
                  value:
                    message: An APIUserManager with the given user ID does not exist.
                    code: 1222
      security:
      - Bearer: []
    delete:
      tags:
      - External Management
      summary: ⚫ Delete an existent Access Entry from one of your APIUserManagers.
      description: " This endpoint is used to delete an Access Entry from one of your\
        \ APIUserManagers. An access entry consists in a relationship between an APIUserManager\
        \ and an APIUser. Deleting the existent entry will revoke the APIUserManager\
        \ access to the provided APIUser information, as well as the ability to modify\
        \ some of the information/nutritional goals of the APIUser.\n\n&nbsp;\n\n\
        To delete an access entry, both the user ID of the APIUserManager and the\
        \ APIUser are required. Ensure that you are revoking access to the proper\
        \ users. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                manager_id:
                  type: integer
                  description: User ID of the APIUserManager.
                  example: 123
                user_id:
                  type: integer
                  description: User ID of the APIUser.
                  example: 321
              required:
              - manager_id
              - user_id
        description: Parameters to delete an existent APIUserManager Access Entry.
        required: true
      responses:
        200:
          description: APIUser manager access deleted successfully!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: APIUser does not exist.
                    code:
                      type: integer
                      example: 1201
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager access entry for the given user does
                        not exist.
                    code:
                      type: integer
                      example: 1221
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager with the given user ID does not exist.
                    code:
                      type: integer
                      example: 1222
              examples:
                APIUserDoesNotExist:
                  value:
                    message: APIUser does not exist.
                    code: 1201
                APIUserManagerAccessDoesNotExist:
                  value:
                    message: An APIUserManager access entry for the given user does
                      not exist.
                    code: 1221
                APIUserManagerDoesNotExist:
                  value:
                    message: An APIUserManager with the given user ID does not exist.
                    code: 1222
      security:
      - Bearer: []
    get:
      tags:
      - External Management
      summary: ⚫🔵 Retrieve all the APIUsers an APIUserManager has access to.
      description: ' This endpoint provides a list with all the IDs of the APIUsers
        an APIUserManager has access to. '
      parameters:
      - in: query
        name: manager_id
        example: 123
        required: false
        schema:
          type: integer
        description: Required field only for APICompanies. ID of the APIUserManager
          to get the information from.
      responses:
        200:
          description: APIUserManagerAccess entries successfully obtained!
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessible_users:
                    type: array
                    description: List of APIUser IDs the APIUserManager has access
                      to
                    items:
                      type: integer
                      description: ID of an APIUser the APIUserManager has access
                        to.
                      example:
                      - 3242
                      - 3243
                      - 3367
                  extra_data:
                    type: object
                    properties:
                      3242:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Will
                          surname:
                            type: string
                            example: Smith
                          username:
                            type: string
                            example: logmeal_user_001
                      3243:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Antonio
                          surname:
                            type: string
                            example: Garcia
                          username:
                            type: string
                            example: logmeal_user_002.
                      3367:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Kim
                          surname:
                            type: string
                            example: Yung
                          username:
                            type: string
                            example: logmeal_user_003
                  result:
                    type: string
                    example: APIUserManagerAccess entries successfully obtained!
        400:
          description: Bad request
        401:
          description: Unauthorized, invalid token.
        403:
          description: Forbidden
        404:
          description: Not found
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: An APIUserManager with the given user ID does not exist.
                    code:
                      type: integer
                      example: 1222
              examples:
                APIUserManagerDoesNotExist:
                  value:
                    message: An APIUserManager with the given user ID does not exist.
                    code: 1222
      security:
      - Bearer: []
  /v2/managers/getUserProfileInfo/{userId}:
    get:
      tags:
      - External Management
      summary: ⚫🔵 Get a user's profile information.
      description: |-
        This endpoint returns the information from the specified APIUser which is accessible by the APIUserManager/company.

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.

        &nbsp;

        This endpoint is the same as '/v2/profile/getUserProfileInfo'.
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      responses:
        200:
          description: The profile information has been successfully obtained
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    example: John
                    description: Name of the user (min length=2, max length=30)
                  surname:
                    type: string
                    example: Smith
                    description: Surname of the user (min length=2, max length=50)
                  language:
                    type: string
                    example: eng
                    enum:
                    - spa
                    - cat
                    - eng
                    - ita
                    - nld
                    - fre
                    - ger
                    - tur
                    - gre
                    - heb
                    description: APIUser's default language. It must be a three-letter
                      ISO 639-2/T code.
                  sex:
                    type: integer
                    example: 2
                    enum:
                    - 0
                    - 1
                    - 2
                    - 9
                    description: Sex of the user. It must be a number, following ISO/IEC
                      5218.
                  weight:
                    type: number
                    example: 72.3
                    description: Weight of the user in Kilograms.
                  height:
                    type: number
                    example: 180.6
                    description: Height of the user in Centimeters.
                  birth:
                    type: string
                    example: '1980-01-01'
                    description: Date of birth of the user, following the format "YYYY-MM-DD"
                  lifestyle:
                    type: string
                    example: sedentary
                    enum:
                    - sedentary
                    - light
                    - moderate
                    - high
                    - very high
                    description: Lifestyle of the user. Possible values are ["sedentary",
                      "light", "moderate", "high", "very high"].
                  country:
                    type: string
                    example: US
                    description: Will be used for refining the food recognition capabilities.
                      A 2-letter country code according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  default_portion_size:
                    type: string
                    example: large
                    enum:
                    - small
                    - medium
                    - large
                    description: Default portion size for the user. Possible values
                      are ["small", "medium", "large"]
                  default_salt_level:
                    type: string
                    example: low
                    enum:
                    - none
                    - low
                    - medium
                    - high
                    description: Default salt level for the user. Possible values
                      are ["none", "low", "medium", "high"]
                  default_sugar_level:
                    type: string
                    example: medium
                    enum:
                    - none
                    - low
                    - medium
                    - high
                  default_oil_level:
                    type: string
                    example: high
                    enum:
                    - none
                    - low
                    - medium
                    - high
                    description: Default oil level for the user. Possible values are
                      ["none", "low", "medium", "high"]
                  reference_sugar:
                    type: integer
                    example: 47
                    description: ID of the sugar ingredient the user usually uses.
                      A list of all possible oil modifiers can be retrieved by calling
                      /dataset/referenceIngredients.
                  reference_oil:
                    type: integer
                    example: 562
                    description: ID of the oil ingredient the user usually uses. A
                      list of all possible oil modifiers can be retrieved by calling
                      /dataset/referenceIngredients.
                  reference_nutrients:
                    type: array
                    items:
                      type: string
                    example:
                    - FAPU
                    - ZN
                    description: Nutrients set as reference (important) for the user
                  timezone:
                    type: string
                    example: Europe/Madrid
                    description: Timezone the user is located at. This requires a
                      TZ database name; you can find them here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                  user_id:
                    type: integer
                    example: 123
                    description: ID of the user to be modified. You must be the owner
                      of the user to do any modification.
                  diet_labels:
                    type: array
                    items:
                      type: string
                      enum:
                      - Balanced
                      - High-Fiber
                      - High-Protein
                      - Low-Carb
                      - Low-Fat
                      - High-Sodium
                      - Low-Sodium
                    example:
                    - Balanced
                    - Low-Carb
                    description: This attribute is optional. These are the diet labels
                      of the user. Possible values are ["Balanced", "High-Fiber",
                      "High-Protein", "Low-Carb", "Low-Fat", "High-Sodium", "Low-Sodium"].
                      The information is used for personalizing the recipe recommendation
                      for the user.
                  food_restrictions:
                    type: array
                    items:
                      type: string
                      enum:
                      - Alcohol-Free
                      - Immuno-Supportive
                      - Celery-Free
                      - Crustacean-Free
                      - Dairy-Free
                      - Egg-Free
                      - Fish-Free
                      - Fodmap-Free
                      - Gluten-Free
                      - Keto-Friendly
                      - Kidney-Friendly
                      - Kosher
                      - Low-Potassium
                      - Lupine-Free
                      - Mustard-Free
                      - Low-Fat-Abs
                      - No-oil-added
                      - Low-Sugar
                      - Paleo
                      - Peanut-Free
                      - Pescatarian
                      - Pork-Free
                      - Red-Meat-Free
                      - Sesame-Free
                      - shellfish-Free
                      - Soy-Free
                      - Sugar-Conscious
                      - Tree-Nut-Free
                      - Vegan
                      - Vegetarian
                      - Wheat-Free
                    example:
                    - Alcohol-Free
                    - Dairy-Free
                    description: This attribute is optional. These are food restrictions
                      and allergies of the user. The information is used for personalizing
                      the recipe recommendation for the user
                  weight_system:
                    type: string
                    enum:
                    - metric
                    - imperial
                    description: Set the user's preferred system for measuring weights.
                  preferred_measure:
                    type: string
                    enum:
                    - weight
                    - cooking_measures
                    - portions
                    description: Set the user's preferred way to see food quantity
                      information.
                  min_max_food_groups:
                    type: object
                    description: |
                      Customize the recommended minimum and/or maximum portions per food group.

                      This field allows setting user-specific dietary goals by specifying optional `min` and/or `max` values for one or more food groups.

                      &nbsp;

                      **Important notes:**

                      - If you want to indicate _no minimum_ for a food group, use `null` as the `min` value. Do **not** use `0`, as that implies a strict minimum intake of 0 portions.

                      - If you want to prevent the user from consuming a food group, set `max` to `0`.

                      &nbsp;

                      **Example:**


                          "min_max_food_groups": {

                              "fish": {"min": null, "max": 1},

                              "red meat": {"min": null, "max": 0},

                              "fruit": {"min": 3, "max": 5},

                          }


                      &nbsp;

                      **Available Food Groups:**

                      - ['Dairy Products', 'Vegetables', 'Grains and Tubers', 'Water', 'Fruit', 'Whole Grain', 'Meat', 'Fish', 'Nuts', 'Legumes', 'Egg', 'Red Meat']
                    additionalProperties:
                      type: object
                      properties:
                        min:
                          type: number
                          nullable: true
                          description: Minimum number of portions (use `null` to specify
                            no minimum).
                        max:
                          type: number
                          nullable: true
                          description: Maximum number of portions (use `0` to restrict
                            intake entirely).
                required:
                - user_id
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/managers/modifyUserProfileInfo/{userId}:
    post:
      tags:
      - External Management
      summary: ⚫🔵 Modify a user's profile information.
      description: "\nThis endpoint allows you to modify the profile and main attributes\
        \ of an end-user (APIUser). This information associated to the user can be\
        \ used for features like improving and customizing the output of the food\
        \ recognition capabilities, personalizing the nutrition recommendations and\
        \ nutrition plans, adapting to the user intake patterns, etc.\n\n&nbsp;\n\n\
        Read the specification of the request body to see the available fields with\
        \ their descriptions.\n\n&nbsp;\n\nThis endpoint is the same as `/v2/profile/modifyUserProfileInfo`\
        \ and `/v2/users/modifyUserProfileInfo`.\n\n&nbsp;\n\n### \U0001F30D Geographic\
        \ and Language Personalization\n\nWe highly recommend including the optional\
        \ fields `country` and `language` in the request body:\n\n- **`country`**\
        \ (ISO 3166‑1 alpha‑2 code, e.g., `US`, `FR`, `JP`):  \n  Providing the country\
        \ allows LogMeal to geographically refine its food recognition capabilities.\
        \  \n  This enables improved detection accuracy for region-specific dishes\
        \ and eating patterns, leading to better personalization in nutrition analysis.\n\
        \n- **`language`** (e.g., `en`, `es`, `fr`):  \n  Setting the preferred language\
        \ ensures that the names of food items, ingredients, nutrients, and other\
        \ elements are returned in the specified language, offering a better user\
        \ experience tailored to each APIUser.\n\nIncluding these parameters increases\
        \ the contextual accuracy and relevance of all subsequent API responses.\n\
        \n&nbsp;\n\n### \U0001F957 Customizing Recommended Food Group Consumption\n\
        \nYou can also use this endpoint to **customize the recommended daily or weekly\
        \ food group portions** for a user by passing the `min_max_food_groups` field.\
        \  \nThis allows setting personalized minimum and/or maximum portion limits\
        \ per food group, which will be taken into account during dietary analysis\
        \ and goal calculations.\n\n&nbsp;\n\nImportant constraints:\n\n- If you want\
        \ to indicate that a food group has **no minimum requirement**, use `null`\
        \ as the `min` value. You must **not** use `0`, since `0` would imply the\
        \ user is expected to consume exactly 0 portions, which is incorrect for `min`.\n\
        \n- If you want to explicitly restrict a user from consuming a food group,\
        \ set the `max` value to `0`. This means that any intake of that group will\
        \ be considered a deviation from the goal.\n"
      parameters:
      - in: path
        name: userId
        schema:
          type: integer
        required: true
        description: ID of the APIUser.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: John
                  description: Name of the user (min length=2, max length=30)
                surname:
                  type: string
                  example: Smith
                  description: Surname of the user (min length=2, max length=50)
                language:
                  type: string
                  example: eng
                  enum:
                  - spa
                  - cat
                  - eng
                  - ita
                  - nld
                  - fre
                  - ger
                  - tur
                  - gre
                  - heb
                  description: APIUser's default language. It must be a three-letter
                    ISO 639-2/T code.
                sex:
                  type: integer
                  example: 2
                  enum:
                  - 0
                  - 1
                  - 2
                  - 9
                  description: Sex of the user. It must be a number, following ISO/IEC
                    5218.
                weight:
                  type: number
                  example: 72.3
                  description: Weight of the user in Kilograms.
                height:
                  type: number
                  example: 180.6
                  description: Height of the user in Centimeters.
                birth:
                  type: string
                  example: '1980-01-01'
                  description: Date of birth of the user, following the format "YYYY-MM-DD"
                lifestyle:
                  type: string
                  example: sedentary
                  enum:
                  - sedentary
                  - light
                  - moderate
                  - high
                  - very high
                  description: Lifestyle of the user. Possible values are ["sedentary",
                    "light", "moderate", "high", "very high"].
                country:
                  type: string
                  example: US
                  description: Will be used for refining the food recognition capabilities.
                    A 2-letter country code according to [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                default_portion_size:
                  type: string
                  example: large
                  enum:
                  - small
                  - medium
                  - large
                  description: Default portion size for the user. Possible values
                    are ["small", "medium", "large"]
                default_salt_level:
                  type: string
                  example: low
                  enum:
                  - none
                  - low
                  - medium
                  - high
                  description: Default salt level for the user. Possible values are
                    ["none", "low", "medium", "high"]
                default_sugar_level:
                  type: string
                  example: medium
                  enum:
                  - none
                  - low
                  - medium
                  - high
                default_oil_level:
                  type: string
                  example: high
                  enum:
                  - none
                  - low
                  - medium
                  - high
                  description: Default oil level for the user. Possible values are
                    ["none", "low", "medium", "high"]
                reference_sugar:
                  type: integer
                  example: 47
                  description: ID of the sugar ingredient the user usually uses. A
                    list of all possible oil modifiers can be retrieved by calling
                    /dataset/referenceIngredients.
                reference_oil:
                  type: integer
                  example: 562
                  description: ID of the oil ingredient the user usually uses. A list
                    of all possible oil modifiers can be retrieved by calling /dataset/referenceIngredients.
                reference_nutrients:
                  type: array
                  items:
                    type: string
                  example:
                  - FAPU
                  - ZN
                  description: Nutrients set as reference (important) for the user
                timezone:
                  type: string
                  example: Europe/Madrid
                  description: Timezone the user is located at. This requires a TZ
                    database name; you can find them here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                user_id:
                  type: integer
                  example: 123
                  description: ID of the user to be modified. You must be the owner
                    of the user to do any modification.
                diet_labels:
                  type: array
                  items:
                    type: string
                    enum:
                    - Balanced
                    - High-Fiber
                    - High-Protein
                    - Low-Carb
                    - Low-Fat
                    - High-Sodium
                    - Low-Sodium
                  example:
                  - Balanced
                  - Low-Carb
                  description: This attribute is optional. These are the diet labels
                    of the user. Possible values are ["Balanced", "High-Fiber", "High-Protein",
                    "Low-Carb", "Low-Fat", "High-Sodium", "Low-Sodium"]. The information
                    is used for personalizing the recipe recommendation for the user.
                food_restrictions:
                  type: array
                  items:
                    type: string
                    enum:
                    - Alcohol-Free
                    - Immuno-Supportive
                    - Celery-Free
                    - Crustacean-Free
                    - Dairy-Free
                    - Egg-Free
                    - Fish-Free
                    - Fodmap-Free
                    - Gluten-Free
                    - Keto-Friendly
                    - Kidney-Friendly
                    - Kosher
                    - Low-Potassium
                    - Lupine-Free
                    - Mustard-Free
                    - Low-Fat-Abs
                    - No-oil-added
                    - Low-Sugar
                    - Paleo
                    - Peanut-Free
                    - Pescatarian
                    - Pork-Free
                    - Red-Meat-Free
                    - Sesame-Free
                    - shellfish-Free
                    - Soy-Free
                    - Sugar-Conscious
                    - Tree-Nut-Free
                    - Vegan
                    - Vegetarian
                    - Wheat-Free
                  example:
                  - Alcohol-Free
                  - Dairy-Free
                  description: This attribute is optional. These are food restrictions
                    and allergies of the user. The information is used for personalizing
                    the recipe recommendation for the user
                weight_system:
                  type: string
                  enum:
                  - metric
                  - imperial
                  description: Set the user's preferred system for measuring weights.
                preferred_measure:
                  type: string
                  enum:
                  - weight
                  - cooking_measures
                  - portions
                  description: Set the user's preferred way to see food quantity information.
                min_max_food_groups:
                  type: object
                  description: |
                    Customize the recommended minimum and/or maximum portions per food group.

                    This field allows setting user-specific dietary goals by specifying optional `min` and/or `max` values for one or more food groups.

                    &nbsp;

                    **Important notes:**

                    - If you want to indicate _no minimum_ for a food group, use `null` as the `min` value. Do **not** use `0`, as that implies a strict minimum intake of 0 portions.

                    - If you want to prevent the user from consuming a food group, set `max` to `0`.

                    &nbsp;

                    **Example:**


                        "min_max_food_groups": {

                            "fish": {"min": null, "max": 1},

                            "red meat": {"min": null, "max": 0},

                            "fruit": {"min": 3, "max": 5},

                        }


                    &nbsp;

                    **Available Food Groups:**

                    - ['Dairy Products', 'Vegetables', 'Grains and Tubers', 'Water', 'Fruit', 'Whole Grain', 'Meat', 'Fish', 'Nuts', 'Legumes', 'Egg', 'Red Meat']
                  additionalProperties:
                    type: object
                    properties:
                      min:
                        type: number
                        nullable: true
                        description: Minimum number of portions (use `null` to specify
                          no minimum).
                      max:
                        type: number
                        nullable: true
                        description: Maximum number of portions (use `0` to restrict
                          intake entirely).
              required:
              - user_id
        description: Parameters to be modified, all fields are optional except 'user_id'.
          Null values will be ignored.
        required: true
      responses:
        '200':
          description: The profile information has been successfully modified!
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    example: The profile information has been successfully modified!
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Sex is not valid:
                  value:
                    message: The provided sex value is not valid.
                    code: 1205
                Lifestyle is not valid:
                  value:
                    message: The provided lifestlye value is not valid.
                    code: 1214
                Salt level is not valid:
                  value:
                    message: The provided salt level value is not valid.
                    code: 1215
                Sugar level is not valid:
                  value:
                    message: The provided sugar level value is not valid.
                    code: 1216
                Portion size is not valid:
                  value:
                    message: The provided portion size value is not valid.
                    code: 1217
                Birth format not valid:
                  value:
                    message: The provided birth value is wrong. Follow the format
                      'YYYY-MM-DD'
                    code: 1218
                Country is not valid:
                  value:
                    message: The provided country is not valid, check the valid 2-letter
                      country codes from ISO 3166-1 https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.
                    code: 1229
                diet label not valid:
                  value:
                    message: The provided diet label value is not valid
                    code: 1607
                food restriction not valid:
                  value:
                    message: The provided food restriction value is not valid'
                    code: 1608
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/managers/login:
    post:
      tags:
      - External Management
      summary: 🔵 Login validation credentials for APIUserManagers.
      description: " This endpoint is used to validate a pair of user and password\
        \ values assigned to a user of type APIUserManager. After the pair validation\
        \ is performed the token of the user is returned together with a set of useful\
        \ profile information.\n\n&nbsp;\n\nNote that this endpoint does NOT require\
        \ a token to be called. "
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: Unique username or email associated to the APIUserManager.
                  example: myemail@gmail.com
                password:
                  type: string
                  description: Password associated to the APIUserManager.
                  example: pass321
              required:
              - manager_id
              - user_id
        description: Credentials to validate an APIUserManager.
        required: true
      responses:
        200:
          description: APIUserManager login successful!
          content:
            application/json:
              schema:
                type: object
                properties:
                  email:
                    type: string
                    example: myemail@gmail.com
                  language:
                    type: string
                    example: eng
                    description: Three-letter 639-2/T code describing the language
                      chosen by the APIUserManager.
                  username:
                    type: string
                    example: apiusermanager_username123
                  login_web:
                    type: object
                    properties:
                      token:
                        type: string
                        example: 7398gh394thg934
                        description: Unique token associated to the logged in APIUserManager.
                          Required for calling all the endpoints of type APIUserManager.
                      message:
                        type: string
                        example: Successfully logged in.
                      status:
                        type: string
                        example: success
        400:
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                oneOf:
                - type: object
                  properties:
                    message:
                      type: string
                      example: The provided credentials are not valid.
                    code:
                      type: integer
                      example: 821
              examples:
                APIUserManagerAccessEntryAlreadyExists:
                  value:
                    message: The provided credentials are not valid.
                    code: 821
  /v2/score/{imageId}/nutriScore:
    get:
      tags:
      - Intake Variety Score and Nutri-Scores
      summary: 🔴 Get Nutri-Score for an image.
      description: |-
        This endpoint returns the total Nutri-Score for an image corresponding to the provided image id. The image id should be for one of the images that the APIUser has already uploaded to the LogMeal API as part of any queries related to food recognition or nutritional information analysis. The score calculation takes into consideration all dishes appearing in the image and gets the average of the Nutri-Scores per 100g of each dish.

        &nbsp;

        The range of values for the standardized Nutri-Score is between 0 and 100 with 100 being the best score possible. This is a rescaled and standardized version of the original Nutri-Score where the values are between -15 to 40. Like the original score scale, this rescaled score range can be represented as 5 categories namely A,B,C,D,E.


        Values    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Category

        &nbsp;&nbsp; 0 - 36      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;   E

        &nbsp;&nbsp; 37 - 52     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; D

        &nbsp;&nbsp; 53 - 67     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  C

        &nbsp;&nbsp; 68 - 72     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; B

        &nbsp;&nbsp; 73 - 100    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   A


        &nbsp;
        The Nutri-Score values provided can be null in case a dish name was confirmed in the endpoint /confirm/dish that does not belong to the logmeal source, thus we do not have nutritional information for it.

        &nbsp;

        For more information about the Nutri-Score [visit this link](https://nutriscore.colruytgroup.com/colruytgroup/en/about-nutri-score).

        &nbsp;
        Read the specification of the response body to see the available fields with their descriptions.
      parameters:
      - in: path
        name: imageId
        schema:
          type: integer
        required: true
        description: Id of the image
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  dish_nutriScore_category:
                    type: string
                    example: A
                    enum:
                    - A
                    - B
                    - C
                    - D
                    - E
                    description: Nutri-Score category of the dishes present in the
                      provided image. Possible categories are A,B,C,D,E. A represents
                      the highest range of Nutri-Score whereas E represents the lowest.
                  dish_nutriScore_standardized:
                    type: integer
                    example: 70
                    description: Standardized Nutri-Score value for the dishes present
                      in the provided image. The range of value is between 0 and 100
                      with 100 being the best and 0 the worst score possible.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/score/{date}/meal/{occasion}/nutriScore:
    get:
      tags:
      - Intake Variety Score and Nutri-Scores
      summary: 🔴 Get total Nutri-Score for specific date and occasion. ⏱
      description: |-
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint returns the information about the Nutri-Score for a provided date and occasion based on the APIUser's food intake on that day. This score is the average Nutri-Score of all the images for the given day and occasion. For more information about Nutri-Score of images, see endpoint '/v2/score/{imageId}/nutriScore'.

        &nbsp;

        For more information about the Nutri-Score [visit this link](https://nutriscore.colruytgroup.com/colruytgroup/en/about-nutri-score)

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.
      parameters:
      - in: path
        name: occasion
        schema:
          type: string
        required: true
        example: breakfast
        description: Occasion for which the Nutri-Score needs to be calculated. Possible
          values are "breakfast", "lunch", "dinner" or "snack".
      - in: path
        name: date
        schema:
          type: string
        required: true
        example: '2021-10-01'
        description: Date for which the Nutri-Score needs to be calculated. following
          the format "YYYY-MM-DD"
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  occasion_nutriScore_category:
                    type: string
                    example: B
                    enum:
                    - A
                    - B
                    - C
                    - D
                    - E
                    description: Nutri-Score category for the day and occasion. Possible
                      categories are A,B,C,D,E. A represents the highest range of
                      Nutri-Score whereas E represents the lowest.
                  occasion_nutriScore_standardized:
                    type: integer
                    example: 50
                    description: Standardized Nutri-Score value for the day and occasion.
                      The range of value is between 0 and 100 with 100 being the best
                      and 0 the worst score possible.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/score/{date}/meal/nutriScore:
    get:
      tags:
      - Intake Variety Score and Nutri-Scores
      summary: 🔴 Get total Nutri-Score for a specific date. ⏱
      description: |-
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint returns the information about the Nutri-Score for a provided date based on the APIUser's food intake on that day. This score is the average Nutri-Score of all the images for the given day. For more information about Nutri-Score of images, see endpoint '/v2/score/{imageId}/nutriScore'.

        &nbsp;

        For more information about the Nutri-Score [visit this link](https://nutriscore.colruytgroup.com/colruytgroup/en/about-nutri-score)

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.
      parameters:
      - in: path
        name: date
        schema:
          type: string
        required: true
        example: '2021-10-01'
        description: Date for which the Nutri-Score needs to be calculated. following
          the format "YYYY-MM-DD"
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  day_nutriScore_category:
                    type: string
                    example: A
                    enum:
                    - A
                    - B
                    - C
                    - D
                    - E
                    description: Nutri-Score category for the provided day. Possible
                      categories are A,B,C,D,E. A represents the highest range of
                      Nutri-Score whereas E represents the lowest.
                  day_nutriScore_standardized:
                    type: integer
                    example: 70
                    description: Standardized Nutri-Score value for the day and occasion.
                      The range of value is between 0 and 100 with 100 being the best
                      and 0 the worst score possible.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/score/variety:
    get:
      tags:
      - Intake Variety Score and Nutri-Scores
      summary: 🔴 Get Variety Score for a provided time period and an occasion (optional).
        ⏱
      description: |-
        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint returns the information about the 'Variety Score' for a duration of time and occasion (if provided) based on the APIUser's food intake over that time.

        &nbsp;

        The 'Variety Score' is a method of intake analysis for a measurement of how varied a user's diet is. This score considers two main aspects of the user diet. First one is the variety element (e.g. how many different types of food groups the user diet has covered) and the second one is the nutritional scoring of dishes belonging to these food groups. The nutritional scoring is optional and only considered on user requests. The more varied the diet for certain user is, the higher this score will be. If the nutritional scoring is considered, it works as a weighing term for the variety of food groups consumed. The range of the value for the variety score is between 0-100 with 100 being the best score possible.


        <!-- &nbsp;-->

        <!-- For instance, if a user consumed a dish from the food group 'dairy_products' and the standardized Nutri-Score(between 0 and 100) (Given nutritional scoring needs to be considered) of that dish is 60, then final weight of that food group in the variety calculation will be 1*60 = 60.-->

        &nbsp;

        For more information about the Nutri-Score [visit this link](https://nutriscore.colruytgroup.com/colruytgroup/en/about-nutri-score)

        &nbsp;

        Our customized 'Variety Score' is also inspired by the 'Dietary Variety Score' that was proposed and clinically tested in this scientific study: Drewnowski A, Renderson SA, Driscoll A, Rolls BJ. The Dietary Variety Score: assessing diet quality in healthy young and older adults. Journal of the American Dietetic Association. 1997 Mar 1;97(3):266-71.

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.
      parameters:
      - in: query
        name: date_from
        schema:
          type: string
        required: true
        example: '2021-10-01'
        description: Start date of the period of time for which the user data needs
          to be considered for the score calculation, following the format "YYYY-MM-DD"
      - in: query
        name: date_to
        schema:
          type: string
        required: true
        example: '2021-10-06'
        description: Finish date of the period of time for which the user data needs
          to be considered for the score calculation, following the format "YYYY-MM-DD"
      - in: query
        name: occasion
        schema:
          type: string
        example: breakfast
        description: Occasion for which the recipes need to be recommended. Possible
          values are "breakfast", "lunch", "dinner"  or "snack". If not provided,
          all occasions available are used.
      - in: query
        required: true
        name: score_type
        schema:
          type: string
          enum:
          - Nutri-Score
          - None
        example: Nutri-Score
        description: The nutritional scoring method that needs to be considered along
          with the food groups variety aspect for the final score. Currently available
          type is "Nutri-Score". if not provided, the final score will only consider
          the food group varieties. If choosing "None" then only the variety of the
          consumed dishes will be considered for generating recommendations.
      - in: query
        name: foodGroups
        schema:
          type: array
          items:
            type: integer
        example:
        - 6
        - 4
        description: 'Food group ids used for variety score calculation. If not provided,
          all available food groups in the database are used. If ''occasion'' is provided
          a subset of food groups usually consumed for the selected occasion will
          be used instead. Available food groups in the LogMeal database can be found
          in endpoint ''/v2/dataset/foodgroups''. '
      responses:
        '200':
          description: The profile information has been successfully obtained
          content:
            application/json:
              schema:
                type: object
                properties:
                  variety_score:
                    type: number
                    format: float
                    example: 62.5
                    description: Average Variety Score for the provided time range
                      and occasion.
                  score_per_food_group:
                    type: object
                    example:
                      '1': 100.0
                      '3': 100.0
                      '6': 100.0
                      '8': 0
                      '10': 100.0
                      '12': 0
                      '15': 100.0
                      '16': 0
                    properties:
                      food_group_id:
                        description: Food group id as key and score as value.
                        type: number
                        format: float
                        example: 40.0
                    description: Standardized score value for each food group.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/recommend/dish:
    get:
      tags:
      - Recipe and Dish Recommendations
      summary: 🔴 Get dish recommendation for an APIUser. ⏱⭐
      description: |2-
          <span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span> <strong>Consumes your monthly credits. Limited amount of monthly calls, exceeding calls will be charged as extras.</strong>

        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint returns a list of dish ids as a recommendation after analysing the APIUser's intakes over the last days. The returned dishes belong to the LogMeal database, see endpoint '/v2/dataset/dishes'.

        &nbsp;

        The recommendation process first analyses the nutritional information of the APIUser's intakes over the last days and calculates a measurement named 'Variety Score'. For more information about this score, check endpoint '/v2/score/variety'. After this step, a list of food groups is calculated that should optimize this score and finally optimal dishes belonging to these food groups are recommended as the final output.

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.
      parameters:
      - in: query
        required: true
        name: score_type
        schema:
          type: string
          enum:
          - Nutri-Score
          - None
        example: Nutri-Score
        description: The nutritional scoring method that needs to be considered along
          with the food groups variety aspect for the final score. Currently available
          type is "Nutri-Score". if not provided, the final score will only consider
          the food group varieties. If choosing "None" then only the variety of the
          consumed dishes will be considered for generating recommendations.
      - in: query
        name: date_from
        schema:
          type: string
        example: '2021-10-01'
        description: Start date of the period of time for which the user data needs
          to be considered for the recommendation, following the format "YYYY-MM-DD".
          If this parameter is not provided, then a default value of 10 days to the
          past will be used.
      - in: query
        name: occasion
        schema:
          type: string
        example: breakfast
        description: Occasion for which the dishes need to be recommended. Possible
          values are "breakfast", "lunch", "dinner"  or "snack". If not provided,
          all available occasions in the database are used.
      - in: query
        name: foodGroups
        schema:
          type: array
          items:
            type: integer
        example:
        - 6
        - 4
        description: 'Food group ids used for variety score analysis for optimal recommendation.
          If this parameter is not provided, a pre fixed list of food groups for the
          given occasion is used. If occasion is not provided, all available food
          groups in the database are used. If ''occasion'' is provided a subset of
          food groups usually consumed for the selected occasion will be used instead.
          Available food groups in the LogMeal database can be queried by the endpoint
          ''/v2/dataset/foodgroups''. '
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  recommended_foodClass_ids:
                    type: array
                    items:
                      type: integer
                    example:
                    - 2
                    - 3
                    - 5
                    description: Food class ids of the recommended dishes.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/recommend/recipe:
    get:
      tags:
      - Recipe and Dish Recommendations
      summary: 🔴 Get recipes recommendation for an APIUser. ⏱⭐
      description: |2-
         <span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span> <strong>Consumes your monthly credits. Limited amount of monthly calls, exceeding calls will be charged as extras.</strong>

        <span style='color:purple; font-size: 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per second.</strong>

        &nbsp;

        This endpoint returns a set of recommended recipes for an APIUser based on the intakes reported. The recipes recommended contain all the detailed information for cooking the dish with a similar format of a food recipe book.

        &nbsp;

        The recommendation process consists of three main steps:
        1. First, it tries to get the suitable dishes that the users should eat to improve the 'Variety Score' of their diet. For more information about this score, check endpoint '/v2/score/variety' (alternatively, a list of preferred dishes can be provided as a parameter to this endpoint). If not provided, the 'v2/recommend/dish' endpoint is used internally to get the recommended dishes.
        2. Once the dishes are obtained, a list of pre-stored recipes for these dishes are gathered.
        3. In order to improve the personalisation of this recommendation process, a final filtering method is carried out where APIUser's diet preferences and food restrictions are taken into consideration. So for better results, it is advised to add these user attributes to the API via the '/v2/profile/modifyUserProfileInfo' endpoint.

        &nbsp;

        Read the specification of the response body to see the available fields with their descriptions.
      parameters:
      - in: query
        required: true
        name: score_type
        schema:
          type: string
          enum:
          - Nutri-Score
          - None
        example: Nutri-Score
        description: The nutritional scoring method that needs to be considered along
          with the food groups variety aspect for the final score. Currently available
          type is "Nutri-Score". if not provided, the final score will only consider
          the food group varieties. If choosing "None" then only the variety of the
          consumed dishes will be considered for generating recommendations.
      - in: query
        required: true
        name: num_of_recipes
        schema:
          type: integer
        example: 5
        description: Number of recipes to be recommended. If not provided, a default
          value of 5 is used.
      - in: query
        required: true
        name: occasion
        schema:
          type: string
        example: breakfast
        description: Occasion for which the recipes need to be recommended. Possible
          values are "breakfast", "lunch", "dinner"  or "snack". If not provided,
          all available occasions in the database are used.
      - in: query
        required: true
        name: date_from
        schema:
          type: string
        example: '2021-10-01'
        description: Start date of the period of time for which the user data needs
          to be considered for the recommendation, following the format "YYYY-MM-DD".
          If this parameter is not provided, then a default value of 10 days to the
          past will be used.
      - in: query
        required: true
        name: food_class_ids
        schema:
          type: array
          items:
            type: integer
        example:
        - 6
        - 4
        description: Food class ids of the dishes for which the recipes need to be
          recommended. If not provided, these are obtained internally by calling the
          /v2/recommend/dish endpoint.
      - in: query
        required: true
        name: foodGroups
        schema:
          type: array
          items:
            type: integer
        example:
        - 6
        - 4
        description: 'Food group ids used for variety score analysis for optimal recommendation.
          If this parameter is not provided, a pre fixed list of food groups for the
          given occasion is used. If occasion is not provided, all available food
          groups in the database are used. If ''occasion'' is provided a subset of
          food groups usually consumed for the selected occasion will be used instead.
          Available food groups in the LogMeal database can be queried by the endpoint
          ''/v2/dataset/foodgroups''. '
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  recommended_recipes:
                    description: 'Array containing the results of the recipe recommendation
                      process. The length of the array is equal to the number of recipes
                      recommended by the recommendation process. Each entry contains
                      information about one recipe. These recipes are different from
                      custom recipes as well the recipes associated with ingredients
                      and are only recommended to user with access to ''Recommend''
                      plan. '
                    type: array
                    items:
                      description: Object containing the information of the each recipe
                        recommended.
                      type: object
                      properties:
                        food_class_id:
                          description: Class id of the food.
                          type: integer
                          example: 45
                        recipe_name:
                          description: Name of the recipe
                          type: string
                          example: chicken tikka masala
                        image_url:
                          description: URL of the dish image.
                          type: string
                          example: https://www.edamam.com/food-img/205/205e6bf2399b85d34741892ef91cc603.jpg
                        ingredients:
                          type: array
                          items:
                            type: string
                            example:
                            - 1 clove garlic
                            - ' broccoli'
                          description: This attribute is optional. These are food
                            restrictions and allergies of the user. The information
                            is used for personalising the recipe recommendation for
                            user
                        recipe_url:
                          description: URL of the website where the recipe can be
                            found.
                          type: string
                          example: http://www.seriouseats.com/recipes/2012/07/spring-rolls-with-pork-and-vegetable-medley.html
                        recipe_steps:
                          description: Array including the steps of the recipe.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Id of the step starting from 1 to higher.
                                  1 means the first step of the recipe.
                                type: integer
                                example: 1
                              step:
                                description: Recipe step
                                type: string
                                example: Put it in the oven
                        meal_type:
                          type: string
                          example: breakfast
                          description: The occasion or type of the meal.
                        cuisine_type:
                          type: string
                          example: american
                          description: The type of cuisine based on region.
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
        401:
          description: Unauthorized, invalid token
        404:
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                User does not exist:
                  value:
                    message: This User does not exist.
                    code: 1210
      security:
      - Bearer: []
  /v2/image/segmentation/complete/quantity:
    post:
      tags:
      - Food Quantity Detection
      summary: 🔴 Multiple Food Dishes Segmentation ⏱ Detects every food item on the
        image, recognises it and then automatically estimates the food quantity present
        in it.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nIt applies the same food segmentation\
        \ procedure as in /image/segmentation/complete and additionally it automatically\
        \ calculates the food quantity for each of the detected regions. \n\n\n&nbsp;\n\
        \n**Geographic Personalization**: we recommend setting the `country` parameter\
        \ associated to the end-user (APIUser) before applying any food recognition/segmentation\
        \ call. See any `/modifyUserProfileInfo` endpoint for additional details.\n\
        \n&nbsp;\n\n\n**IMPORTANT:** the food quantity procedure runs in background,\
        \ this means that immediately after this food recognition request\nfinishes,\
        \ the food quantity will not be calculated yet. If you use any endpoint that\
        \ retrieves ingredients, nutritional information\nor any other intake-related\
        \ data, standard food quantities will be presented. After some seconds, immediately\
        \ when the quantity\nestimation ends, all values for all endpoint calls will\
        \ be automatically updated. You can get a status of the quantity estimation\
        \ \nprocedure by calling either GET /intake or GET /history/getIntakesList\
        \ and checking the attribute 'quantity_prediction_status'.\n\n\n&nbsp;\n\n\
        \nAdditionally, any endpoint and internal procedure that is based on food\
        \ quantity uses by default the automatically estimated food quantity (e.g.\
        \ ingredients definition or nutritional information estimation).\nNote that\
        \ the segmentation_results might not be directly applicable to the uploaded\
        \ \nimage size. The segmentation pixel values are scaled depending on the\
        \ 'processed_image_size' values provided \nfor each of the images (the images\
        \ might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n\nIn order to compute the food quantity\
        \ a video sequence has to be provided. The video must be extracted using the\
        \ LogMeal SDK, that you will have to integrate into your App accordingly.\
        \ Two SDKs are available, the [iOS SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios)\
        \ and the [Android SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\
        \ \n\n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint has two parameters\
        \ in the request body ('image' and 'sequence') which are in the 'multipart/form-data',\
        \ and the remaining parameters are in 'application/json'. You can check it\
        \ from the dropdown from the right corner.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                main_rgb_idx:
                  description: Index of the frame in the video that will be used for
                    segmentation, extracted with LogMeal SDK
                  type: integer
                  example: 0
                camera_pose:
                  description: Dictionary of lists, where each lists describes the
                    camera pose of one video frame, extracted using the LogMeal  SDK.
                  type: object
                  properties:
                    0:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                    1:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                version:
                  description: Version of the image provided. This depends on the
                    SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - cam_focal_length
              - cam_principal_point
              - main_rgb_idx
              - camera_pose
              - version
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                sequence:
                  description: Video sequence extracted either with iOS or Android
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
              - sequence
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  occasion_info:
                    description: Contains information about the occasion.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Occasion id. Null if default occasion
                          type: integer
                          example: 45
                        translation:
                          description: Translation to the language of the request
                            if available. Not available with default occasions.
                          type: string
                          example: cena
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    imageId: 1365065
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/segmentation/complete/quantity/{model_version}:
    post:
      tags:
      - Food Quantity Detection
      summary: 🔴 Multiple Food Dishes Segmentation ⏱ Detects every food item on the
        image, recognises it and then automatically estimates the food quantity present
        in it.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nIt applies the same food segmentation\
        \ procedure as in /image/segmentation/complete and additionally it automatically\
        \ calculates the food quantity for each of the detected regions. \n\n\n&nbsp;\n\
        \n**Geographic Personalization**: we recommend setting the `country` parameter\
        \ associated to the end-user (APIUser) before applying any food recognition/segmentation\
        \ call. See any `/modifyUserProfileInfo` endpoint for additional details.\n\
        \n&nbsp;\n\n\n**IMPORTANT:** the food quantity procedure runs in background,\
        \ this means that immediately after this food recognition request\nfinishes,\
        \ the food quantity will not be calculated yet. If you use any endpoint that\
        \ retrieves ingredients, nutritional information\nor any other intake-related\
        \ data, standard food quantities will be presented. After some seconds, immediately\
        \ when the quantity\nestimation ends, all values for all endpoint calls will\
        \ be automatically updated. You can get a status of the quantity estimation\
        \ \nprocedure by calling either GET /intake or GET /history/getIntakesList\
        \ and checking the attribute 'quantity_prediction_status'.\n\n\n&nbsp;\n\n\
        \nAdditionally, any endpoint and internal procedure that is based on food\
        \ quantity uses by default the automatically estimated food quantity (e.g.\
        \ ingredients definition or nutritional information estimation).\nNote that\
        \ the segmentation_results might not be directly applicable to the uploaded\
        \ \nimage size. The segmentation pixel values are scaled depending on the\
        \ 'processed_image_size' values provided \nfor each of the images (the images\
        \ might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n\nIn order to compute the food quantity\
        \ a video sequence has to be provided. The video must be extracted using the\
        \ LogMeal SDK, that you will have to integrate into your App accordingly.\
        \ Two SDKs are available, the [iOS SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios)\
        \ and the [Android SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\
        \ \n\n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint has two parameters\
        \ in the request body ('image' and 'sequence') which are in the 'multipart/form-data',\
        \ and the remaining parameters are in 'application/json'. You can check it\
        \ from the dropdown from the right corner.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                main_rgb_idx:
                  description: Index of the frame in the video that will be used for
                    segmentation, extracted with LogMeal SDK
                  type: integer
                  example: 0
                camera_pose:
                  description: Dictionary of lists, where each lists describes the
                    camera pose of one video frame, extracted using the LogMeal  SDK.
                  type: object
                  properties:
                    0:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                    1:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                version:
                  description: Version of the image provided. This depends on the
                    SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - cam_focal_length
              - cam_principal_point
              - main_rgb_idx
              - camera_pose
              - version
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                sequence:
                  description: Video sequence extracted either with iOS or Android
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
              - sequence
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  occasion_info:
                    description: Contains information about the occasion.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Occasion id. Null if default occasion
                          type: integer
                          example: 45
                        translation:
                          description: Translation to the language of the request
                            if available. Not available with default occasions.
                          type: string
                          example: cena
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    imageId: 1365065
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/segmentation/complete/quantity_depth:
    post:
      deprecated: true
      tags:
      - Food Quantity Detection
      summary: 🔴 Multiple Food Dishes Segmentation ⏱⭐ Detects every food item on the
        image, recognises it and then automatically detects the food quantity present
        in it.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nIt applies the same food segmentation\
        \ procedure as in /image/segmentation/complete and additionally it automatically\
        \ calculates the food quantity for each of the detected regions. \nThe only\
        \ output difference in this endpoint is that an additional attribute named\
        \ 'serving_size' is provided for each of the elements inside the 'segmentation_results'\
        \ list.\n\n&nbsp;\n\n**Geographic Personalization**: we recommend setting\
        \ the `country` parameter associated to the end-user (APIUser) before applying\
        \ any food recognition/segmentation call. See any `/modifyUserProfileInfo`\
        \ endpoint for additional details.\n\n&nbsp;\n\n\nAdditionally, any endpoint\
        \ and internal procedure that is based on food quantity uses by default the\
        \ automatically estimated food quantity (e.g. ingredients definition or nutritional\
        \ information estimation).\nNote that the segmentation_results might not be\
        \ directly applicable to the uploaded \nimage size. The segmentation pixel\
        \ values are scaled depending on the 'processed_image_size' values provided\
        \ \nfor each of the images (the images might be sometimes resized depending\
        \ on the needs of the food recognition \nalgorithms used).\n\n\n&nbsp;\n\n\
        \nIn order to compute the food quantity a depth image has to be provided.\
        \ The depth image must be extracted using the LogMeal Depth SDK, that you\
        \ will have to integrate into your App accordingly. Two SDKs are available,\
        \ the [iOS Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios) and\
        \ the [Android Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\
        \ \n\n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint has two parameters\
        \ in the request body ('image' and 'depth') which are in the 'multipart/form-data',\
        \ and the remaining parameters are in 'application/json'. You can check it\
        \ from the dropdown from the right corner.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                depth_image_size:
                  description: Size in pixels of the depth image extracted with LogMeal
                    SDK.
                  type: object
                  properties:
                    width:
                      type: integer
                      example: 160
                    height:
                      type: integer
                      example: 90
                camera_pose:
                  description: List of floats that describe the camera pose extracted
                    using the LogMeal Depth SDK.
                  type: array
                  items:
                    type: number
                    format: float
                  example:
                  - -0.7825612
                  - -0.06980409
                  - 0.61864835
                  - 0
                  - 0.43548357
                  - 0.64876264
                  - 0.6240682
                  - 0
                  - -0.44491845
                  - 0.75778264
                  - -0.47729802
                  - 0
                  - -0.30382055
                  - -0.17176536
                  - -0.7768527
                  - 1
                depth_version:
                  description: Version of the depth image provided. This depends on
                    the SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - cam_focal_length
              - cam_principal_point
              - depth_image_size
              - camera_pose
              - depth_version
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                depth:
                  description: Depth image extracted either with iOS or Android Depth
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
              - depth
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  occasion_info:
                    description: Contains information about the occasion.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Occasion id. Null if default occasion
                          type: integer
                          example: 45
                        translation:
                          description: Translation to the language of the request
                            if available. Not available with default occasions.
                          type: string
                          example: cena
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    imageId: 1365065
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/image/segmentation/complete/quantity_depth/{model_version}:
    post:
      deprecated: true
      tags:
      - Food Quantity Detection
      summary: 🔴 Multiple Food Dishes Segmentation ⏱⭐ Detects every food item on the
        image, recognises it and then automatically detects the food quantity present
        in it.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nIt applies the same food segmentation\
        \ procedure as in /image/segmentation/complete and additionally it automatically\
        \ calculates the food quantity for each of the detected regions. \nThe only\
        \ output difference in this endpoint is that an additional attribute named\
        \ 'serving_size' is provided for each of the elements inside the 'segmentation_results'\
        \ list.\n\n&nbsp;\n\n**Geographic Personalization**: we recommend setting\
        \ the `country` parameter associated to the end-user (APIUser) before applying\
        \ any food recognition/segmentation call. See any `/modifyUserProfileInfo`\
        \ endpoint for additional details.\n\n&nbsp;\n\n\nAdditionally, any endpoint\
        \ and internal procedure that is based on food quantity uses by default the\
        \ automatically estimated food quantity (e.g. ingredients definition or nutritional\
        \ information estimation).\nNote that the segmentation_results might not be\
        \ directly applicable to the uploaded \nimage size. The segmentation pixel\
        \ values are scaled depending on the 'processed_image_size' values provided\
        \ \nfor each of the images (the images might be sometimes resized depending\
        \ on the needs of the food recognition \nalgorithms used).\n\n\n&nbsp;\n\n\
        \nIn order to compute the food quantity a depth image has to be provided.\
        \ The depth image must be extracted using the LogMeal Depth SDK, that you\
        \ will have to integrate into your App accordingly. Two SDKs are available,\
        \ the [iOS Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios) and\
        \ the [Android Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\
        \ \n\n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint has two parameters\
        \ in the request body ('image' and 'depth') which are in the 'multipart/form-data',\
        \ and the remaining parameters are in 'application/json'. You can check it\
        \ from the dropdown from the right corner.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                depth_image_size:
                  description: Size in pixels of the depth image extracted with LogMeal
                    SDK.
                  type: object
                  properties:
                    width:
                      type: integer
                      example: 160
                    height:
                      type: integer
                      example: 90
                camera_pose:
                  description: List of floats that describe the camera pose extracted
                    using the LogMeal Depth SDK.
                  type: array
                  items:
                    type: number
                    format: float
                  example:
                  - -0.7825612
                  - -0.06980409
                  - 0.61864835
                  - 0
                  - 0.43548357
                  - 0.64876264
                  - 0.6240682
                  - 0
                  - -0.44491845
                  - 0.75778264
                  - -0.47729802
                  - 0
                  - -0.30382055
                  - -0.17176536
                  - -0.7768527
                  - 1
                depth_version:
                  description: Version of the depth image provided. This depends on
                    the SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - cam_focal_length
              - cam_principal_point
              - depth_image_size
              - camera_pose
              - depth_version
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                depth:
                  description: Depth image extracted either with iOS or Android Depth
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
              - depth
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  imageId:
                    type: integer
                    example: 3
                    description: ID of the uploaded image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  occasion_info:
                    description: Contains information about the occasion.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Occasion id. Null if default occasion
                          type: integer
                          example: 45
                        translation:
                          description: Translation to the language of the request
                            if available. Not available with default occasions.
                          type: string
                          example: cena
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    imageId: 1365065
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/waste/detection/intake:
    post:
      tags:
      - Food Waste Detection
      summary: 🔴 Food Waste Intake Detection ⏱⭐ Detects the leftovers or remaining
        food on a dish/intake.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nThis endpoint must be called attached\
        \ to an already existent food segmentation prediction (Pre-consumption image).\n\
        It applies the same food segmentation procedure as in /image/segmentation/complete\
        \ but on an image that contains leftovers.\n\n\n&nbsp;\n\n\nOptionally, the\
        \ endpoint allows providing a video sequence in the same format as /image/segmentation/complete/quantity\
        \ to increase the leftovers estimation precision. The video sequence must\
        \ be extracted using the LogMeal SDK, that you will have to integrate into\
        \ your App accordingly. Two SDKs are available, the [iOS SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios)\
        \ and the [Android SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\n\
        If a video sequence is provided an additional attribute named 'serving_size'\
        \ is provided for each and every one of the elements inside the 'segmentation_results'\
        \ list.\nNote that the segmentation_results might not be directly applicable\
        \ to the uploaded \nimage size. The segmentation pixel values are scaled depending\
        \ on the 'processed_image_size' values provided \nfor each of the images (the\
        \ images might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n\n**IMPORTANT:** the food quantity procedure\
        \ runs in background, this means that immediately after this food recognition\
        \ request\nfinishes, the food quantity will not be calculated yet. If you\
        \ use any endpoint that retrieves ingredients, nutritional information\nor\
        \ any other intake-related data, standard food quantities will be presented.\
        \ After some seconds, immediately when the quantity\nestimation ends, all\
        \ values for all endpoint calls will be automatically updated. You can get\
        \ a status of the quantity estimation \nprocedure by calling either GET /intake\
        \ or GET /history/getIntakesList and checking the attribute 'quantity_prediction_status'.\n\
        \n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint has two parameters\
        \ in the request body ('image' and 'sequence') which are in the 'multipart/form-data',\
        \ and the remaining parameters are in 'application/json'. You can check it\
        \ from the dropdown from the right corner.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preconsumption_image_id:
                  description: ID or imageId of the pre-consumption image attached
                    to the sent waste/leftovers image.
                  type: integer
                  example: 148414
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                main_rgb_idx:
                  description: Index of the frame in the video that will be used for
                    segmentation, extracted with LogMeal SDK
                  type: integer
                  example: 0
                camera_pose:
                  description: Dictionary of lists, where each lists describes the
                    camera pose of one video frame, extracted using the LogMeal  SDK.
                  type: object
                  properties:
                    0:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                    1:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                version:
                  description: Version of the image provided. This depends on the
                    SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - preconsumption_image_id
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                sequence:
                  description: Video sequence extracted either with iOS or Android
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  image_id_preconsumption:
                    type: integer
                    example: 1423781
                    description: ID of the pre-consumption image.
                  image_id_waste:
                    type: integer
                    example: 1425184
                    description: ID of the uploaded waste image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
                  matches_mapping_pre_to_waste:
                    description: Object containing the food_item_position mapping
                      between the preconsumption image (keys, left-hand side) and
                      the waste image (values, right-hand side) original predictions.
                      See /getIntakesList for more information. If some element is
                      mapped to null means that the food item is not present in the
                      waste image, thus it was completely consumed.
                    type: object
                    properties:
                      __PRECONSUMPTION_IMAGE_FOOD_POSITION__:
                        type: integer
                        example: __WASTE_IMAGE_FOOD_POSITION__
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    image_id_preconsumption: 1365065
                    image_id_waste: 1368909
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    matches_mapping_pre_to_waste:
                      '1': 1
                      '2': 3
                      '3': 2
                      '4': null
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/waste/detection/intake/{model_version}:
    post:
      tags:
      - Food Waste Detection
      summary: 🔴 Food Waste Intake Detection ⏱⭐ Detects the leftovers or remaining
        food on a dish/intake.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nThis endpoint must be called attached\
        \ to an already existent food segmentation prediction (Pre-consumption image).\n\
        It applies the same food segmentation procedure as in /image/segmentation/complete\
        \ but on an image that contains leftovers.\n\n\n&nbsp;\n\n\nOptionally, the\
        \ endpoint allows providing a video sequence in the same format as /image/segmentation/complete/quantity\
        \ to increase the leftovers estimation precision. The video sequence must\
        \ be extracted using the LogMeal SDK, that you will have to integrate into\
        \ your App accordingly. Two SDKs are available, the [iOS SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios)\
        \ and the [Android SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\n\
        If a video sequence is provided an additional attribute named 'serving_size'\
        \ is provided for each and every one of the elements inside the 'segmentation_results'\
        \ list.\nNote that the segmentation_results might not be directly applicable\
        \ to the uploaded \nimage size. The segmentation pixel values are scaled depending\
        \ on the 'processed_image_size' values provided \nfor each of the images (the\
        \ images might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n\n**IMPORTANT:** the food quantity procedure\
        \ runs in background, this means that immediately after this food recognition\
        \ request\nfinishes, the food quantity will not be calculated yet. If you\
        \ use any endpoint that retrieves ingredients, nutritional information\nor\
        \ any other intake-related data, standard food quantities will be presented.\
        \ After some seconds, immediately when the quantity\nestimation ends, all\
        \ values for all endpoint calls will be automatically updated. You can get\
        \ a status of the quantity estimation \nprocedure by calling either GET /intake\
        \ or GET /history/getIntakesList and checking the attribute 'quantity_prediction_status'.\n\
        \n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint has two parameters\
        \ in the request body ('image' and 'sequence') which are in the 'multipart/form-data',\
        \ and the remaining parameters are in 'application/json'. You can check it\
        \ from the dropdown from the right corner.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preconsumption_image_id:
                  description: ID or imageId of the pre-consumption image attached
                    to the sent waste/leftovers image.
                  type: integer
                  example: 148414
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                main_rgb_idx:
                  description: Index of the frame in the video that will be used for
                    segmentation, extracted with LogMeal SDK
                  type: integer
                  example: 0
                camera_pose:
                  description: Dictionary of lists, where each lists describes the
                    camera pose of one video frame, extracted using the LogMeal  SDK.
                  type: object
                  properties:
                    0:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                    1:
                      type: array
                      items:
                        type: number
                        format: float
                      example:
                      - -0.7825612
                      - -0.06980409
                      - 0.61864835
                      - 0
                      - 0.43548357
                      - 0.64876264
                      - 0.6240682
                      - 0
                      - -0.44491845
                      - 0.75778264
                      - -0.47729802
                      - 0
                      - -0.30382055
                      - -0.17176536
                      - -0.7768527
                      - 1
                version:
                  description: Version of the image provided. This depends on the
                    SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - preconsumption_image_id
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                sequence:
                  description: Video sequence extracted either with iOS or Android
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  image_id_preconsumption:
                    type: integer
                    example: 1423781
                    description: ID of the pre-consumption image.
                  image_id_waste:
                    type: integer
                    example: 1425184
                    description: ID of the uploaded waste image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
                  matches_mapping_pre_to_waste:
                    description: Object containing the food_item_position mapping
                      between the preconsumption image (keys, left-hand side) and
                      the waste image (values, right-hand side) original predictions.
                      See /getIntakesList for more information. If some element is
                      mapped to null means that the food item is not present in the
                      waste image, thus it was completely consumed.
                    type: object
                    properties:
                      __PRECONSUMPTION_IMAGE_FOOD_POSITION__:
                        type: integer
                        example: __WASTE_IMAGE_FOOD_POSITION__
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    image_id_preconsumption: 1365065
                    image_id_waste: 1368909
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    matches_mapping_pre_to_waste:
                      '1': 1
                      '2': 3
                      '3': 2
                      '4': null
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/waste/detection/intake_depth:
    post:
      deprecated: true
      tags:
      - Food Waste Detection
      summary: 🔴 Food Waste Intake Detection ⏱⭐ Detects the leftovers or remaining
        food on a dish/intake.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nThis endpoint must be called attached\
        \ to an already existent food segmentation prediction (Pre-consumption image).\n\
        It applies the same food segmentation procedure as in /image/segmentation/complete\
        \ but on an image that contains leftovers.\nFor all the waste food item positions\
        \ that were estimated to be matched to an item in the preconsumption image,\
        \ the parameter 'serving_size' will be returned with the estimated food quantity.\n\
        \n\n&nbsp;\n\n\nOptionally, the endpoint allows providing a depth image in\
        \ the same format as /image/segmentation/complete/quantity to increase the\
        \ leftovers estimation precision. The depth image must be extracted using\
        \ the LogMeal Depth SDK, that you will have to integrate into your App accordingly.\
        \ Two SDKs are available, the [iOS Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios)\
        \ and the [Android Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\n\
        If a depth image is provided an additional attribute named 'serving_size'\
        \ is provided for each and every one of the elements inside the 'segmentation_results'\
        \ list.\nNote that the segmentation_results might not be directly applicable\
        \ to the uploaded \nimage size. The segmentation pixel values are scaled depending\
        \ on the 'processed_image_size' values provided \nfor each of the images (the\
        \ images might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint\
        \ has two parameters in the request body ('image' and 'depth') which are in\
        \ the 'multipart/form-data', and the remaining parameters are in 'application/json'.\
        \ You can check it from the dropdown from the right corner.\n"
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preconsumption_image_id:
                  description: ID or imageId of the pre-consumption image attached
                    to the sent waste/leftovers image.
                  type: integer
                  example: 148414
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                depth_image_size:
                  description: Size in pixels of the depth image extracted with LogMeal
                    SDK.
                  type: object
                  properties:
                    width:
                      type: integer
                      example: 160
                    height:
                      type: integer
                      example: 90
                camera_pose:
                  description: List of floats that describe the camera pose extracted
                    using the LogMeal Depth SDK.
                  type: array
                  items:
                    type: number
                    format: float
                  example:
                  - -0.7825612
                  - -0.06980409
                  - 0.61864835
                  - 0
                  - 0.43548357
                  - 0.64876264
                  - 0.6240682
                  - 0
                  - -0.44491845
                  - 0.75778264
                  - -0.47729802
                  - 0
                  - -0.30382055
                  - -0.17176536
                  - -0.7768527
                  - 1
                depth_version:
                  description: Version of the depth image provided. This depends on
                    the SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - preconsumption_image_id
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                depth:
                  description: Depth image extracted either with iOS or Android Depth
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  image_id_preconsumption:
                    type: integer
                    example: 1423781
                    description: ID of the pre-consumption image.
                  image_id_waste:
                    type: integer
                    example: 1425184
                    description: ID of the uploaded waste image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
                  matches_mapping_pre_to_waste:
                    description: Object containing the food_item_position mapping
                      between the preconsumption image (keys, left-hand side) and
                      the waste image (values, right-hand side) original predictions.
                      See /getIntakesList for more information. If some element is
                      mapped to null means that the food item is not present in the
                      waste image, thus it was completely consumed.
                    type: object
                    properties:
                      __PRECONSUMPTION_IMAGE_FOOD_POSITION__:
                        type: integer
                        example: __WASTE_IMAGE_FOOD_POSITION__
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    image_id_preconsumption: 1365065
                    image_id_waste: 1368909
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    matches_mapping_pre_to_waste:
                      '1': 1
                      '2': 3
                      '3': 2
                      '4': null
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/waste/detection/intake_depth/{model_version}:
    post:
      deprecated: true
      tags:
      - Food Waste Detection
      summary: 🔴 Food Waste Intake Detection ⏱⭐ Detects the leftovers or remaining
        food on a dish/intake.
      description: "<span style='color:red; font-size: 1.8em; font-weight: bold;'>©</span>\
        \ <strong>Consumes your monthly credits. Limited amount of monthly calls,\
        \ exceeding calls will be charged as extras.</strong>\n\n\n<span style='color:orange;\
        \ font-size: 1.2em; font-weight: bold;'>(D)</span> <strong>Limited amount\
        \ of daily calls per user.</strong>\n\n\n<span style='color:purple; font-size:\
        \ 1.2em; font-weight: bold;'>(S)</span> <strong>Limited amount of calls per\
        \ second.</strong>\n\n\n&nbsp;\n\n\nThis endpoint must be called attached\
        \ to an already existent food segmentation prediction (Pre-consumption image).\n\
        It applies the same food segmentation procedure as in /image/segmentation/complete\
        \ but on an image that contains leftovers.\nFor all the waste food item positions\
        \ that were estimated to be matched to an item in the preconsumption image,\
        \ the parameter 'serving_size' will be returned with the estimated food quantity.\n\
        \n\n&nbsp;\n\n\nOptionally, the endpoint allows providing a depth image in\
        \ the same format as /image/segmentation/complete/quantity to increase the\
        \ leftovers estimation precision. The depth image must be extracted using\
        \ the LogMeal Depth SDK, that you will have to integrate into your App accordingly.\
        \ Two SDKs are available, the [iOS Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-ios)\
        \ and the [Android Depth SDK](https://gitlab.com/logmeal/logmeal-depth-sdk-android).\n\
        If a depth image is provided an additional attribute named 'serving_size'\
        \ is provided for each and every one of the elements inside the 'segmentation_results'\
        \ list.\nNote that the segmentation_results might not be directly applicable\
        \ to the uploaded \nimage size. The segmentation pixel values are scaled depending\
        \ on the 'processed_image_size' values provided \nfor each of the images (the\
        \ images might be sometimes resized depending on the needs of the food recognition\
        \ \nalgorithms used).\n\n\n&nbsp;\n\n\n**IMPORTANT**: Note that this endpoint\
        \ has two parameters in the request body ('image' and 'depth') which are in\
        \ the 'multipart/form-data', and the remaining parameters are in 'application/json'.\
        \ You can check it from the dropdown from the right corner.\n"
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Image sent in files
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preconsumption_image_id:
                  description: ID or imageId of the pre-consumption image attached
                    to the sent waste/leftovers image.
                  type: integer
                  example: 148414
                cam_focal_length:
                  description: Camera focal length extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 494.32916
                    y:
                      type: number
                      format: float
                      example: 495.31903
                cam_principal_point:
                  description: Camera principal point extracted with LogMeal SDK.
                  type: object
                  properties:
                    x:
                      type: number
                      format: float
                      example: 321.3225
                    y:
                      type: number
                      format: float
                      example: 240.44427
                depth_image_size:
                  description: Size in pixels of the depth image extracted with LogMeal
                    SDK.
                  type: object
                  properties:
                    width:
                      type: integer
                      example: 160
                    height:
                      type: integer
                      example: 90
                camera_pose:
                  description: List of floats that describe the camera pose extracted
                    using the LogMeal Depth SDK.
                  type: array
                  items:
                    type: number
                    format: float
                  example:
                  - -0.7825612
                  - -0.06980409
                  - 0.61864835
                  - 0
                  - 0.43548357
                  - 0.64876264
                  - 0.6240682
                  - 0
                  - -0.44491845
                  - 0.75778264
                  - -0.47729802
                  - 0
                  - -0.30382055
                  - -0.17176536
                  - -0.7768527
                  - 1
                depth_version:
                  description: Version of the depth image provided. This depends on
                    the SDK used iOS/Android.
                  type: string
                  enum:
                  - android
                  - ios
                  example: ios
              required:
              - preconsumption_image_id
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  description: Regular RGB color image.
                  type: string
                  format: binary
                depth:
                  description: Depth image extracted either with iOS or Android Depth
                    SDKs (see endpoint description above).
                  type: string
                  format: binary
              required:
              - image
      responses:
        200:
          description: Token is valid and image is received and recognized. Recognition
            information is sent in response (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  image_id_preconsumption:
                    type: integer
                    example: 1423781
                    description: ID of the pre-consumption image.
                  image_id_waste:
                    type: integer
                    example: 1425184
                    description: ID of the uploaded waste image.
                  processed_image_size:
                    type: object
                    properties:
                      width:
                        type: integer
                        example: 500
                        description: Width of the processed image. Note that it might
                          not match the uploaded image width. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                      height:
                        type: integer
                        example: 400
                        description: Height of the processed image. Note that it might
                          not match the uploaded image height. Use this information
                          to interpret the segmentation polygon and the bounding box
                          extracted by the food recognition algorithms.
                  occasion:
                    type: string
                    example: dinner
                    description: |-
                      This parameter is only returned if you have a LogMeal Plan with Nutritional Information history enabled. It defines which occasion of the day the intake has been done.
                      If available, the occasions defined by your company. Otherwise the default occasions: One of ['breakfast', 'lunch', 'dinner', 'snack']
                  foodType:
                    description: Object containing the information of the most probable/relevant
                      food type appearing on the image.
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                        description: ID of the most probable/relevant foodType on
                          the image.
                      name:
                        type: string
                        example: drinks
                        description: Name of the most probable/relevant foodType on
                          the image.
                  foodFamily:
                    description: Array containing multiple dict entries for each predicted
                      foodFamily, with their respective probabilities. To obtain the
                      available food families refer to '/v2/dataset/foodGroups'.
                    type: array
                    items:
                      type: object
                      description: Object containing information of an specific foodFamily,
                        with its respective prediction results.
                      properties:
                        id:
                          type: integer
                          example: 14
                          description: ID of the foodFamily obtained from the recognition
                            process.
                        name:
                          type: string
                          example: meat
                          description: Name of the foodFamily obtained from the recognition
                            process.
                        prob:
                          type: number
                          format: float
                          example: 0.5
                          description: Probability obtained from the recognition process
                            for the given foodFamily.
                  model_versions:
                    description: Object containing the model versions used for this
                      prediction. Only the models that have been used during the call
                      will be present in this response. In order to obtain all the
                      models available you can refer to '/v2/version/allModels'.
                    type: object
                    properties:
                      __MODEL_NAME__:
                        type: string
                        example: v0.7
                        description: Version of the '__MODEL_NAME__' model used.
                  segmentation_results:
                    description: Array containing the results of the multiple food
                      segmentation and recognition process. Each object in the array
                      corresponds to one food item or food region detected on the
                      image.
                    type: array
                    items:
                      description: Object containing the information of one of the
                        food items or food regions found by the algorithms, with their
                        respective probability generated by the recognition process.
                        All the returned attributes containing coordinates are provided
                        with respect to the sent image size. All coordinates have
                        their origin (0,0) at the top-left pixel/corner of the image.
                      type: object
                      properties:
                        food_item_position:
                          description: Incremental position starting from 1 that identifies
                            the food item in the segmentation_results list. This is
                            useful for reporting specific information for each food
                            item  (see the endpoints /confirm/dish, /confirm/quantity
                            and /confirm/ingredients)
                          type: integer
                          example: 1
                        center:
                          description: Center for the detected food item (center of
                            contained_bbox).
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 162
                            y:
                              type: integer
                              example: 367
                        contained_bbox:
                          description: Coordinates of the bounding box that contains
                            the detected food item.
                          type: object
                          properties:
                            x:
                              type: integer
                              example: 40
                            y:
                              type: integer
                              example: 231
                            h:
                              type: integer
                              example: 273
                            w:
                              type: integer
                              example: 245
                        polygon:
                          description: 'Specific polygon surrounding the detected
                            food item. Format: [x1, y1, x2, y2, x3, y3, ..., xN, yN],
                            by drawing lines from (x1, y1) to (x2, y2), ..., (xN-1,
                            yN-1) to (xN, yN) and (xN, yN) to (x1, y1), the whole
                            polygon can be drawn.'
                          type: array
                          items:
                            type: integer
                          example:
                          - 92
                          - 231
                          - 91
                          - 232
                          - 85
                          - 232
                          - 85
                          - 233
                          - 95
                          - 231
                        serving_size:
                          description: Automatically estimated food quantity (in grams)
                            for this region.
                          type: number
                          format: float
                          example: 324.453
                        recognition_results:
                          description: List of the most probable dishes/food labels
                            present in the current food segment/region.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: Unique ID of the detected food dish.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the detected dish.
                                type: string
                                example: mushroom cream
                              prob:
                                description: Probability or confidence score for this
                                  food dish or label.
                                type: number
                                format: float
                                example: 0.9973669648170471
                              foodType:
                                description: Object containing the information of
                                  the food type associated to the detected food dish/label.
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 2
                                    description: ID of the foodType.
                                  name:
                                    type: string
                                    example: drinks
                                    description: Name of the foodType.
                              foodFamily:
                                description: Array containing multiple dict entries
                                  for each foodFamily associated to the detected food
                                  dish/item.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 14
                                      description: ID of one of the foodFamilies associated
                                        to the detected food dish/label.
                                    name:
                                      type: string
                                      example: meat
                                      description: Name of one of the foodFamilies
                                        associated to the detected food dish/label.
                              subclasses:
                                description: List of subclasses that are semantically
                                  related to the detected food dish/label.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID of the subclass.
                                      type: integer
                                      example: 1474
                                    name:
                                      description: Name of the subclass.
                                      type: string
                                      example: mushroom cream
                                    prob:
                                      description: Probability or confidence score
                                        for this subclass.
                                      type: number
                                      format: float
                                      example: 0.9973669648170471
                                    foodType:
                                      description: Object containing the information
                                        of the food type associated to the subclass.
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 2
                                          description: ID of the foodType.
                                        name:
                                          type: string
                                          example: drinks
                                          description: Name of the foodType.
                                    foodFamily:
                                      description: Array containing multiple dict
                                        entries for each foodFamily associated to
                                        the subclass.
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                            example: 14
                                            description: ID of one of the foodFamilies
                                              associated to the subclass.
                                          name:
                                            type: string
                                            example: meat
                                            description: Name of one of the foodFamilies
                                              associated to the subclass.
                              nutri_score:
                                description: Nutritional score associated to the recognized
                                  food item (this information is only provided if
                                  you have a Monitor plan or higher).
                                type: object
                                properties:
                                  nutri_score_category:
                                    description: The  Nutri-Score category for the
                                      predicted dish. The parameter is only returned
                                      if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: string
                                    example: A
                                    enum:
                                    - A
                                    - B
                                    - C
                                    - D
                                    - E
                                  nutri_score_standardized:
                                    description: The standardized Nutri-Score values
                                      for the predicted dish. The parameter is only
                                      returned if the APIUser has access to the 'Recommend'
                                      plan. Check endpoint '/v2/score/{imageId}/nutriScore'
                                      for more information on Nutri-Score.
                                    type: integer
                                    example: 70
                  matches_mapping_pre_to_waste:
                    description: Object containing the food_item_position mapping
                      between the preconsumption image (keys, left-hand side) and
                      the waste image (values, right-hand side) original predictions.
                      See /getIntakesList for more information. If some element is
                      mapped to null means that the food item is not present in the
                      waste image, thus it was completely consumed.
                    type: object
                    properties:
                      __PRECONSUMPTION_IMAGE_FOOD_POSITION__:
                        type: integer
                        example: __WASTE_IMAGE_FOOD_POSITION__
              examples:
                Recognition complete response example:
                  value:
                    foodFamily:
                    - id: 8
                      name: vegetables/legumes
                      prob: 0.495849609375
                    - id: 1
                      name: meat
                      prob: 0.492919921875
                    foodType:
                      id: 1
                      name: food
                    image_id_preconsumption: 1365065
                    image_id_waste: 1368909
                    processed_image_size:
                      height: 400
                      width: 500
                    model_versions:
                      drinks: v1.0
                      foodType: v1.0
                      foodgroups: v1.0
                      foodrec: v1.0
                      ingredients: v1.0
                      ontology: v1.0
                      segmentation: v1.0
                    occasion: breakfast
                    matches_mapping_pre_to_waste:
                      '1': 1
                      '2': 3
                      '3': 2
                      '4': null
                    segmentation_results:
                    - center:
                        x: 162
                        y: 367
                      contained_bbox:
                        h: 273
                        w: 245
                        x: 40
                        y: 231
                      food_item_position: 1
                      polygon:
                      - 92
                      - 231
                      - 91
                      - 232
                      - 96
                      - 233
                      - 96
                      - 232
                      - 95
                      - 231
                      serving_size: 324.453
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 306
                        name: french fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 77
                        prob: 0.3131542097331639
                        subclasses:
                        - foodFamily:
                          - id: 11
                            name: fried food
                          - id: 20
                            name: tubers and derivatives
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 2266
                          name: sweet potato fries
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.12463889521299051
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2266
                        name: sweet potato fries
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23145949427455853
                        subclasses: []
                      - foodFamily:
                        - id: 11
                          name: fried food
                        - id: 20
                          name: tubers and derivatives
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 892
                        name: chips potatoes
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 63
                        prob: 0.16711932300418259
                        subclasses: []
                      - foodFamily:
                        - id: 3
                          name: dairy products
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 394
                        name: poutine
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 59
                        prob: 0.15727056819744548
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        - id: 11
                          name: fried food
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 75
                        name: onion rings
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1309964047906497
                        subclasses: []
                    - center:
                        x: 385
                        y: 338
                      contained_bbox:
                        h: 297
                        w: 251
                        x: 260
                        y: 190
                      food_item_position: 2
                      polygon:
                      - 430
                      - 190
                      - 428
                      - 191
                      - 425
                      - 191
                      - 458
                      - 191
                      - 457
                      - 190
                      serving_size: 134.421
                      recognition_results:
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 903
                        name: grilled lamb
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.24450516063213096
                        subclasses: []
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 285
                        name: grilled entrecote
                        nutri_score:
                          nutri_score_category: C
                          nutri_score_standardized: 66
                        prob: 0.22743939640625688
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 782
                        name: grilled vegetables
                        nutri_score:
                          nutri_score_category: B
                          nutri_score_standardized: 70
                        prob: 0.18574178912919906
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.18574178912919906
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 2208
                        name: fried vegetables
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.1842937361332224
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 462
                          name: fried green peppers
                          nutri_score:
                            nutri_score_category: D
                            nutri_score_standardized: 45
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 782
                          name: grilled vegetables
                          nutri_score:
                            nutri_score_category: B
                            nutri_score_standardized: 70
                          prob: 0.6658790144078298
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 615
                          name: sauteed vegetables
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.20307953941806833
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 155
                          name: sauteed spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.20087265196795767
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 266
                          name: sauteed mushrooms
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.3247904184124985
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 16
                            name: nuts
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 552
                          name: catalan spinach
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          - id: 11
                            name: fried food
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 642
                          name: stir fried spinach
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.1842937361332224
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 936
                          name: grilled chanterelles
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 88
                          prob: 0.3247904184124985
                      - foodFamily:
                        - id: 1
                          name: meat
                        foodType:
                          id: 1
                          name: food
                        hasNutriScore: true
                        id: 317
                        name: steak
                        nutri_score:
                          nutri_score_category: D
                          nutri_score_standardized: 52
                        prob: 0.15801991769919066
                        subclasses:
                        - foodFamily:
                          - id: 1
                            name: meat
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 285
                          name: grilled entrecote
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 66
                          prob: 0.8153637467719546
                    - center:
                        x: 273
                        y: 175
                      contained_bbox:
                        h: 258
                        w: 325
                        x: 111
                        y: 46
                      food_item_position: 3
                      polygon:
                      - 295
                      - 46
                      - 293
                      - 47
                      - 282
                      - 47
                      - 327
                      - 46
                      serving_size: 200.213
                      recognition_results:
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1226
                        name: lettuce
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2678714568000819
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1544
                          name: salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16764951643472586
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1263
                        name: rucula
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.23097117134980644
                        subclasses: []
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1544
                        name: salad
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.2285873816525689
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1196
                          name: endives
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.08377264490371553
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1240
                          name: lamb's lettuce
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 81
                          prob: 0.06712171896559911
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1242
                          name: chicory greens
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05445664756346256
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 2
                            name: ingredients
                          hasNutriScore: true
                          id: 1263
                          name: rucula
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.16939782461838304
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1208
                        name: celery
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 73
                        prob: 0.14628980327441313
                        subclasses:
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 31
                          name: celery salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 73
                          prob: 0.05766728717840139
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 1476
                          name: cucumber salad
                          nutri_score:
                            nutri_score_category: A
                            nutri_score_standardized: 77
                          prob: 0.05367282166851618
                        - foodFamily:
                          - id: 8
                            name: vegetables/legumes
                          foodType:
                            id: 1
                            name: food
                          hasNutriScore: true
                          id: 181
                          name: marinated cold cucumber
                          nutri_score:
                            nutri_score_category: C
                            nutri_score_standardized: 59
                          prob: 0.05367282166851618
                      - foodFamily:
                        - id: 8
                          name: vegetables/legumes
                        foodType:
                          id: 2
                          name: ingredients
                        hasNutriScore: true
                        id: 1183
                        name: cardoon
                        nutri_score:
                          nutri_score_category: A
                          nutri_score_standardized: 81
                        prob: 0.1262801869231296
                        subclasses: []
        400:
          description: Bad request. Invalid Image/File, problems saving sent image
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Image Not Saved:
                  value:
                    message: Image couldn't be saved.
                    code: 701
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/waste/confirm:
    post:
      tags:
      - Food Waste Detection
      summary: 🔴 Confirm dishes and quantities after applying food waste intake detection.
      description: |2

        With this endpoint, the user has the option to confirm which of the recognized leftover dishes are correct and
        which are the quantities left.


        &nbsp;


        By default, the source must be set to 'logmeal' and an ID corresponding to an existent dish is expected.
        You also have to provide a food item identifier for each of the confirmed dishes. This implies adding the extra parameter 'food_item_position'.
        This parameter consists of a list of elements, one per each confirmed dish, and it must include an integer identifying the segmented region it corresponds to (see 'food_item_position' in returned json for /waste/detection endpoints).
      parameters:
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                image_id_waste:
                  type: integer
                  example: 1268462
                  description: ID of the waste image which will have it's dishes confirmed.
                confirmedClass:
                  type: array
                  items:
                    oneOf:
                    - type: integer
                    - type: string
                    example:
                    - 110
                    - Red velvet donut
                  description: Classes to be confirmed for the provided imageId. This
                    variable is a list of integers containing all the confirmed classes.
                    Note that whenever the source is set to 'logmeal' an integer corresponding
                    to an existent dish must be provided in the list. If the source
                    is other than 'logmeal', than a string can be provided in the
                    list along with the integer ids as the name of that particular
                    confirmed class.
                source:
                  oneOf:
                  - type: string
                    enum:
                    - logmeal
                    - google
                    - other
                  - type: array
                    items:
                      type: string
                      enum:
                      - logmeal
                      - google
                      - other
                  example: logmeal
                  description: Source(s) of the 'confirmedClass' being confirmed.
                    If a list of 'confirmedClass' are provided, the source provided
                    can also be a list containing each source relative to the 'confirmedClass'
                    list.
                food_item_position:
                  type: array
                  items:
                    type: integer
                    example:
                    - 1
                    - extra_dish_1
                  description: Integer identifiers pointing to one of the detected
                    regions in /segmentation endpoints or string unique identifier
                    if the confirmed dish does not correspond to any of the detected
                    food regions/segments.
                quantity:
                  type: object
                  additionalProperties:
                    type: number
                    format: float
                  example:
                    '1': 63.2
                    extra_dish_1: 80.0
                  description: Object with the quantity of the intake for any regions
                    defined as key-value pairs.
              required:
              - imageId
              - confirmedClass
              - source
              - food_item_position
      responses:
        200:
          description: token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  recognition_results:
                    description: Array containing the results of the recognition process.
                    type: array
                    items:
                      description: Object containing the information of the class/dish
                        detected by the models, with their respective probability
                        generated by the recognition process.
                      type: object
                      properties:
                        id:
                          description: ID of the detected class.
                          type: integer
                          example: 1474
                        name:
                          description: Name of the detected class.
                          type: string
                          example: mushroom cream
                        prob:
                          description: Probability generated by the recognition process.
                            The sum of all the probabilities among the RecognitionResultsArray
                            will always be 1.
                          type: number
                          format: float
                          example: 0.9973669648170471
                        subclasses:
                          description: Array of subclasses available for the detected
                            class.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: ID of the subclass.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the subclass.
                                type: string
                                example: cream brown soup
                              prob:
                                description: Probability of the subclass generated
                                  by the recognition process.
                                type: number
                                format: float
                                example: 0.9973669648170471
                        nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                  source:
                    type: string
                    example: logmeal
                    description: Source of the confirmed dish.
              examples:
                Confirm dish response example:
                  value:
                    recognition_results:
                    - id: 110
                      name: donuts
                      prob: 1.0
                    source: logmeal
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Feedback Source Is Not Valid:
                  value:
                    message: 'Parameter source is not valid. It must be one of: logmeal,
                      google, other'
                    code: 707
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Confirmed Class Error:
                  value:
                    message: The provided dish name does not belong to the current
                      food type.
                    code: 702
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/waste/confirm/{model_version}:
    post:
      tags:
      - Food Waste Detection
      summary: 🔴 Confirm dishes and quantities after applying food waste intake detection.
      description: |2

        With this endpoint, the user has the option to confirm which of the recognized leftover dishes are correct and
        which are the quantities left.


        &nbsp;


        By default, the source must be set to 'logmeal' and an ID corresponding to an existent dish is expected.
        You also have to provide a food item identifier for each of the confirmed dishes. This implies adding the extra parameter 'food_item_position'.
        This parameter consists of a list of elements, one per each confirmed dish, and it must include an integer identifying the segmented region it corresponds to (see 'food_item_position' in returned json for /waste/detection endpoints).
      parameters:
      - in: path
        name: model_version
        required: true
        schema:
          type: string
          enum:
          - v1.0
        description: String containing the version of the recognition algorithm/model.
          If not provided, the endpoint will default to the first version listed in
          /version/activeModels
      - in: query
        name: language
        schema:
          type: string
          enum:
          - spa
          - cat
          - eng
          - ita
          - nld
          - fre
          - ger
          - tur
          - gre
          - heb
        description: Desired language for the response. It must be a three-letter
          ISO 639-2/T code. Defaults to the APIUser's assigned language or english.
        required: false
      requestBody:
        description: Parameters sent in data, in json format
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                image_id_waste:
                  type: integer
                  example: 1268462
                  description: ID of the waste image which will have it's dishes confirmed.
                confirmedClass:
                  type: array
                  items:
                    oneOf:
                    - type: integer
                    - type: string
                    example:
                    - 110
                    - Red velvet donut
                  description: Classes to be confirmed for the provided imageId. This
                    variable is a list of integers containing all the confirmed classes.
                    Note that whenever the source is set to 'logmeal' an integer corresponding
                    to an existent dish must be provided in the list. If the source
                    is other than 'logmeal', than a string can be provided in the
                    list along with the integer ids as the name of that particular
                    confirmed class.
                source:
                  oneOf:
                  - type: string
                    enum:
                    - logmeal
                    - google
                    - other
                  - type: array
                    items:
                      type: string
                      enum:
                      - logmeal
                      - google
                      - other
                  example: logmeal
                  description: Source(s) of the 'confirmedClass' being confirmed.
                    If a list of 'confirmedClass' are provided, the source provided
                    can also be a list containing each source relative to the 'confirmedClass'
                    list.
                food_item_position:
                  type: array
                  items:
                    type: integer
                    example:
                    - 1
                    - extra_dish_1
                  description: Integer identifiers pointing to one of the detected
                    regions in /segmentation endpoints or string unique identifier
                    if the confirmed dish does not correspond to any of the detected
                    food regions/segments.
                quantity:
                  type: object
                  additionalProperties:
                    type: number
                    format: float
                  example:
                    '1': 63.2
                    extra_dish_1: 80.0
                  description: Object with the quantity of the intake for any regions
                    defined as key-value pairs.
              required:
              - imageId
              - confirmedClass
              - source
              - food_item_position
      responses:
        200:
          description: token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  recognition_results:
                    description: Array containing the results of the recognition process.
                    type: array
                    items:
                      description: Object containing the information of the class/dish
                        detected by the models, with their respective probability
                        generated by the recognition process.
                      type: object
                      properties:
                        id:
                          description: ID of the detected class.
                          type: integer
                          example: 1474
                        name:
                          description: Name of the detected class.
                          type: string
                          example: mushroom cream
                        prob:
                          description: Probability generated by the recognition process.
                            The sum of all the probabilities among the RecognitionResultsArray
                            will always be 1.
                          type: number
                          format: float
                          example: 0.9973669648170471
                        subclasses:
                          description: Array of subclasses available for the detected
                            class.
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                description: ID of the subclass.
                                type: integer
                                example: 1474
                              name:
                                description: Name of the subclass.
                                type: string
                                example: cream brown soup
                              prob:
                                description: Probability of the subclass generated
                                  by the recognition process.
                                type: number
                                format: float
                                example: 0.9973669648170471
                        nutri_score:
                          type: object
                          properties:
                            nutri_score_category:
                              description: The  Nutri-Score category for the predicted
                                dish. The parameter is only returned if the APIUser
                                has access to the 'Recommend' plan. Check endpoint
                                '/v2/score/{imageId}/nutriScore' for more information
                                on Nutri-Score.
                              type: string
                              example: A
                              enum:
                              - A
                              - B
                              - C
                              - D
                              - E
                            nutri_score_standardized:
                              description: The standardized Nutri-Score values for
                                the predicted dish. The parameter is only returned
                                if the APIUser has access to the 'Recommend' plan.
                                Check endpoint '/v2/score/{imageId}/nutriScore' for
                                more information on Nutri-Score.
                              type: integer
                              example: 70
                  source:
                    type: string
                    example: logmeal
                    description: Source of the confirmed dish.
              examples:
                Confirm dish response example:
                  value:
                    recognition_results:
                    - id: 110
                      name: donuts
                      prob: 1.0
                    source: logmeal
        400:
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
              examples:
                Feedback Source Is Not Valid:
                  value:
                    message: 'Parameter source is not valid. It must be one of: logmeal,
                      google, other'
                    code: 707
                Image Not Predicted:
                  value:
                    message: The provided imageId does not have a prediction yet.
                    code: 700
                Confirmed Class Error:
                  value:
                    message: The provided dish name does not belong to the current
                      food type.
                    code: 702
        403:
          description: You are not allowed to this method.
        401:
          description: Unauthorized, invalid token
        404:
          description: The specified URL was not found or couldn’t be retrieved
      security:
      - Bearer: []
  /v2/dysphagia/options:
    get:
      tags:
      - Dysphagia User Feedback
      summary: 🔴 Get different Dysphagia measurement options.
      description: |
        This endpoint returns the information and explanation about the Dysphagia measurement options.


        &nbsp;


        The options are 'Adhesiveness' and 'Swallowing' followed by its numerical value (on a scale from 1 to 5) specifying the difficulty on the intake, where 1 would be the easiest level on the scale
        and 5 the hardest one.
      responses:
        200:
          description: Token is valid. Measurements information is sent in response
            (JSON format)
          content:
            application/json:
              schema:
                type: object
                properties:
                  adhesiveness:
                    description: |
                      Numerical value referring to the adhesiveness of the intake where 1 would be the lowest level and 5 the highest one.

                      1: "NOT_ADHESIVE",

                      2: "SLIGHTLY_ADHESIVE",

                      3: "NORMAL",

                      4: "MODERATELY_ADHESIVE",

                      5: "VERY_ADHESIVE"
                    type: object
                  swallowing:
                    description: |
                      Numerical value referring to the swallowing difficulty of the intake where 1 would be the easiest level and 5 the hardest one.

                      1: "EASY",

                      2: "FAIRLY_EASY",

                      3: "NORMAL",

                      4: "SLIGHTLY_DIFFICULT",

                      5: "DIFFICULT"
                    type: object
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/dysphagia/{imageId}:
    post:
      tags:
      - Dysphagia User Feedback
      summary: 🔴 Stores Dysphagia measurement values for the given imageId.
      description: |
        This endpoint stores information about Dysphagia measurement option values for the given imageId.
        The measurement types, 'adhesiveness' and 'swallowing', can be passed individually or together via the request's body, but at least one must be included.

        If the body is passed with an empty JSON, the previously stored measures will be deleted. A measure type can be provided empty or null to delete that specific type.
      parameters:
      - in: path
        name: imageId
        schema:
          type: integer
        example: 175592
        required: true
        description: ID of the image.
      requestBody:
        description: |
          Dysphagia measures from the intake.
          The keys of the body have to be one of the measurement type names ('adhesiveness' or 'swallowing').
          And the keys of each measurement has to be the food_item_position of the image and the value has to be a number between 1 and 5.

          If the body is passed with an empty JSON, the previously stored measures will be deleted. A measure type can be provided empty or null to delete that specific type.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                adhesiveness:
                  description: "JSON where key value will be the food item position\
                    \ on the image and its value will be a number referring to the\
                    \ adhesiveness of the intake where 1 would be the lowest level\
                    \ and 5 the highest one.\n            \n\"1\": 4,\n\n\"2\": 1,\n\
                    \n\"3\": 4\n"
                  type: object
                  properties:
                    food_item_position_1:
                      example: 4
                      type: integer
                    food_item_position_2:
                      example: 1
                      type: integer
                    food_item_position_3:
                      example: 4
                      type: integer
                swallowing:
                  description: |
                    JSON where key value will be the food item position on the image and its value will be a number referring to the swallowing difficulty of the intake where 1 would be the easiest level and 5 the hardest one.

                    "1": 3,

                    "2": 3,

                    "3": 5
                  type: object
                  properties:
                    food_item_position_1:
                      example: 3
                      type: integer
                    food_item_position_2:
                      example: 3
                      type: integer
                    food_item_position_3:
                      example: 5
                      type: integer
      responses:
        200:
          description: |
            Token is valid. Dysphagia measures successfully stored!

            If JSON is empty. Dysphagia measures successfully deleted!
        400:
          description: Bad request.
        401:
          description: Unauthorized, invalid token
        403:
          description: You are not allowed to this method.
        404:
          description: The specified URL was not found or couldn’t be retrieved
        429:
          description: Too Many Requests. (limited per daily calls per user or overall
            calls per second)
      security:
      - Bearer: []
  /v2/kiosk/external/customers/import:
    post:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Import multiple customers using a TSV file
      description: "Upload a `.tsv` file to bulk import multiple Kiosk customers into\
        \ your company account.\n\nThe file must conform to the format defined in\
        \ this spreadsheet:  \n[Customer Import Format](https://docs.google.com/spreadsheets/d/1AmsD3NNwfGwiwBL63akzTVrtlsxFZOMq4mnDb9EnsjY/edit?gid=2104741353#gid=2104741353)\n"
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: TSV file containing customers to be imported.
      responses:
        201:
          description: Customers imported successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Customers list successfully deleted.
                    description: Operation result message.
                  updated_customers:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        id_restaurant:
                          type: string
                          description: Restaurant external ID.
                          example: R1001
                        api_users_mapping:
                          type: object
                          additionalProperties:
                            type: string
                          description: Mapping of external user IDs to API user tokens.
                        customer_identifiers:
                          type: object
                          additionalProperties:
                            type: array
                            items:
                              type: string
                          description: Mapping of external user IDs to customer identifiers
                            (e.g., barcodes).
        400:
          description: Invalid file or formatting error.
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
  /v2/kiosk/external/customers:
    post:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Add Kiosk customers for a restaurant
      description: |
        Create one or more new Kiosk customers associated with a given restaurant.
        Anonymous identifiers can be included using `"None"` as the external user key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id_restaurant
              - customer_identifiers
              properties:
                id_restaurant:
                  type: string
                  example: R1001
                  description: External ID of the restaurant to which customers will
                    be assigned.
                customer_identifiers:
                  type: object
                  description: Dictionary mapping external user IDs to lists of identifiers
                    (e.g., barcodes). Use `"None"` for anonymous users.
                  additionalProperties:
                    type: array
                    items:
                      type: string
                      example: ABC123456
                api_users_mapping:
                  type: object
                  description: Optional mapping of external user IDs to API user tokens.
                  additionalProperties:
                    type: string
                    example: abc123token
      responses:
        201:
          description: Customers successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Customers list successfully deleted.
                    description: Operation result message.
                  updated_customers:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        id_restaurant:
                          type: string
                          description: Restaurant external ID.
                          example: R1001
                        api_users_mapping:
                          type: object
                          additionalProperties:
                            type: string
                          description: Mapping of external user IDs to API user tokens.
                        customer_identifiers:
                          type: object
                          additionalProperties:
                            type: array
                            items:
                              type: string
                          description: Mapping of external user IDs to customer identifiers
                            (e.g., barcodes).
        400:
          description: Invalid input
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
    get:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Get all customer identifiers for your company
      description: |
        Retrieves a list of all current Kiosk customer identifiers grouped by restaurant for your company.
      responses:
        200:
          description: Successfully retrieved customers.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    id_restaurant:
                      type: string
                      description: Restaurant external ID.
                      example: R1001
                    api_users_mapping:
                      type: object
                      additionalProperties:
                        type: string
                      description: Mapping of external user IDs to API user tokens.
                    customer_identifiers:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
                      description: Mapping of external user IDs to customer identifiers
                        (e.g., barcodes).
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
    delete:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Deactivate all customers for a restaurant
      description: "Deactivates all Kiosk customers assigned to a specified restaurant.\
        \  \nYou must specify the `id_restaurant` in the request body.\n"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id_restaurant
              properties:
                id_restaurant:
                  type: string
                  example: R1001
                  description: External ID of the restaurant where customers should
                    be deactivated.
      responses:
        200:
          description: Customers successfully deactivated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Customers list successfully deleted.
                    description: Operation result message.
                  updated_customers:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        id_restaurant:
                          type: string
                          description: Restaurant external ID.
                          example: R1001
                        api_users_mapping:
                          type: object
                          additionalProperties:
                            type: string
                          description: Mapping of external user IDs to API user tokens.
                        customer_identifiers:
                          type: object
                          additionalProperties:
                            type: array
                            items:
                              type: string
                          description: Mapping of external user IDs to customer identifiers
                            (e.g., barcodes).
        404:
          description: Restaurant not found.
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
  /v2/kiosk/external/customers/{external_user_id}:
    delete:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Deactivate a specific customer
      description: |
        Deactivates Kiosk identifiers associated with a specific `external_user_id` for the given restaurant.
      parameters:
      - in: path
        name: external_user_id
        required: true
        schema:
          type: string
        description: The external ID of the user whose customer identifiers will be
          deactivated.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id_restaurant
              properties:
                id_restaurant:
                  type: string
                  example: R1001
                  description: External ID of the restaurant where customers should
                    be deactivated.
      responses:
        200:
          description: Customer successfully deactivated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Customers list successfully deleted.
                    description: Operation result message.
                  updated_customers:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        id_restaurant:
                          type: string
                          description: Restaurant external ID.
                          example: R1001
                        api_users_mapping:
                          type: object
                          additionalProperties:
                            type: string
                          description: Mapping of external user IDs to API user tokens.
                        customer_identifiers:
                          type: object
                          additionalProperties:
                            type: array
                            items:
                              type: string
                          description: Mapping of external user IDs to customer identifiers
                            (e.g., barcodes).
        404:
          description: Customer or restaurant not found.
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
  /v2/kiosk/external/restaurants:
    get:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ List Kiosk restaurants
      description: |
        Returns a list of restaurants linked to your Kiosk company, including their IDs and display names.
      responses:
        200:
          description: Successfully retrieved restaurant list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  restaurants:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: R1001
                          description: External restaurant ID
                        name:
                          type: string
                          example: Healthy Bistro
                          description: Restaurant display name
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
  /v2/kiosk/external/dishes:
    get:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Get dishes served based on an image ID
      description: "Retrieves a list of dishes that were served in a restaurant during\
        \ a specific shift and date, \nbased on the provided image ID.\n\nThis endpoint\
        \ allows users to obtain the dish information associated with a meal image.\
        \  \nEach dish entry includes its internal identifier, name, and serving size.\n\
        \nThe response will return only dishes that were detected or registered in\
        \ the restaurant's daily menu \ncorresponding to the given image.\n"
      parameters:
      - in: query
        name: image_id
        required: true
        schema:
          type: string
        description: Unique identifier of the image used to retrieve the associated
          dishes.
      - in: query
        name: language
        required: false
        schema:
          type: string
          example: eng
        description: |
          Optional three-letter ISO 639-2/T language code (e.g. "eng", "spa", "cat").
          If not provided, the language will be automatically determined from the request context.
      responses:
        200:
          description: Successfully retrieved list of dishes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  restaurant_class:
                    type: array
                    description: List of dishes served for the provided image.
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Internal identifier of the restaurant-class
                            dish.
                        name:
                          type: string
                          description: Name of the dish.
                        portion_size:
                          type: number
                          description: Portion size in grams or serving units.
                        cooking_measures:
                          type: array
                          description: Currently returned as an empty list.
                          items:
                            type: string
        400:
          description: Missing or invalid `image_id` parameter.
        401:
          description: Unauthorized.
        403:
          description: Access denied.
        404:
          description: Image not found or no dishes associated with it.
      security:
      - Bearer: []
  /v2/kiosk/external/recipes:
    get:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ List Kiosk dishes recipes
      description: |
        Returns all dishes of the SMTCompany, along with the nutritional information and ingredients of each one, if available.

        Optionally, you can specify the language in which you want to obtain the name using a 3-letter ISO code in the optional "language" parameter.
      parameters:
      - in: query
        name: language
        example: spa
        required: false
        schema:
          type: string
        description: |
          3-letter ISO-Code of the desired language to obtain the names of the dishes; if the dish has a translation in
          the provided language, the information will be translated, otherwise the default value stored in the database will continue to be returned.
      responses:
        200:
          description: Successfully retrieved company dish recipes list.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    auto_computed_nutritional_indicators:
                      type: boolean
                      example: false
                      description: Identifier to determine whether the recipe's nutrients
                        have been calculated dynamically. If True, it means only the
                        ingredients have been specified and the nutrients have been
                        calculated based on them. If False, it means both the ingredients
                        and nutrients have been specified manually.
                    dish:
                      type: string
                      example: cesar salad
                      description: Name of the dish.
                    externalId:
                      type: string
                      example: EXT_1234
                      description: External identifier of the restaurant-class dish.
                    has_ingredient_info:
                      type: boolean
                      example: true
                      description: Identifier to know if the dish has ingredients
                        stored in its recipe.
                    has_nutritional_info:
                      type: boolean
                      example: true
                      description: Identifier to know if the dish has nutritional
                        information stored in its recipe.
                    image_url:
                      type: string
                      example: https://logmeal.fakeurl.com/708b3c811eac1484855ad90357f40533c5df634f6
                      description: URL to view the image.
                    ingredient_list:
                      type: array
                      description: A list containing the recipe ingredients and their
                        quantities. It can also be an empty list.
                      items:
                        type: object
                        properties:
                          ingredientAmount:
                            type: number
                            example: 40
                            description: Quantity of ingredient, either int or float.
                          ingredientId:
                            type: integer
                            example: 125
                            description: Internal identifier of the ingredient.
                          ingredientName:
                            type: string
                            example: lettuce
                            description: Name of the ingredient.
                    nutritional_indicators:
                      type: array
                      description: A list containing the recipe nutrients and their
                        quantities. It can also be an empty list.
                      items:
                        type: object
                        properties:
                          indicatorAmount:
                            type: number
                            example: 32.5
                            description: Quantity of nutrient.
                          indicatorCode:
                            type: string
                            example: ENERC_KCAL
                            description: Nutrient identification code.
                    restaurant_recipe_id:
                      type: integer
                      example: 1234
                      description: Internal identifier of the restaurant-class dish.
                    sugar_modulation:
                      type: boolean
                      example: false
                      description: Identifier to determine if the recipe has sugar
                        modulation.
                    translations:
                      type: object
                      description: Object containing the translations of the dish;
                        there will be one entry for each language that has been provided.
                      properties:
                        default:
                          type: string
                          example: cesar salad
                          description: Default name of the dish
                        spanish:
                          type: string
                          example: ensalada césar
                          description: Name of the dish translated into Spanish
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
  /v2/kiosk/external/recipe/{restaurant_class_id}:
    patch:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Update a restaurant recipe
      description: "Edit a recipe for a company dish. If the dish doesn't have a recipe,\
        \ a new one will be created.\n\nThis endpoint allows you to modify the default\
        \ dish name (used for display purposes) and add new translations.\n\nThere\
        \ are two ways to update a recipe: you can provide a list of ingredients along\
        \ with the nutritional values.\nThis is the standard method, giving the user\
        \ complete control over the values. Alternatively, you can provide \nonly\
        \ the list of ingredients IDs, which will automatically calculate the recipe's\
        \ nutritional value internally.\nAny ingredient passed with the \"ingredientName\"\
        \ field instead of \"ingredientId\" will not be taken into account for this\
        \ calculation.\nIt's important to note that only ingredients with a valid,\
        \ existing and associated ID will be considered.\n\nYou can also assign a\
        \ sample image to the dish, which will be associated with it for display purposes.\n\
        The image file must be in JPG or JPEG format.\n"
      parameters:
      - in: path
        name: restaurant_class_id
        required: true
        schema:
          type: integer
        description: The internal ID of the dish whose recipe will be updated.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                ingredient_list:
                  type: array
                  items:
                    type: object
                    properties:
                      ingredientAmount:
                        type: number
                        example: 182.5
                      ingredientId:
                        type: integer
                        example: 12
                translations:
                  type: object
                  properties:
                    eng:
                      type: string
                      example: sausage
                    spa:
                      type: string
                      example: butifarra
                sugar_modulation:
                  type: boolean
                  example: false
                dish_name:
                  type: string
                  example: default_sausage_name
                auto_computed_nutritional_indicators:
                  type: boolean
                  example: true
                nutritional_indicators:
                  type: array
                  items:
                    type: object
                    properties:
                      indicatorCode:
                        type: string
                        example: CA
                      indicatorAmount:
                        type: number
                        example: 10.92
                image:
                  type: string
                  format: binary
                  description: The image file must be in JPG or JPEG format.
      responses:
        200:
          description: Kiosk recipe successfully updated.
          content:
            application/json:
              schema:
                type: string
                example: Restaurant recipe edited successfully.
                description: Operation result message.
        404:
          description: Dish not found.
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
  /v2/kiosk/external/recipes/import:
    post:
      tags:
      - LogMeal Kiosk Integration
      summary: ⚫ Import Kiosk dishes recipes
      description: |
        Upload a ZIP file containing `.xls`, `.xlsx` or `.pdf` files with restaurant recipes.

        Each file represents a dish and should follow this naming format:

        `<id>_<name>.<extension>`

        - `id` (optional): External ID of the dish.
          - If provided, it must match an existing dish and the recipe will be updated.
          - If missing or invalid, the dish will require manual review.
        - `name`: Free text for identification purposes.

        In addition all files must follow the expected format, including:
        - A valid recipe name
        - Ingredients and quantities
        - Nutritional information
        - Optional sample image

        ---

        The system will validate each file individually. If any error is found, the import will fail and detailed feedback will be returned.

        If any errors that may have occurred are related to obtaining the sample images, the recipes will still be uploaded, returning a warning with a list of the names of those files that have had a conflict.

        ---

        **Two-phase import process**

        The import may be completed in one or two phases:

        **Phase 1 — Automatic processing**
        - The system parses all files and attempts to process them automatically.

        **Possible outcomes:**
        - All recipes are valid -> recipes are imported directly without further interactions
        - Issues detected -> a `recipes_review.zip` file is returned

        **Phase 2 — Manual review (if required)**
        - The returned ZIP contains files that must be reviewed and completed before re-uploading:

          - `recipes_review.xlsx` → used to validate each dish:
            - **Status** → define if the dish already exists (`OK`) or must be created (`NEW`)
            - **Dish ID** → required when `Status = OK`
            - **Dish Name** → required for new dishes or to update an existing name

          - `ingredients_review.xlsx` (optional) → used to map ingredients that could not be automatically recognized:
            - Assign an existing Ingredient ID or leave it empty to keep it as free text

          - **Images folder** (if applicable) → contains extracted images associated with each recipe

        - After completing the required fields, the ZIP must be uploaded again to finalize the import.

        ---

        **Important behavior**

        If an ID for an existing recipe is provided (duplicate ID), that recipe will be overwritten.
        Make sure the IDs are unique, and if you really want to modify a recipe, make sure the ID belongs to that existing recipe.

        ---

        **Full documentation**

        For detailed instructions, examples, and Excel format:
        [Visit the Kiosk documentation](https://docs.google.com/document/d/1RBhhAq2ysk5_gwvIlZJZtsPAoD-PI3WgMdf2XlaUEco/edit?tab=t.0#heading=h.x523188zr7p)

        ---

        Optional: `custom_sections` can be provided to override default Excel section names or nutrient labels.
        Only the specified keys are overridden; missing keys fall back to defaults.

        Supported keys:
          - header_row
          - ingredients_start
          - serving_size
          - nutrients_start
          - file_end
          - calorie_nutrient_code
          - protein_nutrient_code
          - carbohydrates_nutrient_code
          - sugar_nutrient_code
          - fats_nutrient_code
          - saturated_fats_nutrient_code
          - polyunsaturated_fats_nutrient_code
          - monosaturated_fats_nutrient_code
          - fiber_nutrient_code
          - sodium_nutrient_code

        Example:
          {
            "header_row": "RECEPTA",
            "ingredients_start": "INGREDIENTES"
          }
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: ZIP file containing recipe Excel files
                custom_sections:
                  type: object
                  description: Optional dictionary to override default Excel section
                    names.
                  additionalProperties:
                    type: string
                  example:
                    header_row: RECEPTA
                    ingredients_start: INGREDIENTES
      responses:
        200:
          description: |
            Import result.

            The request may either:
            - Complete successfully (recipes imported)
            - Require manual review (a review ZIP file is returned)
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    success:
                      type: boolean
                      example: true
                    result:
                      type: string
                      example: Restaurant recipes successfully imported.
                    image_warnings:
                      type: object
                      description: |
                        Non-blocking issues related to recipe images.

                        Keys are filenames and values are warning codes.
                      additionalProperties:
                        type: string
                      example:
                        ZIP-EXT-ID-2_Salad.xlsx: unsupported_image_format
                        ZIP-EXT-ID-3_Pizza.xlsx: missing_sample_image
                - type: object
                  properties:
                    success:
                      type: boolean
                      example: true
                    requires_review:
                      type: boolean
                      example: true
                    message:
                      type: string
                      example: Manual review required. Download the review file and
                        re-upload after completing it.
                    review_file:
                      type: string
                      description: URL or identifier to download the review ZIP file
                      example: https://api.example.com/files/recipes_review_123.zip
        400:
          description: Validation or processing error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  recipes:
                    type: array
                    description: Successfully parsed recipes (empty if validation
                      fails)
                    items:
                      type: object
                  errors:
                    type: object
                    properties:
                      zip_error:
                        type: array
                        items:
                          type: string
                        example:
                        - Invalid ZIP file
                      file_error:
                        type: array
                        items:
                          type: string
                        example:
                        - No file provided
                      file_size_error:
                        type: array
                        items:
                          type: string
                        example:
                        - File exceeds maximum allowed size of 75MB
                      security_error:
                        type: array
                        items:
                          type: string
                        example:
                        - ../malicious_file.xlsx
                      extension_error:
                        type: array
                        items:
                          type: string
                        example:
                        - invalid_file.pdf
                      content_error:
                        type: array
                        items:
                          type: object
                          properties:
                            filename:
                              type: string
                              example: Llomb_pizza.xlsx
                            errors:
                              type: array
                              items:
                                type: string
                                enum:
                                - missing_id_error
                                - name_error
                                - ingredient_error
                                - serving_size_error
                                - nutrient_error
                                - unsupported_image_format
                                - missing_sample_image
                                - error_processing_image
                                - file_processing_error
                              description: |
                                Possible error codes:
                                - missing_id_error: No ID found in filename (expected format: id_name.xlsx)
                                - name_error: Recipe name could not be extracted
                                - ingredient_error: Invalid or missing ingredients
                                - serving_size_error: Invalid or missing serving size
                                - nutrient_error: Invalid or missing nutritional information
                                - unsupported_image_format: Image format is not supported
                                - missing_sample_image: No image found in the file
                                - error_processing_image: Error while processing image
                                - file_processing_error: General file processing error
        401:
          description: Unauthorized
        403:
          description: Access denied
      security:
      - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-build:
  time: '2026-05-25T02:01:34.356025Z'
