Create Plan
Plans
Create Plan
Create a new meal plan for the authenticated user
POST
Create Plan
Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.Request Body
List of daily menus to include in the plan
Day of the week (1-7, where 1 is Monday)
Plan ID to which this daily menu belongs
List of meal details for this day
Recipe ID associated with the meal detail
Order of meals (1-6)
Status of the meal detail (0: pending, 1: completed)
Type of meal. Possible values:
breakfast, lunch, dinner, snackRequest Example
Response
Unique identifier for the plan
ID of the user who owns this plan
Indicates whether the plan is active
Timestamp when the plan was created
Timestamp when the plan was last updated
List of daily menus in the plan
Unique identifier for the daily menu
Day of the week (1-7, where 1 is Monday)
List of meal details for this day
ID of the meal detail
Recipe ID associated with the meal detail
Order of meals (1-6)
Status of the meal detail (0: pending, 1: completed)
Type of meal. Possible values:
breakfast, lunch, dinner, snackAssociated recipe details
Unique identifier for the recipe
Name of the recipe
Calorie content (minimum: 0)
Protein content in grams (minimum: 0)
Carbohydrate content in grams (minimum: 0)
Fat content in grams (minimum: 0)
URL to the recipe image
URL to the full recipe details
External recipe identifier
Comma-separated list of ingredients
Response Example
Error Responses
401 Unauthorized
The request lacks valid authentication credentials
422 Unprocessable Entity
Invalid request body or validation error
500 Internal Server Error
An unexpected error occurred on the server
