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
  • Update Settings
  • Update Settings

Was this helpful?

  1. Whisk API Reference 2.0
  2. Meal Plan
  3. Meal Plan Settings Object

Update Meal Plan Settings

PreviousGet Meal Plan SettingsNextMeal Plan Batch

Last updated 4 years ago

Was this helpful?

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

Note: To use the Whisk Meal Plan API, you must acquire a User Token. For more information, see .

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.

{}
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
{
  "code": "auth.tokenNotFound"
}
This is unexpected response, something is wrong on our side, please contact: [email protected]

Note: Whisk provides its APIs on the Swagger interface for you to try it out. You can call this endpoint .

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.

{}
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
{
  "code": "auth.tokenNotFound"
}
This is unexpected response, something is wrong on our side, please contact: [email protected]
{
  "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.

curl -X PUT "https://api.whisk.com/mealplan/v2/settings" 
     -H "accept: application/json" 
     -H "Authorization: Bearer <Access-Token>" 
     -H "Content-Type: application/json" 
     -d "{ \"settings\": { \"servings\": 4, \"calorie_per_day\": 8000, \"included_days\": [ \"DAY_OF_WEEK_TUESDAY\", \"DAY_OF_WEEK_SATURDAY\", \"DAY_OF_WEEK_MONDAY\", \"DAY_OF_WEEK_FRIDAY\", \"DAY_OF_WEEK_WEDNESDAY\", \"DAY_OF_WEEK_SUNDAY\", \"DAY_OF_WEEK_THURSDAY\" ], \"included_meal_types\": [ \"MEAL_TYPE_BREAKFAST\", \"MEAL_TYPE_LUNCH\", \"MEAL_TYPE_DINNER\" ], \"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 } ] }, { \"day\": \"DAY_OF_WEEK_MONDAY\", \"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 } ] }, { \"day\": \"DAY_OF_WEEK_TUESDAY\", \"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 } ] }, { \"day\": \"DAY_OF_WEEK_WEDNESDAY\", \"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 } ] }, { \"day\": \"DAY_OF_WEEK_THURSDAY\", \"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 } ] }, { \"day\": \"DAY_OF_WEEK_FRIDAY\", \"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 } ] }, { \"day\": \"DAY_OF_WEEK_SATURDAY\", \"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 } ] } ], \"week_start\": \"DAY_OF_WEEK_MONDAY\", \"generation_algorithm\": \"GENERATION_ALGORITHM_3_MEAL\",\"food_settings\": { \"labels\": [ { \"label\": { \"diet\": \"DIET_VEGETARIAN\", \"category\":\"CATEGORY_HEALTHY_RECIPES\", \"avoidance\": \"AVOIDANCE_ALCOHOL\", \"cuisine\": \"CUISINE_WORLD_CUISINE\", \"meal_type\": \"MEAL_TYPE_BRUNCH\", \"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 }}}}"

Note: Whisk provides its APIs on the Swagger interface for you to try it out. You can call this endpoint .

See .

Hint: After you update your meal plan settings, you can always crosscheck it using the endpoint.

User Access Tokens
here
here
Get Meal Plan Settings
Meal Plan Settings