Food Log
Create one or many food log entries
Body may be a single CreateFoodLogDto or a non-empty array of them. Single body returns { foodLog }; array body returns { foodLogs[] }. Items are persisted sequentially with the same per-row pipeline as the single path (FatSecret recompute, coach notify, badges, vault hooks). Fail-fast — a mid-array failure leaves earlier rows saved.
post/api/food-log
Request
- Base URLhttps://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
- URLhttps://api.rewritelifestyle.ai/api/food-log
- AuthHTTP bearer
Headers
x-timezonestring required
Response
unknown required
Example response
{
"success": true,
"message": "Food logged successfully",
"foodLog": {
"id": 101,
"user_id": 5,
"food_name": "Grilled Chicken Breast",
"serving_size": "4 oz",
"calories": 180,
"protein": 35,
"carbs": 0,
"fat": 3.5,
"fiber": 0,
"sugar": 0,
"sodium": 75,
"meal_number": 2,
"log_time": "12:30:00",
"log_date": "2026-02-19",
"created_at": "2026-02-19T12:30:00.000Z"
}
}Changes
No recorded changes to this operation across all 34 revisions of this API.