Save Reference Food
Saves a food the calling member opened, so it is listed in their Saved list. Saving a food that is already saved changes nothing and keeps its original saved_at.
food_id*Food IdIdentifier of the food in the food database.
Successful Response
application/json- response
A food the member opened, with its Saved and Recent state.
food_id*Food IdIdentifier of the food in the food database.
name*NameThe food's name as last shown.
brand*|The brand, for a branded food.
source*ReferenceFoodSourcegeneric for a general food, branded for a branded product.
"generic""branded"saved*SavedWhether the member saved this food.
saved_at*|When the member saved it; null while it is not saved.
first_viewed_at*First Viewed AtWhen the member first opened it.
date-timelast_viewed_at*Last Viewed AtWhen the member last opened it or changed its portion.
date-timeview_count*View CountHow many times the member opened it.
last_portion*|The portion the member last looked at, if any.
per_100g*The headline nutrients per 100 g, as last shown.
data_version*Data VersionVersion of the food data the member was last shown.
curl -X PUT 'https://api.bettermenu.live/studio/reference/foods/saved/string'{ "food_id": "string", "name": "string", "brand": "string", "source": "generic", "saved": true, "saved_at": "2019-08-24T14:15:22Z", "first_viewed_at": "2019-08-24T14:15:22Z", "last_viewed_at": "2019-08-24T14:15:22Z", "view_count": 0, "last_portion": { "label": "string", "grams": 0.001 }, "per_100g": { "calories": 0, "total_fat": 0, "total_carbohydrate": 0, "protein": 0 }, "data_version": "string"}