BrewForge Docs

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`).

POST
/api/v1/actions/get_planner

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).

AuthorizationBearer <token>

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 brews
  • brews:write: Create, update, delete brews and notes
  • inventory:read: List inventory items
  • inventory:write: Create, update, delete inventory items
  • equipment:read: List equipment profiles
  • equipment:write: Create, update, delete equipment profiles
  • styles:read: List style profiles
  • styles:write: Create, update, delete style profiles
  • profiles:read: List mash, fermentation, and water profiles
  • custom-fields:read: List custom field definitions
  • custom-fields:write: Create, update, delete custom field definitions
  • profiles:write: Create, update, delete mash, fermentation, and water profiles
  • cellar:read: View cellar, packaged stock, tap lists, and labels
  • cellar:write: Manage cellar, packaging, stock, tap lists, and labels
  • settings:read: View preferences, imports, calculators, and your data export
  • settings:write: Change preferences and undo imports
  • community:read: View community, feedback, tickets, inbox, and account overview
  • community:write: Post, vote, and reply in community, feedback, and tickets

In: header

Scope: inventory:read

Request Body

application/json

brews?array<>

Only these planned brews (ids, batch numbers or exact names, e.g. ["#14", "Wiesn Festbier"]). Default: every brew with status "planned".

Itemsitems <= 50
type?string

Ingredient type: "fermentable" (malts, sugars, extracts), "hop", "yeast" or "misc" (water agents, finings, spices, ...).

Value in"fermentable" | "hop" | "yeast" | "misc"
show?string

"needed" (default): ingredients the included brews use; "shortages": only those to buy; "all": also stock nobody needs.

Value in"needed" | "shortages" | "all"
[key: string]?never

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": {}
  }
}