Skip to content
Skip to Content
Docs
Studio

Save Reference Serving Size

Saves a serving size category the calling member opened, so it is listed in their Saved list. Saving a category that is already saved changes nothing and keeps its original saved_at.

PUT
/studio/reference/serving-sizes/saved/{category_id}

Path Parameters

category_id*Category Id

Identifier of the serving size category.

Response Body

Successful Response

application/json
  1. response

A serving size category the member opened, with its Saved and Recent state.

category_id*Category Id

Identifier of the serving size category, as the serving size category endpoints return it.

name*Name

The category's name, e.g. Cookies.

reference_amount*Reference Amount

The reference amount customarily eaten at one time, in reference_unit, e.g. 30.

reference_unit*ReferenceAmountUnit

g for grams, or mL for millilitres: the categories whose reference amount is a volume (beverages, juices, milk, cream, shakes, syrups and cooking wine).

Value in"g""mL"
amount_kind*ServingSizeAmountKind

discrete for products eaten in units (cookies, bagels), bulk for products measured out (flour, juice).

Value in"discrete""bulk"
audience*ServingSizeAudience

general or infant_toddler: who the reference amount is set for.

Value in"general""infant_toddler"
data_version*Data Version

Version of the regulatory data the values above come from.

saved*Saved

Whether the member saved this category.

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.

Formatdate-time
view_count*View Count

How many times the member opened it.

Example Request
curl -X PUT 'https://api.bettermenu.live/studio/reference/serving-sizes/saved/string'
Example Response
{  "category_id": "string",  "name": "string",  "reference_amount": 0,  "reference_unit": "g",  "amount_kind": "discrete",  "audience": "general",  "data_version": "string",  "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}

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

Start freeNo card needed.