Meal Plans
Meal planning endpoints for the Smart Recipe Book
These are authenticated endpoints. You can visit authentication to register an account.
These endpoints allow you to plan meals by scheduling recipes for specific dates and meal types. All endpoints are scoped to the currently authenticated user.
These endpoints support pagination and sorting. Read more about these features here.
The Meal Plan model
| Prop | Type | Default |
|---|---|---|
id | string | - |
recipeId | string | - |
recipe | Recipe | - |
date | Date | - |
mealType | string | - |
owner | Profile | - |
created | Date | - |
Query parameters
The following optional query parameters can be used to filter meal plan entries by date range.
| Prop | Type | Default |
|---|---|---|
startDate | ISO date string | - |
endDate | ISO date string | - |
Get all meal plan entries
Retrieve all meal plan entries for the currently authenticated user. Use startDate and endDate query parameters to filter by date range.
Create meal plan entry
Add a recipe to your meal plan for a specific date and meal type.
Allowed mealType values: Breakfast, Lunch, Dinner, Snack.
If the recipe does not exist you will receive a 404 Not Found error. If mealType is not one of the allowed values you will receive a 400 Bad Request error.
Delete meal plan entry
Remove a meal plan entry by its id. Only the owner can delete it.
Returns an empty 204 No Content response on success.