Skip to content
Skip to Content
Docs
Studio

Set Recipe Protein Quality

Set, change or clear the protein quality value, the protein claim and the low-score display choice. Fields left out keep what is on file; null clears one.

The protein %DV printed on the label is the %DV of the corrected amount of protein (grams times the score, capped at 1.00), so a value or claim change recomputes every serving's panel and commits a new version. Saving the value again after the recipe's protein ingredients change confirms it still applies. Send If-Match with the recipe's current version_id: a missing one is refused with 412, a stale one with 409.

PUT
/studio/recipes/{recipe_id}/protein-quality

Path Parameters

recipe_id*Recipe Id

Header Parameters

If-Match*string

The recipe's current version_id: the one the last change to this recipe returned, or the one reading the recipe returns (get_recipe). A stale value is refused with the current version_id; read the recipe again and retry.

Request Body

application/json
  1. body

Set, change or clear the protein quality value, the claim and the display choice.

A field left out keeps what is on file; null clears it.

quality?|

The protein quality value. Saving it records who entered it and the recipe's protein ingredients at that moment; save it again after the ingredients change to confirm it still applies. null clears it.

claim?|

The protein claim the product makes: 'none', 'good_source' (also 'contains', 'provides'), 'excellent_source' (also 'high in', 'rich in') or 'more_or_added'. A claim requires the protein %DV, which needs a quality value. null clears the answer.

low_score_display?|

What prints beside the protein amount when the score is low and the rules leave the choice to the maker: 'percent_dv' (the default) or 'statement'. Ignored where the %DV is required. null clears it.

Response Body

Successful Response

application/json
  1. response

Standard response envelope.

data*

The recipe's protein quality value, claim and display choice.

meta*

Response metadata.

version_id?|

Version committed for this mutation; pass on the next request as If-Match for optimistic concurrency. Present only on versions declaring the recipe_versioning capability.

Example Request
curl -X PUT 'https://api.bettermenu.live/studio/recipes/string/protein-quality' \  -H 'If-Match: string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "recipe_id": "string",    "quality": {      "method": "pdcaas",      "score": "string",      "source": "lab_finished_product",      "basis_note": "string",      "entered_by": "string",      "entered_at": "2019-08-24T14:15:22Z",      "document": {        "sha256": "string",        "file_name": "string",        "content_type": "string",        "size_bytes": 0,        "uploaded_by": "string",        "uploaded_at": "2019-08-24T14:15:22Z",        "download_url": "string"      }    },    "claim": "none",    "low_score_display": "percent_dv",    "main_protein_source": {      "ingredient_name": "string",      "share": "string"    },    "ingredients_changed_since_entered": true,    "check_facts": {}  },  "meta": {    "version": "string",    "request_id": "string",    "timestamp": "string"  },  "version_id": "string"}

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

Start freeNo card needed.