Nutrical Solution Ltd Meal Plans API

Manage meal plans and meal-plan customers.

OpenAPI Specification

nutrical-solution-ltd-meal-plans-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: NutriCal Food & Nutrition Entity Meal Plans API
  version: '2.0'
  description: 'The NutriCal API powers apps, programs, and websites with NutriCal''s food and nutrition intelligence for the GCC and beyond: an ingredient database of 40,000+ foods (USDA + NutriCal proprietary), recipe management and nutrition analysis, recipe categories, meal-plan management with per-customer meal plans, and nutrient/allergen metadata used for Saudi FDA / GCC-compliant food labeling. Two public metadata endpoints require no authentication; entity-scoped recipe, category, and meal-plan operations are authenticated with an entity Access-Token; entity provisioning uses an organization API Key.'
  contact:
    name: NutriCal
    url: https://www.nutrical.co
    email: info@nutrical.co
  x-provenance:
    generated: '2026-07-20'
    method: generated
    source: https://docs.nutrical.co (GitBook) — faithfully transcribed from the published NutriCal API reference; NutriCal publishes no OpenAPI of its own.
servers:
- url: https://api.nutrical.co
  description: Production
- url: https://preprodapi.nutrical.co
  description: Pre-production / testing environment
tags:
- name: Meal Plans
  description: Manage meal plans and meal-plan customers.
paths:
  /external/api/v2/meal-plans/:
    get:
      operationId: listMealPlans
      tags:
      - Meal Plans
      summary: Get meal plan list
      security:
      - AccessToken: []
      parameters:
      - $ref: '#/components/parameters/Search'
      - $ref: '#/components/parameters/Paginate'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Limit'
      - name: date
        in: query
        schema:
          type: string
          format: date
        description: Filter meal plans from this date (YYYY-MM-DD).
      - name: meal_plan_customer_id__list
        in: query
        schema:
          type: string
        description: Filter by customer id or list of customer ids.
      responses:
        '200':
          description: Meal plan list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MealPlanSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /external/api/v2/meal-plans/{mealPlanId}/:
    get:
      operationId: getMealPlan
      tags:
      - Meal Plans
      summary: Get meal plan details by ID
      security:
      - AccessToken: []
      parameters:
      - name: mealPlanId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Meal plan detail.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
  /external/api/v2/meal-plan-customers/:
    get:
      operationId: listMealPlanCustomers
      tags:
      - Meal Plans
      summary: List meal plan customers
      security:
      - AccessToken: []
      parameters:
      - $ref: '#/components/parameters/Search'
      - name: sort
        in: query
        schema:
          type: string
        description: Sort by field, e.g. created.
      responses:
        '200':
          description: Meal plan customers.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MealPlanCustomer'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createMealPlanCustomer
      tags:
      - Meal Plans
      summary: Create meal plan customer
      security:
      - AccessToken: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MealPlanCustomerInput'
            example:
              first_name: Test
              last_name: User
              email: test@example.com
              country_code: '91'
              mobile_number: '1234567891'
              age: 20
              height: 171
              weight: 70
              gender: MALE
              information: here goes the information
              dislikes: milk
              unique_id: '1'
              allergen_id_list:
              - 6644dcb6d1e6c2b9b599f6a7
              diet_type_id_list:
              - 6597f4a8e4fd1647ae5e8a8c
      responses:
        '200':
          description: Meal plan customer added.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  code:
                    type: integer
                  data:
                    $ref: '#/components/schemas/MealPlanCustomer'
                  message:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
  /external/api/v2/meal-plan-customers/{mealplanCustomerId}/:
    get:
      operationId: getMealPlanCustomer
      tags:
      - Meal Plans
      summary: Get meal plan customer by ID
      security:
      - AccessToken: []
      parameters:
      - name: mealplanCustomerId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Meal plan customer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  code:
                    type: integer
                  data:
                    $ref: '#/components/schemas/MealPlanCustomer'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateMealPlanCustomer
      tags:
      - Meal Plans
      summary: Update meal plan customer
      security:
      - AccessToken: []
      parameters:
      - name: mealplanCustomerId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MealPlanCustomerInput'
            example:
              first_name: test
              last_name: updated
      responses:
        '200':
          description: Meal plan customer updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  code:
                    type: integer
                  data:
                    $ref: '#/components/schemas/MealPlanCustomer'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteMealPlanCustomer
      tags:
      - Meal Plans
      summary: Delete meal plan customer
      security:
      - AccessToken: []
      parameters:
      - name: mealplanCustomerId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Meal plan customer removed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  code:
                    type: integer
                  message:
                    type: string
              example:
                status: SUCCESS
                code: 900
                message: Meal plan customer removed successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    MealPlanCustomerInput:
      type: object
      properties:
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
        country_code:
          type: string
        mobile_number:
          type: string
        age:
          type: integer
        height:
          type: number
        weight:
          type: number
        gender:
          type: string
        information:
          type: string
        dislikes:
          type: string
        unique_id:
          type: string
        allergen_id_list:
          type: array
          items:
            type: string
        diet_type_id_list:
          type: array
          items:
            type: string
    MealPlanSummary:
      type: object
      properties:
        meal_plan_id:
          type: string
        name:
          type: string
        created_at:
          type: string
        created_user_id:
          type: string
        updated_at:
          type: string
        date:
          type: string
          format: date
        meal_plan_customer:
          type: object
          nullable: true
          properties:
            meal_plan_customer_id:
              type: string
            first_name:
              type: string
            last_name:
              type: string
    MealPlanCustomer:
      allOf:
      - $ref: '#/components/schemas/MealPlanCustomerInput'
      - type: object
        properties:
          mealplan_customer_id:
            type: string
          created_at:
            type: string
  parameters:
    Search:
      name: search
      in: query
      required: false
      schema:
        type: string
      description: Keyword to filter results by name.
    Paginate:
      name: paginate
      in: query
      required: false
      schema:
        type: integer
        enum:
        - 0
        - 1
      description: Set to 1 to enable pagination.
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        default: 10
      description: Number of records per page.
    Page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        default: 1
      description: Page number to retrieve.
  responses:
    Unauthorized:
      description: Invalid or missing access token / API key.
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: Access-Token
      description: Entity client access token issued by the Create Entity operation.
    ApiKey:
      type: apiKey
      in: header
      name: API Key
      description: Organization-level API key (documented header name "API Key"), used to provision entities via the Create Entity operation.