Food Log
Edit any fields of a food log entry (partial update)
patch/api/food-log/{id}/edit
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/{id}/edit
- AuthHTTP bearer
Path parameters
idnumber required
Headers
x-timezonestring required
Request body
Example request
{
"foodName": "Chicken Breast",
"description": "1/4 pizza",
"servingSize": "4 oz",
"food_id": "33691",
"serving_id": "57972",
"quantity": 3,
"unit": "oz",
"entry_mode": "serving",
"calories": 180,
"protein": 35,
"fat": 3.5,
"sodium": 75,
"meal_number": 1,
"logDate": "2024-01-15",
"logTime": "07:30:00",
"nutrition": [
{
"name": "Sugar",
"value": 4,
"unit": "g"
},
{
"name": "Sodium",
"value": 170,
"unit": "mg"
}
],
"my_food_id": 42,
"note": "Ate out, estimated portions.",
"image_refs": [
"food-log-images/42/1234567890.jpg"
]
}Response
unknown required
Example response
{
"success": true,
"foodLog": {
"id": 1,
"food_name": "Grilled Chicken",
"calories": 200,
"protein": 38,
"carbs": 0,
"fat": 4,
"serving_size": "5 oz",
"food_id": "33691",
"serving_id": "57969",
"quantity": 5,
"unit": "oz",
"meal_number": 2,
"log_time": "08:00:00",
"log_date": "2026-03-16",
"images": [
"https://cdn.example.com/signed-url"
]
}
}Changes
No recorded changes to this operation across all 34 revisions of this API.