Skip to content
Skip to Content
Docs
Studio

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.

PUT
/studio/reference/foods/saved/{food_id}

Path Parameters

food_id*Food Id

Identifier of the food in the food database.

Response Body

Successful Response

application/json
  1. response

A food the member opened, with its Saved and Recent state.

food_id*Food Id

Identifier of the food in the food database.

name*Name

The food's name as last shown.

brand*|

The brand, for a branded food.

source*ReferenceFoodSource

generic for a general food, branded for a branded product.

Value in"generic""branded"
saved*Saved

Whether the member saved this food.

saved_at*|

When the member saved it; null while it is not saved.

first_viewed_at*First Viewed At

When the member first opened it.

Formatdate-time
last_viewed_at*Last Viewed At

When the member last opened it or changed its portion.

Formatdate-time
view_count*View Count

How 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 Version

Version of the food data the member was last shown.

Example Request
curl -X PUT 'https://api.bettermenu.live/studio/reference/foods/saved/string'
Example Response
{  "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"}

Recipe in, FDA-format Nutrition Facts out, with every version kept.

Start freeNo card needed.