Plan ingredients for planned brews
What the planned brews need and what is missing ("what am I short of for my planned brews?"). Lists the brews with status planned and, per ingredient, the amount in stock, on order (orders with status ordered/partial), needed by the planned brews, what is left and what to buy (to_buy), with each brew's share. Default: every planned brew and only the ingredients they use; show: "shortages" for only what to buy, "all" to include stock no planned brew needs. Amounts are in each row's unit (grams for fermentables and hops). To turn the shortages into an order in one step use create_order_from_shortages. Needs the plan feature `inventory_planner`. Scope: `inventory:read` (or `read`).
What the planned brews need and what is missing ("what am I short of for my planned brews?"). Lists the brews with status planned and, per ingredient, the amount in stock, on order (orders with status ordered/partial), needed by the planned brews, what is left and what to buy (to_buy), with each brew's share. Default: every planned brew and only the ingredients they use; show: "shortages" for only what to buy, "all" to include stock no planned brew needs. Amounts are in each row's unit (grams for fermentables and hops). To turn the shortages into an order in one step use create_order_from_shortages.
Needs the plan feature inventory_planner. Scope: inventory:read (or read).
API token in format: bfk_. Each operation lists the token scope it requires (the scopes are listed below).
read: Read everything (all areas)write: Create, change and delete everything (all areas)brews:read: List and view brewsbrews:write: Create, update, delete brews and notesinventory:read: List inventory itemsinventory:write: Create, update, delete inventory itemsequipment:read: List equipment profilesequipment:write: Create, update, delete equipment profilesstyles:read: List style profilesstyles:write: Create, update, delete style profilesprofiles:read: List mash, fermentation, and water profilescustom-fields:read: List custom field definitionscustom-fields:write: Create, update, delete custom field definitionsprofiles:write: Create, update, delete mash, fermentation, and water profilescellar:read: View cellar, packaged stock, tap lists, and labelscellar:write: Manage cellar, packaging, stock, tap lists, and labelssettings:read: View preferences, imports, calculators, and your data exportsettings:write: Change preferences and undo importscommunity:read: View community, feedback, tickets, inbox, and account overviewcommunity:write: Post, vote, and reply in community, feedback, and tickets
In: header
Scope: inventory:read
Request Body
application/json
Only these planned brews (ids, batch numbers or exact names, e.g. ["#14", "Wiesn Festbier"]). Default: every brew with status "planned".
items <= 50Ingredient type: "fermentable" (malts, sugars, extracts), "hop", "yeast" or "misc" (water agents, finings, spices, ...).
"fermentable" | "hop" | "yeast" | "misc""needed" (default): ingredients the included brews use; "shortages": only those to buy; "all": also stock nobody needs.
"needed" | "shortages" | "all"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://brewforge.sh/api/v1/actions/get_planner" \ -H "Content-Type: application/json" \ -d '{}'{
"planned_brews": [
{
"id": "string",
"name": "string",
"batch_number": 0,
"planned_date": "string",
"included": true
}
],
"shortages": 0,
"covered_by_open_orders": 0,
"items": [
{
"name": "string",
"type": "fermentable",
"ingredient_id": "string",
"form": "string",
"alpha_acid_pct": 0,
"harvest_year": 0,
"lab": "string",
"unit": "string",
"in_stock": 0,
"on_order": 0,
"needed": 0,
"left": 0,
"to_buy": 0,
"status": "short",
"brews": [
{
"brew": "string",
"amount": 0
}
],
"unlinked": true
}
],
"unlinked_lines": {
"names": [
"string"
],
"explanation": "string",
"fix": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}