BrewForge Docs

Find ingredient stock

List the user's ingredient stock (the inventory: malts, hops, yeasts, misc) with amounts, lots, expiry dates, suppliers and prices. Filter by name, type or status (used up, expiring within 90 days, expired, or low: below max_amount). Amounts: grams for fermentables and hops, the row's own unit for yeast (pkg, ml, g, cells) and misc. Costs are in the user's currency (see get_started). Each row id works as stock in update_stock (change amounts, "I used 50 g of Citra") and remove_stock. To see which ingredients exist (not what is in stock), use find_ingredients. summary gives per type how many rows are in stock / used up and the total weight in grams. Scope: `inventory:read` (or `read`).

POST
/api/v1/actions/find_stock

List the user's ingredient stock (the inventory: malts, hops, yeasts, misc) with amounts, lots, expiry dates, suppliers and prices. Filter by name, type or status (used up, expiring within 90 days, expired, or low: below max_amount). Amounts: grams for fermentables and hops, the row's own unit for yeast (pkg, ml, g, cells) and misc. Costs are in the user's currency (see get_started). Each row id works as stock in update_stock (change amounts, "I used 50 g of Citra") and remove_stock. To see which ingredients exist (not what is in stock), use find_ingredients. summary gives per type how many rows are in stock / used up and the total weight in grams.

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

query?string

Text the ingredient name contains (e.g. "citra", "pils").

type?string

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

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

Only rows in this state: "in_stock" (amount > 0), "used_up" (amount 0, kept for restocking), "expiring_soon" (within 90 days), "expired", "low" (in stock but at most max_amount). Default: all rows.

Value in"in_stock" | "used_up" | "expiring_soon" | "expired" | "low"
max_amount?number

With status "low" (or alone): only rows with at most this amount in their unit, e.g. 100 (grams for hops/malts, packs for yeast).

Range0 <= value
limit?integer

How many rows to return, 1-200 (default 50).

Range1 <= value <= 200
cursor?string

next_cursor from the previous page, to get the next page. Omit for the first page.

[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/find_stock" \  -H "Content-Type: application/json" \  -d '{}'
{
  "items": [
    {
      "id": "string",
      "type": "fermentable",
      "name": "string",
      "ingredient_id": "string",
      "amount": 0,
      "unit": "string",
      "status": "in_stock",
      "lot": "string",
      "expiry_date": "string",
      "purchase_date": "string",
      "supplier": "string",
      "cost_per_kg": 0,
      "cost_per_unit": 0,
      "alpha_acid_pct": 0,
      "form": "string",
      "harvest_year": 0,
      "lab": "string",
      "notes": "string"
    }
  ],
  "next_cursor": "string",
  "summary": [
    {
      "type": "fermentable",
      "in_stock": 0,
      "used_up": 0,
      "total_g": 0
    }
  ]
}
{
  "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": {}
  }
}