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
  2. Meal Plan

Meal Plan Settings Object

The meal plan settings object

PreviousAdd a MealNextGet Meal Plan Settings

Last updated 4 years ago

Was this helpful?

Meal Plan Settings contain all the essential information based on which your meal plan is created. The Meal Plan API provides you with endpoints to and the settings as needed.

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

"settings": {
  "servings": 2,
  "calorie_per_day": 4000,
  "included_days": [
    "DAY_OF_WEEK_INVALID"
  ],
  "included_meal_types": [
    "MEAL_TYPE_INVALID"
  ],
  "enabled_auto_generation": true,
  "week_template": [
    ...
  ],
  "replace_only_generated": true,
  "week_start": "DAY_OF_WEEK_MONDAY",
  "generation_algorithm": "GENERATION_ALGORITHM_3_MEAL",
  "food_settings": {
    ...
  },
  "custom_labels": {
    ...
  }
}

The following attributes define the core of the settings object:

Attribute

Type

Description

Example Value

servings

integer

The number of people to serve meals in the meal plan.

2

calorie_per_day

integer

The number of daily calories (with a ±100 kcal variance) that are expected to be served by the meal plan.

4000

included_days

string

This attribute is deprecated and has been replaced by the week_template attribute.

_

included_meal_types

string

This attribute is deprecated and has been replaced by the week_template attribute.

_

enabled_auto_generation

boolean

Agreement to generate the meal plan automatically. This attribute has no impact on the auto-generation algorithm irrespective of its value.

  • true

  • false

week_template

array

The schedule settings of the meal plan. It includes information on preferred days and slots for meals assignment.

replace_only_generated

boolean

Controls the replacement of manually added meals with new auto-generated meals in the meal plan.

  • The attribute is set as true, If the meals that were manually added to the meal plan are retained, and the new meals are only assigned to the empty slots (if any), or they replace the existing auto-generated meals in the plan.

  • The attribute is set as false, If all the existing meals and empty slots are replaced with new meals.

week_start

string

The starting day of the week in the meal plan schedule.

  • DAY_OF_WEEK_MONDAY

  • DAY_OF_WEEK_TUESDAY

  • DAY_OF_WEEK_WEDNESDAY

  • DAY_OF_WEEK_THURSDAY

  • DAY_OF_WEEK_FRIDAY

  • DAY_OF_WEEK_SATURDAY

  • DAY_OF_WEEK_SUNDAY

generation_algorithm

string

The meal generation algorithm.

  • GENERATION_ALGORITHM_3_MEAL: It performs casual filtering of recipes irrespective of the user's nutrition preferences. Though it does prefer including recipes that match the preferences, still it may also include the ones that are not a good match.

  • GENERATION_ALGORITHM_3_MEAL_NUTRITION_BALANCE: It performs strict filtering to include only those recipes that match the user's nutrition preferences. Note: This is the default algorithm utilized by Whisk to auto-generate the meal plan.

food_settings

array

User's preferences related settings for filtering recipes.

custom_labels

array

A list of labels for filtering recipes.

Each array contains additional attributes as described below.

week_template

"week_template": [
  {
    "day": "DAY_OF_WEEK_SUNDAY",
    "meal_templates": [
      {
        "meal_type": "MEAL_TYPE_BREAKFAST",
        "day_slot": 3
      },
      {
        "meal_type": "MEAL_TYPE_LUNCH",
        "day_slot": 4
      },
      {
        "meal_type": "MEAL_TYPE_DINNER",
        "day_slot": 5
      }
    ]
  },
  ...
],

Attribute

Type

Description

Example Value

day

string

Represents a day of the week.

  • DAY_OF_WEEK_MONDAY

  • DAY_OF_WEEK_TUESDAY

  • DAY_OF_WEEK_WEDNESDAY

  • DAY_OF_WEEK_THURSDAY

  • DAY_OF_WEEK_FRIDAY

  • DAY_OF_WEEK_SATURDAY

  • DAY_OF_WEEK_SUNDAY

meal_templates

array

Includes mapping details of different meal-types with day slots, which means what type of meals should be generated to which slot in a day. For more information, see the array break-up below.

"meal_templates": [ { "meal_type": "MEAL_TYPE_BREAKFAST", "day_slot": 3 }, { "meal_type": "MEAL_TYPE_LUNCH", "day_slot": 4

}, { "meal_type": "MEAL_TYPE_DINNER", "day_slot": 5 } ]

The meal_templates array contains the following attributes:

Attribute

Type

Description

Example Value

meal_type

string

The different types of meal that you may have during the day. These meal-types are independent of day slots and can be assigned to any day slot as required. Additionally, the meal-types are also independent of recipe labels, which means you can have a meal-type as Lunch but inside it, you can use a Breakfast recipe for the meal.

  • MEAL_TYPE_BREAKFAST

  • MEAL_TYPE_LUNCH

  • MEAL_TYPE_DINNER

