Meal Plan

This is how the data structure of a Meal Plan object looks like:

{
  "meal_plan_id": "5f27a59a9a8641078c7057eeec0a1b90",
  "start_date": 
    ...
  "end_date":
    ...
  "meals": [
    {
      "id": "894f285cd9d543d3b78b374f59b56311",
      "meal_type": "MEAL_TYPE_BREAKFAST",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 3,
      "date":
        ...
    },
    {
      "id": "aab8f93131724117836f8cab365518c6",
      "meal_type": "MEAL_TYPE_LUNCH",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 4,
      "date":
        ...
    },
    {
      "id": "4b50cf3d2bf24ebe9c4630d2816fea99",
      "meal_type": "MEAL_TYPE_DINNER",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 5,
      "date":
        ...
    },
    ...
  ],
  "result_code": "GENERATION_RESULT_CODE_SUCCESS"
}

The following attributes store the core information of a meal plan:

Each array further contains additional attributes as described below.

start_date/end_date

  "start_date": {
    "year": 2020,
    "month": 10,
    "day": 1
  },
  "end_date": {
    "year": 2020,
    "month": 10,
    "day": 10
  },

meals

"meals": [
    {
      "id": "894f285cd9d543d3b78b374f59b56311",
      "meal_type": "MEAL_TYPE_BREAKFAST",
      "date_time":
        ...
      "content": {
        "recipe": 
          ...
      },
      "generated": true,
      "day_slot": 3,
      "date":
        ...
    },
    ...
    ],

The Meal Plan API provides the following endpoints:

Note: All Meal Plan API endpoints first check whether a meal plan is already assigned to the user. When not found, a meal plan gets created and assigned to the user automatically. This means there is no need to manually create a meal plan for the user.

Last updated