URL Builder
#
#
Generated URL
https://stockpilot.app/api/barcode?data=STOCK-2026
Live Preview
Endpoint Reference
GEThttps://stockpilot.app/api/barcode
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| dataReq | string | — | The value to encode. Required. |
| format | string | CODE128 | Barcode standard. Options: CODE128, EAN13, UPC, EAN8, CODE39, ITF14, MSI, pharmacode. |
| width | number | 2 | Width of a single bar (scale factor). Range 1-4. |
| height | number | 100 | Height of the barcode in pixels. Range 30-200. |
| text | boolean | true | Show the text value below the bars. |
| color | hex | 000000 | Bar color (6-digit hex without #). |
| bg | hex | ffffff | Background color (6-digit hex without #). |
| type | string | svg | Output format: 'svg' (vector, crisp) or 'png' (raster). |
Integration Examples
HTML
<img src="https://stockpilot.app/api/barcode?data=ITEM-001" alt="Barcode" />React / Next.js
<img src={`https://stockpilot.app/api/barcode?data=${sku}`} alt="Barcode" />Markdown
Why use this API?
- Zero client-side dependencies
- Fast global CDN caching
- Vector SVG for infinite scaling
- Works in emails & PDF reports
- Secure & Private