BETTERMENU
Studio

Update Recipe Serving

Replace a serving's size input (full replacement by ID).

Replaces the serving_size input for the specified serving, resolves the new serving_size inline, and resets per-serving and per-container nutrition facts to None — call computeNutritionFacts after updating to refresh the compliant label.

For racc_guided mode, use searchUsRaccCategories to find the right RACC food category first.

PUT
/studio/recipes/{recipe_id}/servings/{serving_id}

Path Parameters

recipe_id*Recipe Id
serving_id*Serving Id

Serving ID

Query Parameters

compute_nf?Compute Nf

Auto-compute per-serving nutrition facts after updating the serving and fold the result into the same Version. Default true. Set false only when the caller wants to commit the serving WITHOUT triggering NF recomputation (rare; expects a follow-up explicit POST .../nutrition-facts/compute).

Defaulttrue

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/servings/string" \  -H "Content-Type: application/json" \  -d '{    "rationale": "Updated portion weight after production run",    "serving_size": {      "household_amount": "3",      "household_unit": "cookies",      "metric_amount": "42",      "metric_unit": "g",      "serving_size_type": "user_provided"    }  }'
{
  "data": {
    "recipe_id": "string",
    "serving": {
      "id": "string",
      "serving_size_type": "string",
      "serving_size": {
        "household_measure": "string",
        "metric_amount": 0,
        "metric_unit": "string",
        "servings_per_container": 0
      },
      "racc_inputs": {
        "category_id": "string",
        "target_audience": "string",
        "unit_type": "string",
        "unit_weight_g": "string",
        "declared_serving_units": 0
      },
      "dual_column_status": "string",
      "has_per_serving_nutrition_facts": true,
      "has_per_container_nutrition_facts": true
    }
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  },
  "version_id": "string"
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}