---
title: "PATCH /api/food-logs/{id}/edit"
method: PATCH
path: "/api/food-logs/{id}/edit"
tags: ["Food Log"]
---

# PATCH /api/food-logs/{id}/edit

`PATCH /api/food-logs/{id}/edit`

## Request

- Base URL: `https://api.rewritelifestyle.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rewritelifestyle.ai/api/food-logs/{id}/edit`
- Auth: HTTP bearer

## Path parameters

- `id` number, required

## Headers

- `x-timezone` string, required

## Request body

- CreateFoodLogDto
  - `foodName` string, required
  - `description` string
  - `servingSize` string
  - `food_id` string: FatSecret food_id
  - `serving_id` string: FatSecret serving_id
  - `quantity` number: Quantity in the chosen unit
  - `unit` string: Unit label the user chose
  - `entry_mode` 'serving' | 'advanced': Entry mode used in the log sheet: "serving" = native FatSecret serving picker, "advanced" = manual/advanced editor.
  - `calories` number
  - `protein` number
  - `carbs` number
  - `fat` number
  - `fiber` number
  - `sugar` number
  - `sodium` number
  - `meal_number` number
  - `logDate` string
  - `logTime` string
  - `nutrition` string[]: Detailed nutrition breakdown
  - `my_food_id` number: Reference to a saved "My Foods" entry. When set, missing fields are hydrated from the saved food and last_logged_at is bumped on the source row.
  - `note` string: Optional meal note to attach to this food log entry at create time. Premium-gated (enrolled or paid subscription). Ignored on PATCH.
  - `manual_macros` boolean: Opt-out flag. When true, the server will NOT recompute macros from FatSecret and will trust client-supplied calories/protein/carbs/fat/fiber as-is. Use this for user-overridden portions where the client has authoritative numbers (e.g. label-scan, photo analysis with explicit nutrition_facts override). Default false.
  - `image_refs` string[]: Existing S3 keys to attach to this log (from a previously logged food). Used when logging from the recently-logged list where an image ref already exists. In FormData requests, send as a JSON-encoded string: '["key1","key2"]'. Max 3.

## Response `200`

---

[API](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api.md) - [All operations](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/revisions/28695827f27a?raw)
