Meal Plan Settings Object

The meal plan settings object

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:

"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:

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
      }
    ]
  },
  ...
],

The meal_templates array contains the following attributes:

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
  }
}

The labels array contains the following attributes:

The include_ingredients array contains the following attributes:

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:

Last updated