Retrieving a Composed Meal Plan

❗️

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

Once you have generated the meal plan, use the GET /composed-meal-plan/profile/{profile_id} endpoint to get the profile daily meal plans for each day in the profile_daily_meal_plans field, and the list of grocery items, along with their quantities, needed to prepare the meals for the complete week in the profile_grocery_items field. For more details regarding the response fields, please refer to the endpoint schema. A sample response is given below:

{
    "profile_daily_meal_plans": [
        {
            "id": "6034cf12-59d8-411d-8904-0001efe6c0f8",
            "profile_id": "1c9d1277-464c-438b-8006-3d9d49e8f14b",
            "day": "tue",
            "meals": [
                {
                    "meal": {
                        "id": "f7c144cb-7b91-4104-a023-f3135945f333",
                        "title": "Soft-boiled eggs with avocado toast",
                        "image": "https://selfdecode.com/cdn/media/health-analysis/Soft-boiled_eggs_with_avocado_toast.png",
                        "categories": [
                            "breakfast"  // all possible categories that the meal can belong to
                        ],
                        "calories": 440,
                        "carbs": 0.4,
                        "fat": 0.7,
                        "protein": 0.7,
                        "tags": [
                            {
                                "id": "df8e3a35-1fef-4abc-a396-9c73798f4907",
                                "text": "This meal contains eggs",
                                "color": "orange",
                                "report_id": "62b48b18-cb50-4583-8d4f-5e59c0e011a7",
                                "conditions": [
                                    {
                                        "id": "9c91c642-d051-47b5-9961-2786e4e024be",
                                        "effect": 0,
                                        "override_text": null,
                                        "override_color": null,
                                        "outcome_id": null,
                                        "base_question_option_id": "a5449522-ed1f-4396-9401-e76fe9a654e7",
                                        "priority": 1
                                    },
                                    ...
                                ]
                            },
                            ...
                        ],
                        "servings": 1,
                        "instructions": "<ol>\r\n\t<li>Bring a small pot of water to a rolling boil over high heat.</li>\r\n\t<li>Gently add the eggs to the boiling water and cook for 5 minutes for a soft-boiled egg.</li>\r\n\t<li>While the eggs are cooking, toast 2 slices of gluten-free&nbsp;bread (or a whole-grain bread of your choice)&nbsp;in a toaster or on a skillet until crispy.</li>\r\n\t<li>Cut the avocado in half and remove the pit. Scoop out the flesh into a small bowl and mash it with a fork until it reaches your desired consistency.</li>\r\n\t<li>Once the eggs are cooked, remove them from the boiling water using a slotted spoon and place them in an egg cup or small bowl. Use a spoon to gently crack the top of the eggshell and remove it.</li>\r\n\t<li>Place the soft-boiled eggs on a plate with the toasted bread.</li>\r\n\t<li>Spread the mashed avocado on the toast slices, and sprinkle with salt and pepper to taste.</li>\r\n\t<li>Dip the toast into the soft-boiled egg yolk and enjoy!</li>\r\n</ol>\r\n\r\n<p><br />\r\n<span style=\"color:#000000\"><strong>Allergens: eggs</strong></span></p>",
                        "ingredients": [
                            {
                                "id": "fda4197a-effc-48a6-a6e9-688a944a3dfc",
                                "display_text": "1/2 an avocado"
                            },
                            {
                                "id": "a0c93ff2-3441-4e6f-8188-1329a175ef66",
                                "display_text": "2 large eggs"
                            },
                            {
                                "id": "b8c89920-ac2c-40da-97f0-9d9152f0b7ef",
                                "display_text": "2 slices, gluten-free bread"
                            }
                        ]
                    },
                    "category": "breakfast"  // category that the meal is chosen for by the profile
                },
                ...  // other chosen meals for the day, like lunch, etc.
            ]
        },
        ...  // meal plans for rest of the days of the week
    ],
    "profile_grocery_items": [
        {
            "id": "a6dd604a-1226-4ab2-a17b-8c061b9f271f",
            "quantity": 725.0,
            "unit": "g",
            "grocery_item": {
                "id": "8224c8f7-56f5-4f3a-85d1-011c9330afc9",
                "name": "avocado"
            }
        },
        {
            "id": "e1f99f03-0a05-442f-be3c-91ad50b56504",
            "quantity": 200.0,
            "unit": "g",
            "grocery_item": {
                "id": "972744db-1ef8-40fc-9fc3-9d931198b421",
                "name": "eggs"
            }
        },
        ...  // other grocery items
    ]
}

Composed Meal Plan Illustration

The fields from the response can be used to generate a composed meal plan detail view, as shown in the illustrations below:

Composed Meal Plan View with Annotations

Composed Meal Plan View with Annotations

Composed Meal Plan View - Extended

Composed Meal Plan View - Extended