BloodwebMicroservices Sign in
← All microservices

Barcode generator

Codes

Make product and shipping barcodes: EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, ITF-14 and Codabar, as PNG or SVG.

What it does

  • EAN-13, EAN-8, UPC-A and UPC-E
  • Code 128, Code 39, Code 93, ITF-14 and Codabar
  • Check digits added or verified
  • PNG or SVG, with the digits underneath

Good for

  • Product labels
  • Shipping cartons
  • Inventory tags

Bars are drawn on whole pixels with a proper quiet zone either side, so labels scan first time. Use a bar width of 2 or more for printing.

Example

GETPOST https://bloodweb.net/api/v1/barcode-generate

curl -H "Authorization: Bearer YOUR_KEY" "https://bloodweb.net/api/v1/barcode-generate?type=ean13&data=590123412345" -o barcode.png

Options

NameDescription
data
required
What to encode. For EAN and UPC, leave off the check digit and it is added; include it and it is verified.
type Symbology.
One of: code128, code39, code93, ean13, ean8, upca, upce, itf14, codabar
Default: code128
format Image format.
One of: png, svg
Default: png
bar_width Width of the narrowest bar in pixels. 2 or more for printing.
Default: 2
height Bar height in pixels.
Default: 80
text Print the human-readable value under the bars.
Default: true
color Bar colour.
Default: #000000
background Background colour, or "transparent".
Default: #ffffff

Returns

image/png or image/svg+xml, with a quiet zone of ten bar widths each side.