Whisk Docs
Whisk HomeHelp CenterDeveloper Tools
v2.0.0
v2.0.0
  • The Whisk Platform
  • Whisk API Overview
    • Introduction
    • Integration
    • Authentication
      • Server Token
      • User Access Token
        • Auth Flow Example
      • Client Token
      • Anonymous Access from Client Apps
    • Whisk Sandbox
    • Getting Started
  • Whisk API Reference 2.0
    • Provisioning
      • Get provisioning
    • Autocomplete
    • Community
      • Get your Communities
      • Get Communities from a Topic
      • Discover Recommended Communities
      • Search Communities
      • Get a Community
      • Get Recipes from a Community
      • Add Recipes to a Community
      • Remove a Recipe from a Community
      • Join a Community
      • Leave a Community
    • Posts and Reviews
      • Get reviews for a recipe
      • Create or edit review
      • Create a Post
      • Get Post by id
      • Delete a Post
      • Edit a Post
      • Report a Post
      • Create a Post Reply
      • Get Post Replies
      • Delete a Post reply
      • Report a Post reply
      • Like a Post or Reply
      • Users who liked a Post or Reply
    • Public profiles
      • Hide recipe in Public profile
      • Get Recipes for Public Profile
      • Get User's public profile by user_id
      • Get User's public profile by username
    • Custom Label
    • Feed
      • Obtain a Recipe Feed
    • Food DB
      • Autocomplete
      • Search
      • Get Food
    • Food List
    • Food Log
    • Foodpairing
    • Healthy meal recommendations
      • Healthy recipe only recommendations for DA
      • Recipe recommendations for SH
      • Tailored Plan API request for Samsung TV
    • Meal Plan
      • Generate a Meal Plan
      • Meal Object
        • Get Meals
        • Delete Meal
        • Add a Meal
      • Meal Plan Settings Object
        • Get Meal Plan Settings
        • Update Meal Plan Settings
      • Meal Plan Batch
    • Recipe
      • Get a Recipe
      • Search a Recipe
      • User Recipes & Collections
        • Add User Recipe
        • Create A Recipe
        • Update External Recipe
        • Get All User Recipes
        • Update User Recipe
        • Remove Recipe from Favorites
        • Create Collection
        • Get All User Collections
        • Get Collection
        • Get Recipes from a Collection
        • Remove Collection
        • Get Smart Collection
        • Get Recipes from a Smart Collection
    • Shopping List
      • Get your Shopping Lists
      • Get a Shopping List
      • Create a Shopping List
      • Delete a Shopping List
      • Update basic details of a Shopping List
      • Move Items between Shopping Lists
      • Add Items to a Shopping List
      • Delete an Item from a Shopping List
      • Update an Item in a Shopping List
      • Clear Items from a Shopping List
    • Media
    • Store Item
    • Unit Conversion
    • Users
      • Get a User
      • Update User Settings using Patch
      • Update User Settings using Post
    • Try it out!
  • Shopping List SDK
    • Overview
    • Examples
      • Shoppable Recipes
      • Shoppable Products
      • Shoppable Media
    • Basic Setup
      • Basic Setup
      • Methods
      • Event Listeners
      • Widget
      • Subscriptions
      • Global Configuration
      • UTM Parameters
      • Using With SPA
  • Shopping List Mobile API
    • Overview
    • Examples
    • Reference
  • API Resources
    • Authentication Scopes
    • Errors and Troubleshooting
    • Cursor Pagination
    • Limits
    • Nutrients
    • Recipe Labels
    • Filtering Recipes using Custom Labels
    • Health Score, Glycemic Index, Glycemic Load
    • Whisk User Data
    • Integrated Retailers
    • Optimizing Image Load
    • Meal Plan
Powered by GitBook
On this page

Was this helpful?

  1. Whisk API Reference 2.0

Meal Plan

This is how the data structure of a Meal Plan object looks like:

{
  "meal_plan_id": "5f27a59a9a8641078c7057eeec0a1b90",
  "start_date": 
    ...
  "end_date":
    ...
  "meals": [
    {
      "id": "894f285cd9d543d3b78b374f59b56311",
      "meal_type": "MEAL_TYPE_BREAKFAST",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 3,
      "date":
        ...
    },
    {
      "id": "aab8f93131724117836f8cab365518c6",
      "meal_type": "MEAL_TYPE_LUNCH",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 4,
      "date":
        ...
    },
    {
      "id": "4b50cf3d2bf24ebe9c4630d2816fea99",
      "meal_type": "MEAL_TYPE_DINNER",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 5,
      "date":
        ...
    },
    ...
  ],
  "result_code": "GENERATION_RESULT_CODE_SUCCESS"
}

The following attributes store the core information of a meal plan:

Attribute

Type

Description

Example Value

meal_plan_id

string

The meal plan identifier.

aab8f93131724117836f8cab365518c6

start_date

array

The start date of the meal plan.

end_date

array

The end date of the meal plan.

meals

array

The information on different meals included in the plan.

result_code

string

The meal plan generation result code.

  • GENERATION_RESULT_CODE_SUCCESS: Appears when the meal plan is generated successfully.

  • GENERATION_RESULT_CODE_NOT_ENOUGH_MEALS: Appears when the meal plan fails to generate due to an insufficient number or variety of meals available for you.

Each array further contains additional attributes as described below.

start_date/end_date

  "start_date": {
    "year": 2020,
    "month": 10,
    "day": 1
  },
  "end_date": {
    "year": 2020,
    "month": 10,
    "day": 10
  },

Attribute

Type

Description

Example Value

year

integer

The year.

2020

month

integer

The month.

10

day

integer

The day of the month.

1

meals

"meals": [
    {
      "id": "894f285cd9d543d3b78b374f59b56311",
      "meal_type": "MEAL_TYPE_BREAKFAST",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 3,
      "date":
        ...
    },
    ...
    ],

Attribute

Type

Description

Example Value

id

string

The meal identifier.

894f285cd9d543d3b78b374f59b56311

meal_type

string

A label to identify the type of meal.

  • MEAL_TYPE_BREAKFAST

  • MEAL_TYPE_LUNCH

  • MEAL_TYPE_DINNER

date_time

array

This attribute is deprecated and displays the same value as the date attribute.

-

content

array

Contains the recipe data for the meal.

generated

boolean

Shows whether the meal is auto-generated or has been manually added by the user to the meal plan.

  • true

  • false

day_slot

number

The day slot assigned to the meal. Each day consists of up to 7 slots, each containing a single meal along with its recipe information.

3

date

array

The date assigned to the meal.

"date": { "year": 2020, "month": 10, "day": 1 }

The Meal Plan API provides the following endpoints:

Note: All Meal Plan API endpoints first check whether a meal plan is already assigned to the user. When not found, a meal plan gets created and assigned to the user automatically. This means there is no need to manually create a meal plan for the user.

PreviousTailored Plan API request for Samsung TVNextGenerate a Meal Plan

Last updated 4 years ago

Was this helpful?

See .

See .

See .

See .

Generate a Meal Plan
Get Meal Plan Settings
Update Meal Plan Settings
Get Meals
Add a Meal
Delete Meal
start_date
end_date
meals
Recipe Data