Creating and Updating a Meal Plan

❗️

Meal Plan Builder access is available as a paid feature. For pricing and activation, please reach out to your manager.

Creating a Meal Plan

You can prepare a complete meal plan for the whole week against a profile using the the POST /profile-daily-meal-plan/ endpoint. For more details regarding the input fields, refer to the endpoint schema.

You would have to make a POST request for each day of the week separately. A sample request for Monday's meal plan against a particular profile looks like the following:

{
  "profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "day": "mon",
  "meals": [
    {
      "meal_id": "0bf177a3-f5ae-46a1-9a97-d95c300931e4",
      "category": "breakfast"
    },
    {
      "meal_id": "3f063b11-efe0-4441-8830-b375fe96d473",
      "category": "lunch"
    },
    {
      "meal_id": "70a5ed31-3af1-4905-ac3a-2f7de9023333",
      "category": "dinner"
    },
    {
      "meal_id": "930c78b4-cfa6-490b-9ee5-b5ecce092acc",
      "category": "snacks & appetizers"
    }
  ]
}

📘

The category field provided above represents the category that the meal is selected for. Only those categories (refer to field in GET /meal/ response) that the meal belongs to would be accepted. For example if a meal has ['lunch', 'dinner'] categories, you can only choose from those categories, and passing another category will result in a 400 error.

Updating Meal Plan

Use the PUT /profile-daily-meal-plan/profile/{profile_id}/day/{day} endpoint to update the meal plan of a profile for a particular day.