Change bottle/can stock
Changes the count of bottles or cans of a beer. action: adjust = add/remove some (delta, e.g. -3 after drinking three); set_count = the real count after counting (count); add = add stock by hand, e.g. bought cans or beer not packaged in BrewForge (container, beer, count; creates the line if needed); gone = bottles that left for good (given away, broken, one-way): lowers how many of the container are owned (container, count) — use adjust first to take them out of stock; link_brew = stock of a hand-typed beer belongs to one of the brewer's brews (beer = the typed name, brew). Point at stock with beer (brew name, batch number or typed name) and container (when the beer is in several), or line_id from get_beer_stock. Returns an undo_token. Needs the plan feature `cellar`. Scope: `cellar:write` (or `write`).
Changes the count of bottles or cans of a beer. action: adjust = add/remove some (delta, e.g. -3 after drinking three); set_count = the real count after counting (count); add = add stock by hand, e.g. bought cans or beer not packaged in BrewForge (container, beer, count; creates the line if needed); gone = bottles that left for good (given away, broken, one-way): lowers how many of the container are owned (container, count) — use adjust first to take them out of stock; link_brew = stock of a hand-typed beer belongs to one of the brewer's brews (beer = the typed name, brew). Point at stock with beer (brew name, batch number or typed name) and container (when the beer is in several), or line_id from get_beer_stock. Returns an undo_token.
Needs the plan feature cellar. Scope: cellar:write (or write).
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: cellar:write
Request Body
application/json
add, adjust, set_count, gone or link_brew.
"add" | "adjust" | "set_count" | "gone" | "link_brew"The beer: brew id, batch number, brew name or a hand-typed beer name, e.g. "Oatmeal Stout". For add: a brew, else it is stored as a typed name.
Bottle/can container id or exact name, e.g. "0.5 L bottles". Required for add and gone.
Instead of beer + container: the line_id from get_beer_stock.
set_count: the new count; add / gone: how many, e.g. 12.
0 <= valueadjust: change, e.g. -2 or 6 (between -1000 and 1000, not 0).
link_brew: the brew (id, batch number or exact name).
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/update_bottle_stock" \ -H "Content-Type: application/json" \ -d '{ "action": "add" }'{
"beer": "string",
"container": "string",
"count": 0,
"container_owned": 0,
"container_empty": 0,
"undo_token": "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": {}
}
}