BrewForge Docs

Pick ingredients from a package

Choose which ingredients of a catalog package show in the user's ingredient picker (and so can be used in recipes, stock and orders). select: "all" adds the whole package (ingredients the supplier adds later included); select: "none" removes all of it; add / remove change single ingredients (ids or exact names within that package, from get_ingredient_packages or find_ingredients; when several packages offer the same ingredient, pick by id). Removing only hides ingredients from the picker: recipes and stock keep their copies. The user's own packages (My Ingredients, imports) are always fully picked. Scope: `inventory:write` (or `write`).

POST
/api/v1/actions/select_package_ingredients

Choose which ingredients of a catalog package show in the user's ingredient picker (and so can be used in recipes, stock and orders). select: "all" adds the whole package (ingredients the supplier adds later included); select: "none" removes all of it; add / remove change single ingredients (ids or exact names within that package, from get_ingredient_packages or find_ingredients; when several packages offer the same ingredient, pick by id). Removing only hides ingredients from the picker: recipes and stock keep their copies. The user's own packages (My Ingredients, imports) are always fully picked.

Scope: inventory:write (or write).

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:write

Request Body

application/json

package*string

The ingredient package: its id or exact name (e.g. "Weyermann", "Yakima Chief Hops"). get_ingredient_packages lists them.

select?string

"all": the whole package; "none": nothing from it. Can be combined with add/remove, which apply after it.

Value in"all" | "none"
add?array<>

Ingredients of this package to add to the picker: ids or exact names, e.g. ["Citra", "Mosaic"].

Itemsitems <= 200
remove?array<>

Ingredients of this package to take out of the picker: ids or exact names.

Itemsitems <= 200
[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/select_package_ingredients" \  -H "Content-Type: application/json" \  -d '{    "package": "string"  }'
{
  "package": {
    "id": "string",
    "name": "string"
  },
  "selected": 0,
  "total": 0,
  "whole_package": true,
  "added": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "removed": [
    {
      "id": "string",
      "name": "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": {}
  }
}