Print Labels API

Turn product data into print-ready barcode labels

Send a template and your product data. Get a production-ready PNG immediately, or render a full PDF batch with the same API. The fastest way to design a template is the visual Label Editor — build the layout there, then script it with the API. See Editor access for how sign-in works.

  • REST and MCP
  • PNG and PDF output
  • Data-bound templates
Request JSON
POST https://prod-bcm-api.barcodeman.app/api/v1/render

{
  "template": {
    "unit": "mm",
    "width": 50,
    "height": 30,
    "type": "ROLL",
    "elements": [
      {
        "type": "text", "field": "name",
        "x": 3, "y": 3, "width": 44, "height": 7
      },
      {
        "type": "barcode", "field": "barcode",
        "x": 3, "y": 16, "width": 44, "height": 11
      }
    ]
  },
  "data": {
    "name": "Organic Oats",
    "barcode": "GOOKIT-SKU-2048"
  }
}
Output 200 OK
Format
PNG
Size
591 × 354 px
Layout
Included

From data to label without rebuilding your print stack

  1. 01
    Describe the label

    Use millimetres or inches and compose text, barcode, QR code, and image elements.

  2. 02
    Bind your data

    Map any element to your own field names, then reuse the template across products.

  3. 03
    Render and inspect

    Receive the PNG plus realized layout details for clipping, font size, and ink bounds.

Quickstart

Render a PNG in under five minutes

You need a Gookit developer key and Python 3 to decode the inline image. The command writes the API response to label.png.

  1. 1
    Create a developer key

    Sign in, open Settings → API Keys, and copy the key when it is shown.

  2. 2
    Paste the command

    Replace the placeholder value, then run the complete block in your terminal.

  3. 3
    Open label.png

    The response also includes realized layout data for programmatic inspection.

Printing on branded stock? Don't hand-type dimensions from a vendor PDF — pull exact geometry for thousands of Avery, Dymo, and Zebra models from GET /api/v1/template-presets, or start from a paper preset in the Label Editor.

Terminal
export GOOKIT_API_KEY="gkdev_your_key_here"

curl --fail-with-body --silent --show-error \
  https://prod-bcm-api.barcodeman.app/api/v1/render \
  -H "Authorization: Bearer ${GOOKIT_API_KEY}" \
  -H "Content-Type: application/json" \
  --data '{
    "template": {
      "unit": "mm",
      "width": 50,
      "height": 30,
      "type": "ROLL",
      "elements": [
        {
          "type": "text",
          "x": 3, "y": 3, "width": 44, "height": 7,
          "field": "name", "fontSize": 12, "bold": true
        },
        {
          "type": "text",
          "x": 3, "y": 10, "width": 44, "height": 4,
          "field": "sku", "fontSize": 8
        },
        {
          "type": "barcode",
          "x": 3, "y": 16, "width": 44, "height": 11,
          "field": "barcode", "barcodeType": "code128",
          "showBarcodeText": true
        }
      ]
    },
    "data": {
      "name": "Organic Oats",
      "sku": "SKU-2048",
      "barcode": "GOOKIT-SKU-2048"
    }
  }' | \
python3 -c 'import base64,json,pathlib,sys; image=json.load(sys.stdin)["image"]["dataUri"]; pathlib.Path("label.png").write_bytes(base64.b64decode(image.split(",",1)[1])); print("Saved label.png")'
Saved label.pngThe file is ready to inspect or send to your print workflow.

Two ways to open the Label Editor

Each entry path has its own key family. A gkapp_ key does not authenticate as a gkdev_ key, and vice versa.

  1. 01
    Shopify merchants

    In Shopify admin, open Settings → Open API and select Open API workspace. Launch links are one-use and expire after about 60 seconds. Each launch starts a 24-hour editor session that is not renewed; when it expires, relaunch from Shopify. API keys for this path use the gkapp_ prefix and are created on the same Open API settings page.

  2. 02
    Web developers

    Sign in at /login with email and password, then open /editor directly. API keys for this path use the gkdev_ prefix and are created at Settings → API Keys in the developer portal.

Start from your exact label stock, not from numbers

The Label Editor creates templates from the built-in paper catalog — thousands of Avery, Dymo, Zebra, and other models with verified geometry (also available as JSON via the public GET /api/v1/template-presets endpoint). Pick a model, pick one of the designed layouts, and land on a canvas with data-bound elements already previewing sample values — then copy the working API request straight out of the editor.

  1. 01
    Pick your paper

    Search the catalog by brand, model, or size — or deep-link a preset: /editor?preset=AVERY_63.5x38.1_L7160&layout=price-tag.

  2. 02
    Pick a layout

    Twelve designed starting points — price tags, QR, barcode-only, address labels — seeded as data-bound elements, not static text.

  3. 03
    Copy it as code

    Preview the exact PNG the API renders, then export the request as curl or JavaScript. Saved templates are snapshots — later catalog updates never change them.

Give your AI tools the contract, not a screenshot

The OpenAPI document is available as machine-readable JSON. AI agents can also connect through the authenticated MCP endpoint and use the same render service as the REST API.

Save templates and render complete PDF batches

Move from a single synchronous preview to reusable templates, mail-merge data, and asynchronous print jobs.

Read the API reference