Barcode Generator API
Generate professional barcodes with our REST API. Support for 15+ barcode formats including Code128, QR Code, EAN, UPC, and more.
Barcode Tester
API URL
https://printivo.cloud/api/v1/barcode/code128/ABC123?width=300&height=100&showText=true&quietZone=truePreview
API Documentation
Use our REST API to generate barcodes programmatically
Quick Start
Generate a barcode by making a GET request to our API endpoint:
GET https://printivo.cloud/api/v1/barcode/:type/:dataURL Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
type |
string | Barcode format (code128, qrcode, ean13, etc.) | code128 |
data |
string | Data to encode in the barcode | ABC123 |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
width |
integer | 300 | Barcode width in pixels (100-1000) |
height |
integer | 100 | Barcode height in pixels (50-500) |
format |
string | png | Output format: png or svg |
showText |
boolean | true | Display text below barcode |
quietZone |
boolean | true | Include quiet zones around barcode |
Code Examples
# Generate a Code 128 barcode
curl "https://printivo.cloud/api/v1/barcode/code128/ABC123?width=400&height=150&format=png" \
-o barcode.png
# Generate a QR Code with custom options
curl "https://printivo.cloud/api/v1/barcode/qrcode/https://printivo.cloud?width=300&height=300" \
-o qrcode.pngSupported Barcode Formats
Code 128
High-density linear barcode for alphanumeric data
code128Code 39
Variable length alphanumeric barcode
code39EAN-13
European Article Number, 13 digits
ean13EAN-8
Compact 8-digit EAN format
ean8UPC-A
Universal Product Code, 12 digits
upcaUPC-E
Compact 6-digit UPC format
upceQR Code
2D matrix barcode for URLs, text, and data
qrcodeData Matrix
Compact 2D barcode for small items
datamatrixPDF417
Stacked linear barcode for large data
pdf417Aztec Code
2D matrix barcode for transport tickets
aztecITF
Interleaved 2 of 5 for numeric data
itfCodabar
Linear barcode for libraries and blood banks
codabarResponse Format
The API returns the barcode image in the requested format (PNG or SVG). The image is returned with the appropriate Content-Type header.
Content-Type: image/pngError Handling
If an error occurs, the API returns an HTTP error code with a JSON response:
{
"error": "Invalid barcode data",
"message": "The data provided is not valid for the selected barcode format",
"statusCode": 400
}Common Error Codes
| Code | Description |
|---|---|
400 |
Bad Request - Invalid parameters or barcode data |
404 |
Not Found - Invalid barcode type |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error - Server-side issue |