Recipe Swap Options
Retrieves similar recipes for meal plan swaps
Use the recipeSwapOptions
query to retrieve "similar" and "on plan" recipes given a recipeId.
This query is commonly used to provide alternatives for swapping recipes on a meal plan with similar macronutrients.
The serving
argument can be used with the numOfServings
field from a mealPlan
response to find alternative recipes with a similar amount of macronutrients.
Recipes in the response have also a serving
field to know how many of the total numbers of servings have to be served to keep a similar amount of macros.
If you already have a meal from a mealPlan
query, you can use the serving
argument to find more recipes. The recipes in the response will also have a serving
field to know how many of the total numbers of servings have to be served to keep a similar amount of macros.
Available Arguments
Argument | Required | Type | Description |
| True | ID | Original recipe ID. |
| False | Int | The number of recipe servings served. Default to 1. |
Available Fields
Field Name | Type | Description |
| Object that retrieves other meals in the existing meal plan for the same | |
| It retrieves all the recipes different than the original but similar in macros. If the |
Please note that recipeSwapOptions won't work for a user that doesn't have an active meal plan.
Example
The following example retrieves similar
and onPlan
recipes.
The following example retrieves 2 similar recipes and 5 onPlan recipes
Last updated