Update Meal Plan Settings

At your convenience, you can make adjustments to the meal plan settings to accordingly change or adjust your meal plan.

The Meal Plan API provides you two endpoints that allow you to update the meal plan settings. The only difference between the two is that one of them requires a {meal_plan_id} and the other doesn't. This arrangement has been made for a future planned feature of supporting multiple meal plans for every user.

While at the moment, since Whisk only supports a single meal plan per user, the {meal_plan_id} has been kept optional for both endpoints. You can leave it blank and it would be directly derived from the user token being used for API authentication.

Update Settings

PUT https://api.whisk.com/mealplan/v2/settings

Use this endpoint to update your meal plan settings using the body parameter as described below.

Request Body

Name
Type
Description

body

object

This parameter allows you to specify the new settings, for the meal plan. For more information, see the Request Body Object Example below.

{}

Update Settings

PUT https://api.whisk.com/mealplan/v2/{meal_plan_id}/settings

Use this endpoint to update your meal plan settings using the meal_plan_id and the body parameters as described below.

Path Parameters

Name
Type
Description

meal_plan_id

string

The meal-plan identifier.

Request Body

Name
Type
Description

body

object

This parameter allows you to specify the new settings, for the meal plan. For more information, see the Request Body Object Example below.

{}
{
  "meal_plan_id": "string",
  "settings": {
    "servings": 0,
    "calorie_per_day": 0,
    "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_INVALID",
    "generation_algorithm": "GENERATION_ALGORITHM_INVALID",
    "food_settings": {
      ...
    },
    "custom_labels": {
      ...
    }
  }
}

The body object contains the following attributes and arrays that allows you to update the meal plan settings:

Attribute

Type

Description

Example Value

meal_plan_id

string

The meal-plan identifier. You can leave it blank when using an Access Token for API authentication.

5f27a59a9a8641078c7057eeec0a1b90

settings

array

This includes all the core settings that you would want to change or adjust before regenerating your meal plan.

Last updated

Was this helpful?