BETTERMENU
Studio

Record Reference Serving Size View

Records that the calling member opened a serving size category and returns it as stored after the change. The category's name and reference amount come from the server, so only its id is sent. Opening a category puts it at the top of the member's Recent list. Each call is kept in the member's own view history, including the search text for a category opened from search.

POST
/studio/reference/serving-sizes/views

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.bettermenu.live/studio/reference/serving-sizes/views" \  -H "Content-Type: application/json" \  -d '{    "category_id": "string",    "opened_from": "search"  }'
{
  "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
}
{
  "type": "https://api.bettermenu.live/errors/recipe_not_found",
  "title": "Recipe Not Found",
  "status": 400,
  "detail": "Recipe rcpe_abc123 does not exist",
  "code": "recipe_not_found",
  "retryable": true,
  "instance": "/api/v1/recipes/rcpe_abc123",
  "trace_id": "req_xyz789",
  "errors": [
    {}
  ],
  "invalid_ids": [
    "f_abc123",
    "f_xyz789"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
BETTERMENU

FDA-compliant nutrition labels from a recipe, in minutes.

Visit bettermenu.live