Skip to main content
GET
/
plan
/
current
Get Current Plan
curl --request GET \
  --url https://api.example.com/plan/current
{
  "id": 123,
  "user_id": 123,
  "active": true,
  "created_at": {},
  "updated_at": {},
  "daily_menus": [
    {
      "id": 123,
      "day_of_week": 123,
      "meal_details": [
        {
          "id": 123,
          "recipe_id": 123,
          "schedule": 123,
          "status": 123,
          "meal_type": "<string>",
          "recipe": {
            "id": 123,
            "name": "<string>",
            "calories": 123,
            "protein": 123,
            "carbs": 123,
            "fat": 123,
            "image_url": "<string>",
            "recipe_url": "<string>",
            "recipe_id": 123,
            "ingredients": "<string>",
            "meal_types": [
              {
                "id": 123,
                "name": "<string>"
              }
            ],
            "diet_types": [
              {
                "id": 123,
                "name": "<string>"
              }
            ]
          }
        }
      ]
    }
  ]
}

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Authorization: Bearer <token>

Response

id
integer
required
Unique identifier for the plan
user_id
integer
required
ID of the user who owns this plan
active
boolean
required
Indicates whether the plan is active
created_at
datetime
required
Timestamp when the plan was created
updated_at
datetime
required
Timestamp when the plan was last updated
daily_menus
array
required
List of daily menus in the plan
id
integer
required
Unique identifier for the daily menu
day_of_week
integer
required
Day of the week (1-7, where 1 is Monday)
meal_details
array
required
List of meal details for this day
id
integer
required
ID of the meal detail
recipe_id
integer
required
Recipe ID associated with the meal detail
schedule
integer
required
Order of meals (1-6)
status
integer
required
Status of the meal detail (0: pending, 1: completed)
meal_type
string
required
Type of meal. Possible values: breakfast, lunch, dinner, snack
recipe
object
required
Associated recipe details
id
integer
required
Unique identifier for the recipe
name
string
required
Name of the recipe
calories
integer
required
Calorie content (minimum: 0)
protein
integer
required
Protein content in grams (minimum: 0)
carbs
integer
required
Carbohydrate content in grams (minimum: 0)
fat
integer
required
Fat content in grams (minimum: 0)
image_url
string
URL to the recipe image
recipe_url
string
URL to the full recipe details
recipe_id
integer
required
External recipe identifier
ingredients
string
required
Comma-separated list of ingredients
meal_types
array
required
List of applicable meal types
id
integer
required
Category ID
name
string
required
Category name
diet_types
array
required
List of applicable diet types
id
integer
required
Category ID
name
string
required
Category name

Response Example

{
  "id": 1,
  "user_id": 42,
  "active": true,
  "created_at": "2026-03-01T10:00:00Z",
  "updated_at": "2026-03-01T10:00:00Z",
  "daily_menus": [
    {
      "id": 1,
      "day_of_week": 1,
      "meal_details": [
        {
          "id": 1,
          "recipe_id": 12345,
          "schedule": 1,
          "status": 0,
          "meal_type": "breakfast",
          "recipe": {
            "id": 1,
            "name": "Spaghetti Carbonara",
            "calories": 400,
            "protein": 20,
            "carbs": 50,
            "fat": 15,
            "image_url": "https://example.com/image.jpg",
            "recipe_url": "https://example.com/recipe",
            "recipe_id": 12345,
            "ingredients": "Spaghetti, eggs, pancetta, parmesan cheese, black pepper",
            "meal_types": [
              {
                "id": 1,
                "name": "lunch"
              }
            ],
            "diet_types": [
              {
                "id": 1,
                "name": "high_protein"
              }
            ]
          }
        }
      ]
    }
  ]
}

Error Responses

401 Unauthorized
The request lacks valid authentication credentials
{
  "detail": "Not authenticated"
}
404 Not Found
No active plan found for the current user
{
  "detail": "Plan not found"
}
500 Internal Server Error
An unexpected error occurred on the server
{
  "detail": "Internal server error"
}

Build docs developers (and LLMs) love