BETTERMENU
Studio

Upsert Recipe Label Configuration

Idempotent create-or-update for recipe label configuration.

Creates if no active label configuration exists; replaces all existing entries otherwise. Sends If-Match: W/"<version_id>" to guard against concurrent writes — returns 412 on conflict.

Available only on API versions declaring the recipe_versioning capability.

PUT
/studio/recipes/{recipe_id}/label-configuration

Path Parameters

recipe_id*Recipe Id

Header Parameters

If-Match?|

Optimistic-concurrency token. Pass the version_id returned by the previous mutation (or by GET /recipes/{id}/versions) so the server can reject the request when another writer has advanced the recipe in the meantime. A mismatch surfaces HTTP 412 with the current version_id in the response body so the client can decide whether to retry, merge, or surface the conflict to the user. Only consumed on API versions that declare the recipe_versioning capability — older versions ignore the header.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://loading/studio/recipes/string/label-configuration" \  -H "Content-Type: application/json" \  -d '{    "nutrient_entries": [      {        "bmid": "n_vitamin_d",        "visible": true      },      {        "bmid": "n_iron",        "visible": false      }    ]  }'
{
  "data": {
    "recipe_id": "string",
    "nutrients": [
      {
        "bmid": "string",
        "official_name": "string",
        "visible": true,
        "display_name": "string",
        "display_name_override": "string",
        "allowed_synonyms": [
          "string"
        ],
        "is_mandatory": true,
        "is_toggleable": true,
        "source": "regulatory_default"
      }
    ],
    "has_custom_configuration": true,
    "created_by": "string",
    "updated_at": "string"
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  },
  "version_id": "string"
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}