Let’s make some labels… with an API!

A web API exists if you want to make labels programmatically. The sole endpoint is /stickers which accepts POST requests containing an application/json body like:

{
  "type": "LCRY-1700",
  "gridlines": false,
  "labels": [
    { "text": "first label text", "copies": 1 },
    { "text": "two of these, please", "copies": 2 },
    { "barcode": "123456", "text": "Sample #123456", "copies": 1 }
  ]
}

The label type is required; values match the dropdown in the web form. The gridlines field is optional. For each label object, the text and copies fields are required. The barcode field is optional.

A successful response contains an application/pdf body.

curl example

curl -fsS http://localhost:5000/stickers \
  --header 'Content-type: application/json' \
  --data '{
    "type": "LCRY-1700",
    "gridlines": false,
    "labels": [
      { "text": "first label text", "copies": 1 },
      { "text": "two of these, please", "copies": 2 },
      { "barcode": "123456", "text": "Sample #123456", "copies": 1 }
    ]
  }' \
  --output labels.pdf