← Back to Documentations

Barcode API

Generate 1D barcodes in SVG format with configurable type, scale, height, color, and visible text.

V1

/api/v1

First stable version for 1D barcode generation requests.

GET /api/v1/barcode/svg Auth Required
Generate SVG Barcode

Returns an SVG barcode for the given data. Supports common 1D formats such as C128, C39, EAN13, EAN8, UPCA, UPCE, CODABAR, MSI, and more.

Authentication
X-Api-Key: your_api_key
Query Parameters
Name Type Required Example Description
data string required 8691234567890 Barcode payload value.
type string optional EAN13 Barcode type. Defaults to C128.
scale integer optional 2 Minimum width of a single bar. Allowed range: 1-10.
height integer optional 60 Barcode height in SVG units. Allowed range: 20-300.
color string optional #000000 Foreground color in 6-digit hex format.
show_text boolean optional 1 Show the barcode text under the bars. Defaults to true.
Request Example
GET /api/v1/barcode/svg?data=8691234567890&type=EAN13&scale=2&height=60&color=%23000000&show_text=1
Response Example
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="190" height="60" version="1.1" xmlns="http://www.w3.org/2000/svg">...</svg>
Error Response
{
    "success": false,
    "message": "The data field is required.",
    "error_code": "VALIDATION_ERROR"
}