Spreadsheets and files

Barcode generator for a PIM or an API

POST a list of values with an API key. Each item returns an image address or the same error the form shows.

A green key on a pale surface

A PIM or any program gets barcode addresses by sending its values to the batch route. Each item comes back with the barcode type Beepable chose and the address of the picture, or with an error code and the sentence the form would show. The batch does not draw pictures, so even 10,000 items return quickly. Your shop, sheet, or label tool shows the pictures later from those addresses.

How do I resolve a batch?

  1. Sign in and create an All routes key on the Account page. Store it in your server's secrets.
  2. Send the values as JSON to https://beepable.app/api/batch with the key in Authorization: Bearer.
  3. Give each item a value. Add symbology only when an item needs a fixed type, such as code128 for a SKU.
  4. Read the items in the response. They are in the same order as the request.
  5. Store imageUrl for items where ok is true, and the error for the others.
curl -X POST "https://beepable.app/api/batch" \
  -H "Authorization: Bearer $BEEPABLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"value":"4006381333931"},{"value":"4006381333932"},{"value":"SKU 44","symbology":"code128"}]}'

The response has one result per item:

{"ok":true,"items":[
  {"ok":true,"symbology":"ean13","imageUrl":"https://beepable.app/b/ean13.png?v=4006381333931"},
  {"ok":false,"error":{"code":"bad_check_digit","message":"Check digit is invalid for this GTIN. Name code128 to encode it anyway."}},
  {"ok":true,"symbology":"code128","imageUrl":"https://beepable.app/b/code128.png?v=SKU%2044"}
]}

One bad item never fails the others. Send GTINs as strings: 036000291452 as a JSON number would lose its leading zero.

Which key opens which route?

RouteKey
POST /api/batch, POST /csvAll routes key, as Authorization: Bearer
GET /b/{symbology}.json, /excel, /sheetsAll routes key
Picture addresses: /b/{symbology}.png and /i/{symbology}.pngPicture key in k, or any key as Bearer
Guides, /docs, /openapi.json, /sheets/barcode.gsNo key

The Keys section of the API reference lists every rule. In short: keep the All routes key on your server, and put only a picture key in an address that people or spreadsheets will see.

How do I show the pictures?

The image address is the picture. A spreadsheet or a web page cannot send a header, so add a picture key as k:

https://beepable.app/b/ean13.png?v=4006381333931&k=YOUR_PICTURE_KEY

Send pictureKey in the batch body to get every imageUrl with the key already added, plus a ready IMAGE formula per item. A picture with k in its address is saved for a year, so showing the same barcode again is free. Your own server can also fetch a picture with Bearer instead of k. That response is private and not saved by any shared cache.

What does a failed item look like?

CodeWhen
bad_check_digitThe last digit of a GTIN does not match. Beepable never repairs it.
wrong_lengthDigits, but not 8, 12, 13, or 14 of them.
not_gtin_or_urlText such as a SKU, with no symbology.
unsupported_charactersCode 128 text with characters outside basic Latin.
empty, too_longAn empty value, or more than 2,000 characters.

The whole request fails only when the body is not an items array, has more than 10,000 items, or is larger than 2 MB. Those return HTTP 400 or 413.

How should a PIM store the result?

Store the barcode type, the image address, and the error code beside each product. You do not need to store the PNG: the address always draws the same picture. Add the picture key when you publish the address, not in the product table, especially if that table is exported to partners.

For one value at a time, GET https://beepable.app/b/auto.json?v= returns the same decision as one batch item. The API reference lists every route, and you can try them there with your key.

Frequently asked questions

Which key does my server use?

An All routes key, sent as Authorization: Bearer. Keep it on the server. A picture key can only draw pictures, and the batch refuses it with: This key can only draw pictures.

Does the batch draw the pictures?

No. It returns the barcode type and the image address for each item. The picture is drawn when something opens that address.

What if a GTIN has a leading zero?

Send it as a JSON string. A JSON number loses the zero before Beepable sees it, and a UPC-A or ITF-14 becomes the wrong length.

Where is the full reference?

The API reference at /docs lists every route with parameters, examples, and errors, and lets you try them. /openapi.json describes the same routes for code generators and agents.

How do I handle a rate limit?

A 429 response carries Retry-After in seconds. Wait that long, then send the request again. Splitting a very large job into batches of 10,000 also helps.

Draw your first barcode

Create a free account