Skip to main content

Endpoint

Update the consumption status of a specific meal. This is used in the Dashboard to track which meals have been eaten.

Path Parameters

integer
required
The unique identifier of the meal detail to update

Query Parameters

boolean
required
Whether the meal has been consumed (true) or not (false)

Authentication

This endpoint requires authentication. Include the JWT token in the Authorization header.

Response

Returns the updated meal detail with the new consumption status.
integer
Meal detail ID
integer
ID of the daily menu this meal belongs to
integer
Type of meal (breakfast, lunch, dinner, snack)
integer
ID of the recipe assigned to this meal
boolean
Whether the meal has been consumed
object
Complete recipe information

Example Request

Example Response

200 OK

Error Responses

The meal detail with the specified ID does not exist.
Missing or invalid authentication token.

Usage in Dashboard

This endpoint is called when users toggle the consumption status of meals in the Dashboard:
  1. User views their daily meal plan
  2. User clicks the checkbox/toggle on a meal card
  3. Frontend calls this endpoint with the meal_detail_id and new is_consumed status
  4. Dashboard updates to reflect the new nutritional totals
The Dashboard automatically recalculates daily macronutrient totals when meal status is updated.