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 Get and Update the settings as needed.
This is how the data structure of a Meal Plan settings object looks like:
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.
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.
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
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.
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.
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 Heath Score.
"health_score": {
"from": 4
}
Attribute
Type
Description
Example Value
label
array
A list of labels of different categories. For more information, see Labels.
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.
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.