Add Recipe Serving
Add a serving to a recipe — set serving size.
Creates a new serving entry. Does not replace existing servings — use updateRecipeServing to modify an existing serving by ID.
Accepts serving size input (user_provided or racc_guided), stores the raw input, and resolves the serving_size when recipe nutrition is already present.
Per-serving nutrition facts for the new serving are computed and folded into the same Version — always, with no way to opt out. No follow-up call is needed.
For racc_guided mode, use searchUsRaccCategories to find the right RACC food category first.
recipe_id*Recipe IdIf-Match*stringThe 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.
application/json- body
Add a serving to a recipe.
Step ⑤ in recipe creation: createRecipe → setRecipeIngredients → addRecipeServing.
Prerequisite: recipe nutrition must exist first. Saving ingredients via setRecipeIngredients computes it automatically. If absent, the serving is stored but per-serving nutrition facts are not computed.
serving_size*|Discriminated union of serving size inputs. Set serving_size_type to user_provided for manual household + metric values, or racc_guided to derive the serving size from a regulatory product category.
rationale?|Reason for the change (stored in audit trail)
Successful Response
application/json- response
Response for addRecipeServing.
data*Data payload for add serving response.
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.
curl -X POST 'https://api.bettermenu.live/studio/recipes/string/servings' \ -H 'If-Match: string' \ -H 'Content-Type: application/json' \ -d '{ "serving_size": { "household_amount": "2", "household_unit": "cookies", "metric_amount": "28", "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, "serving_weight_g": 0 }, "racc_inputs": { "category_id": "string", "target_audience": "string", "unit_type": "string", "unit_weight_g": "string", "declared_serving_units": 0, "sold_individually": true, "serving_weight_g": "string", "household_unit_name": "string", "household_unit_name_plural": "string" }, "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"}