confirm_draft
Writes an approved food diary draft to the user's FatSecret diary, adding new entries before applying changes. Use only after the user explicitly approves the draft.
Instructions
Write a Draft to the User's Food Diary: its new Food Entries first, then its changes.
New entries go under the Draft's Meal and Diary Day. A removed entry can't be restored. Call this only after the User explicitly approved this Draft in their latest message. After a correction, draft again and confirm the new Draft instead. Confirm each Draft once: a repeat usually returns the earlier result, but after a server restart it would write the Draft again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft_id | Yes | The draft_id returned by draft_entries. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meal | Yes | The Meal of the new entries; null when the Draft only has changes. | |
| status | Yes | partially_written: writing stopped at an item without a food_entry_id or a change not written. already_confirmed: an earlier call wrote this Draft; nothing new was written. | |
| changes | Yes | Changes, written after the new entries. | |
| entries | Yes | New Food Entries, written first. | |
| failure | Yes | Why writing stopped part-way through. | |
| diary_day | Yes | The Diary Day of the new entries; null when the Draft only has changes. | |
| attribution | No | Powered by fatsecret Platform API |