Meals

Log a meal

post/api/meals

Request

  • Base URL
    https://api.hiyd.ai
  • Auth
    HTTP bearer

Request body multipart/form-data

meal_type'breakfast' | 'lunch' | 'dinner' | 'snack' required
meal_namestring
meal_datestring date
meal_timestring time
food_item_idstring uuid

Canonical food_items row to log. When sent with quantity, the backend recomputes all nutrition totals server-side and ignores client-sent totals.

quantitynumber

Amount consumed, in the food's serving_size_unit

quantity_unitstring

Unit for quantity (defaults to the food's serving_size_unit)

imagestring binary

Food image file (max 5MB) - will be attached to the food object as image_url

Response

Meal logged successfully

idstring uuid
user_idstring uuid
meal_type'breakfast' | 'lunch' | 'dinner' | 'snack'
meal_namestring
meal_datestring date
meal_timestring time
total_caloriesnumber
total_protein_gnumber
total_carbs_gnumber
total_fat_gnumber
itemsobject[]

Changes

No recorded changes to this operation across all 1 revision of this API.