Get Meal Plan Settings

If you ever want to fetch and see all the crucial configuration based on which your meal plan is being generated, you must use the following endpoint as described here.

The Meal Plan API provides you two endpoints that allow you to get 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.

Meal Plan Settings

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

This endpoint allows you to get the meal plan settings.

Path Parameters

NameTypeDescription

meal_plan_id

string

The meal-plan identifier. You can leave it blank and it would be directly derived from the user token being used for API authentication.

"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": {
    ...
  }
}

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

Meal Plan Settings

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

This endpoint allows you to get the meal plan settings.

Path Parameters

NameTypeDescription

meal_plan_id

string

The meal-plan identifier.

"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": {
    ...
  }
}

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

Curl Call Example

curl -X GET "https://api.whisk.com/mealplan/v2/settings" 
     -H "accept: application/json" 
     -H "Authorization: Bearer <Access-Token>"

Last updated