BrewForge Docs

Label templates and the label text of brews

Bottle/cap label templates and what they print. No input: the templates (name, size in mm, shape). template: that template's elements (text with {{placeholders}}, positions in mm). brew: the values the placeholders print for that brew (name, style, abv, ibu, og, fg, batch, brewer, brew_date, packaging_date), formatted in the brewer's units and language. Printing happens in the app (Labels page); this tool reads and save_label_template edits. Needs the plan feature `labels`. Scope: `cellar:read` (or `read`).

POST
/api/v1/actions/get_labels

Bottle/cap label templates and what they print. No input: the templates (name, size in mm, shape). template: that template's elements (text with {{placeholders}}, positions in mm). brew: the values the placeholders print for that brew (name, style, abv, ibu, og, fg, batch, brewer, brew_date, packaging_date), formatted in the brewer's units and language. Printing happens in the app (Labels page); this tool reads and save_label_template edits.

Needs the plan feature labels. Scope: cellar: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: cellar:read

Request Body

application/json

template?string

A template id or exact name, e.g. "Cap 19 mm", to get its elements.

brew?string

Get the label values for this brew. The brew: its id, its batch number (e.g. 12 or "#12") or its exact name (e.g. "Citra Pale Ale"). Case does not matter.

[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_labels" \  -H "Content-Type: application/json" \  -d '{}'
{
  "templates": [
    {
      "id": "string",
      "name": "string",
      "width_mm": 0,
      "height_mm": 0,
      "shape": "string"
    }
  ],
  "template": {
    "id": "string",
    "name": "string",
    "width_mm": 0,
    "height_mm": 0,
    "shape": "string",
    "elements": [
      {
        "type": "text",
        "id": "string",
        "content": "string",
        "x": 100,
        "y": 100,
        "font_family": "string",
        "font_size_pt": 4,
        "bold": true,
        "align": "left",
        "width_mm": 1,
        "height_mm": 1
      }
    ]
  },
  "brew_values": {
    "property1": "string",
    "property2": "string"
  },
  "placeholders": [
    "string"
  ],
  "fonts": [
    "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": {}
  }
}