day_slot

integer

Indicates a slot within the day to consume a meal. As part of your meal plan, you can as many as 7 slots in a day dedicated to different meal-types.

3

food_settings

"food_settings": {
  "labels": [
    {
      "label": {
        "diet": "DIET_VEGETARIAN",
        "category": [
          "CATEGORY_QUICK_AND_EASY",
          "CATEGORY_HEALTHY_RECIPES",
          "CATEGORY_HOLIDAYS_AND_EVENTS"
        ],
        "avoidance": "AVOIDANCE_ALCOHOL",
        "cuisine": [
          "CUISINE_EUROPEAN",
          "CUISINE_WORLD_CUISINE"
        ],
        "meal_type": [
          "MEAL_TYPE_BREAKFAST",
          "MEAL_TYPE_BRUNCH",
          "MEAL_TYPE_DESSERTS",
          "MEAL_TYPE_DINNER"
        ],
        "nutrition": "NUTRITION_HEALTHY",
        "feature": "video",
        "holiday": "HOLIDAY_INVALID",
        "seasonality": "SEASONALITY_INVALID"
      },
      "boost": true
    }
  ],
  "include_ingredients": {
    "raw_ingredients": [
      {
        "name": "Tomato"
      }
    ],
    "min_ingredients_should_match": 1
  },
  "health_score": {
    "from": 4
  }
}

Attribute

Type

Description

Example Value

labels

array

Labels specific to the user's preferences for filtering recipes. For more information, see the array break-up below.

"labels": [ { "label": { "diet": "DIET_VEGETARIAN", "category": "CATEGORY_QUICK_AND_EASY", "avoidance": "AVOIDANCE_ALCOHOL", "cuisine": "CUISINE_EUROPEAN", "meal_type": "MEAL_TYPE_BREAKFAST", "nutrition": "NUTRITION_HEALTHY", "feature": "video", "holiday": "HOLIDAY_THANKSGIVING_DAY", "seasonality": "SEASONALITY_WINTER" }, "boost": true }

include_ingredients

array

Includes information on any specific ingredients and the number of ingredients to be considered for filtering recipes for the meal plan. For more information, see the array break-up below.

"include_ingredients": { "raw_ingredients": [ { "name": "Tomato" } ], "min_ingredients_should_match": 1 },

health_score

array

"health_score": { "from": 4 }

The labels array contains the following attributes:

Attribute

Type

Description

Example Value

label

array

"label": { "diet": "DIET_VEGETARIAN", "category": "CATEGORY_QUICK_AND_EASY", "avoidance": "AVOIDANCE_ALCOHOL", "cuisine": "CUISINE_EUROPEAN", "meal_type": "MEAL_TYPE_BREAKFAST", "nutrition": "NUTRITION_HEALTHY", "feature": "video", "holiday": "HOLIDAY_THANKSGIVING_DAY", "seasonality": "SEASONALITY_WINTER" },

boost

boolean

Controls the filtering approach.

  • The attribute is set as true to casually filter the recipes based on the specified labels. This means that the recipes that match with the specified labels would be preferred over the others but the final results would include both matched and unmatched recipes.

  • The attribute is set asfalse to strictly filter only those recipes that match with the specified labels.

The include_ingredients array contains the following attributes:

Attribute

Type

Description

Example Value

raw_ingredients

string

A name of a particular ingredient to match while filtering recipes.

"raw_ingredients": [ { "name": Tomato" } ],

min_ingredients_should_match

integer

Indicates the minimum number of ingredients that must match while filtering recipes. If the value specified is greater than 0, the result includes recipes, which have at least the specified number of ingredients. And, if it is set as 0, recipes with more matched ingredients are prioritized.

0

custom_labels

"custom_labels": {
  "everywhere": {
    "in": [
      {
        "group": "",
        "label": ""
      }
    ],
    "boost_in": [
      {
        "group": "",
        "label": ""
      }
    ],
    "all": [
      {
        "group": "",
        "label": ""
      }
    ],
    "not": [
      {
        "group": "",
        "label": ""
      }
    ]
  },
  "in_recipe": {
    ...
  },
  "in_ingredients": {
    ...
  },
  "in_instruction_steps": {
    ...
  }
}

Note: These labels are generally created in the Whisk Studio application and are left blank while managing meal plan settings using the Whisk API.

To learn how to pull or update meal plan settings, read the following endpoints' documentation:

See .

See .

See .

Includes the minimum health score to be considered for filtering recipes for the meal plan. Health Scores are calculated on a 2 to 10 scale based on nutrient density and USDA recommendations for a healthy diet. A higher Health Score means healthier food. For more information, see .

A list of labels of different categories. For more information, see .

Get
Update
Get Meal Plan Settings
Update Meal Plan Settings
week_template
food_settings
custom_labels
Labels
Heath Score