Last updated
Was this helpful?
Last updated
Was this helpful?
The Suggestic API usually generates a 7-day meal plan based on the following format:
BREAKFAST, SNACK, LUNCH, DINNER
Even though there is no DESSERT mealtime category, you can replace a mealtime to include a dessert recipe. Usually, the SNACK
mealtime can be replaced with a dessert recipe in an already generated meal plan.
In this example, you will learn how to add a dessert recipe to your meal plan.
To have a
If it is required to set the with a custom format such as [BREAKFAST, LUNCH, SNACK, DINNER, SNACK],
use the . The generateSimpleMealPlan
plan does not consider the format.
Through the example, use the following endpoints in the same order as they are listed below:
The mutationto update your meal plan format to add a SNACK
mealtime.
The query, only if you update the meal plan settings.
The query to get the recipe Id to replace it with the dessert recipe.
, or queries to get the dessert recipe ID required
The mutation to swap the current recipe with the dessert recipe.
The query to verify that the recipes were swapped.
Follow the 6 steps below to include a dessert in your meal plan.
The first two steps are optional. Follow then only if you don't have a SNACK
defined in your meal plan.
Find all the steps detailed below in this . Modify the code accordingly.
If you updated the meal plan settings,
Execute the query to identify the mealtime or mealtimes to replace.
Execute the and replace the mealId
copied on step 2 and the recipeID
copied on step 4:
The document will guide you through the steps to add a dessert meal to your generated meal plan.