update_recipe
Edit a Brewfather recipe's settings and ingredient bill: change batch size, boil time, efficiency, or add, update, and remove fermentables, hops, miscs, and yeasts.
Instructions
Edit a recipe's settings and/or ingredient bill.
``fields`` keys (metric — liters, minutes, percent): name, author, notes,
batchSize, boilSize, boilTime, efficiency. Stats (og, fg, abv, ibu, color)
can't be set; Brewfather computes them from the ingredients.
``ingredients`` is a list of changes, each with ``kind`` (fermentables, hops,
miscs, yeasts) and:
- ``index`` + fields to change an item — index is its 0-based position in
get_recipe's list, e.g. {"kind": "hops", "index": 1, "amount": 50};
- ``index`` + ``"remove": true`` to delete it;
- with ``index``, pass ``current_name`` (the item's name as get_recipe showed
it) and the change is rejected if the item there has a different name;
- no index to add one; needs name and amount, e.g. {"kind": "hops",
"name": "Citra", "amount": 30, "alpha": 12, "use": "Boil", "time": 5}.
Ingredient fields: name, amount (kg for fermentables, g for hops), unit,
type, use, time, alpha, color, potential, attenuation, form, laboratory,
origin, supplier.
Returns {recipe_id, result, note}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | ||
| recipe_id | Yes | ||
| ingredients | No |