Skip to content

Save food or recipe

Saves a food or recipe to My foods, or changes one.

WRITEsave_food

Your assistant saves a food only when a search finds nothing that matches. A recipe’s nutrition is added up from its ingredients. When your assistant changes a packaged product, your copy is saved to My foods and the change goes to Splot for review before it can correct the shared product.

It takes the same input as Save a food in the API, plus photos.

InputTypeDescription
namestringRequired. Up to 200 characters.
dataobjectRequired.
brandstring or nullUp to 200 characters.
barcodestring or null
copyFromobjectThe food this one was changed from, so its provenance is kept and a product correction can be proposed.
idstring
photosarrayPhotos the person attached in this conversation to keep with this record: pass the attachments themselves, never file paths. Up to 6 items.

The tool’s own instructions, word for word, as every assistant receives them.

Save a food or recipe to My foods, or with id update one of the person's foods. Search list_foods first and save a new food only when nothing matches, never for a product the catalogue already has. Each recipe ingredient is a food from list_foods or, only when nothing matches, a newFood, with a portion; the server adds up the nutrition. When changing a shared or saved food, pass copyFrom so its origin is kept: a product change goes to review and does not change the shared catalogue directly. Meals and recipes keep the version they were saved with. Pass photos the person attached as photos.

Last updated