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
integer
required
Day of the week (1-7, where 1 is Monday)
integer
required
Plan ID to which this daily menu belongs
Request Example
Response
integer
required
Unique identifier for the plan
integer
required
ID of the user who owns this plan
boolean
required
Indicates whether the plan is active
datetime
required
Timestamp when the plan was created
datetime
required
Timestamp when the plan was last updated
List of daily menus in the plan
integer
required
Unique identifier for the daily menu
integer
required
Day of the week (1-7, where 1 is Monday)
array
required
List of meal details for this day
integer
required
ID of the meal detail
integer
required
Recipe ID associated with the meal detail
integer
required
Order of meals (1-6)
integer
required
Status of the meal detail (0: pending, 1: completed)
string
required
Type of meal. Possible values:
breakfast, lunch, dinner, snackobject
required
Associated recipe details
integer
required
Unique identifier for the recipe
string
required
Name of the recipe
integer
required
Calorie content (minimum: 0)
integer
required
Protein content in grams (minimum: 0)
integer
required
Carbohydrate content in grams (minimum: 0)
integer
required
Fat content in grams (minimum: 0)
string
URL to the recipe image
string
URL to the full recipe details
integer
required
External recipe identifier
string
required
Comma-separated list of ingredients
Response Example
Error Responses
The request lacks valid authentication credentials
Invalid request body or validation error
An unexpected error occurred on the server
