API reference
HTTP GET interface for BE-Code: base request, optional parameters, and the complete list of supported barcode types.
Purpose
This page documents the HTTP GET interface of BE-Code in full: the base request, all optional parameters, and the complete list of supported barcode types.
Context
Every call returns a JSON object with two fields:
{
"data": "...",
"message": "..."
}
datacontains the barcode image as a base64-encoded PNG (with thedata:image/png;base64,MIME prefix).messagecarries a status message for the request.
Prerequisites
- A BE-Code instance reachable over HTTPS.
- Basic authentication credentials. Credentials for a test instance are available from BE-terna support on request.
Base request
Every call includes at least the parameters type and content:
type: short code of a barcode type, for exampleean13,code128, orqrcode.content: string to encode.
Example request:
https://<fqdn>:1880/becode?content=www.be-terna.com&type=qrcode
Example response (truncated):
{
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAA...",
"message": "success"
}
Optional parameters for all barcode types
scaleX: X-axis scale, integer > 0, default 2.scaleY: Y-axis scale, integer > 0, default equalsscaleX.scale: Sets both X and Y scale at once, integer > 0.rotate: Orthogonal rotation. Allowed values:N: no rotation (default)R: 90 degrees clockwiseL: 90 degrees counter-clockwiseI: 180 degrees
padding: Shorthand for all four padding values.paddingwidth: Shorthand forpaddingleftandpaddingright.paddingheight: Shorthand forpaddingtopandpaddingbottom.paddingtop,paddingleft,paddingright,paddingbottom: Padding in points; rotates and scales with the image.backgroundcolor: Background color as a hex value (RRGGBBorCCMMYYKK).barcolor: Bar or module color as a hex value (RRGGBBorCCMMYYKK).parse: Replaces sequences such as^NNNincontentwith their ASCII value. Useful forcode128orcode39ext, for example^029for GS or^009for TAB.true: parse contentfalse: do not parse content
parsefnc: Enables non-data function characters via escape sequences such as^FNC1,^FNC2,^FNC3,^LNKA,^LNKC.true: parse function charactersfalse: do not parse function characters
Example request with styling:
https://<fqdn>:1880/becode?content=www.be-terna.com&type=code128&scale=1&rotate=R&paddingtop=10&paddingbottom=10&backgroundcolor=E6E6FA&barcolor=FF0000
Optional parameters for 1D barcodes
includetext: Shows the content below the code.true: show textfalse: hide text
textxalign: Text alignment. Allowed values:center,left,right.textfont: Font, defaultarial. Examples:CONS,ARIAL.textcolor: Text color as a hex value (RRGGBBorCCMMYYKK).
Example request with text:
https://<fqdn>:1880/becode?content=www.be-terna.com&type=code128&includetext=true&textxalign=center&textfont=CONS&textcolor=E6E6FA
Optional parameters for 2D barcodes
eclevel: Error-correction level for QR codes. Allowed values:L: low, up to 7 % recoveryM: medium, up to 15 % recoveryQ: quartile, up to 25 % recoveryH: high, up to 30 % recovery
Example request for a QR code with high error correction and colors:
https://<fqdn>:1880/becode?content=www.be-terna.com&type=qrcode&eclevel=H&backgroundcolor=E6E6FA&barcolor=FF0000
Supported barcode types
Short code (type) |
Name |
|---|---|
auspost |
AusPost 4 State Customer Code |
azteccode |
Aztec Code |
azteccodecompact |
Compact Aztec Code |
aztecrune |
Aztec Runes |
bc412 |
BC412 |
channelcode |
Channel Code |
codablockf |
Codablock F |
code11 |
Code 11 |
code128 |
Code 128 |
code16k |
Code 16K |
code2of5 |
Code 25 |
code32 |
Italian Pharmacode |
code39 |
Code 39 |
code39ext |
Code 39 Extended |
code49 |
Code 49 |
code93 |
Code 93 |
code93ext |
Code 93 Extended |
codeone |
Code One |
coop2of5 |
COOP 2 of 5 |
daft |
Custom 4 state symbology |
databarexpanded |
GS1 DataBar Expanded |
databarexpandedcomposite |
GS1 DataBar Expanded Composite |
databarexpandedstacked |
GS1 DataBar Expanded Stacked |
databarexpandedstackedcomposite |
GS1 DataBar Expanded Stacked Composite |
databarlimited |
GS1 DataBar Limited |
databarlimitedcomposite |
GS1 DataBar Limited Composite |
databaromni |
GS1 DataBar Omnidirectional |
databaromnicomposite |
GS1 DataBar Omnidirectional Composite |
databarstacked |
GS1 DataBar Stacked |
databarstackedcomposite |
GS1 DataBar Stacked Composite |
databarstackedomni |
GS1 DataBar Stacked Omnidirectional |
databarstackedomnicomposite |
GS1 DataBar Stacked Omnidirectional Composite |
databartruncated |
GS1 DataBar Truncated |
databartruncatedcomposite |
GS1 DataBar Truncated Composite |
datalogic2of5 |
Datalogic 2 of 5 |
datamatrix |
Data Matrix |
datamatrixrectangular |
Data Matrix Rectangular |
datamatrixrectangularextension |
Data Matrix Rectangular Extension |
dotcode |
DotCode |
ean13 |
EAN-13 |
ean13composite |
EAN-13 Composite |
ean14 |
GS1-14 |
ean2 |
EAN-2 (2-digit add-on) |
ean5 |
EAN-5 (5-digit add-on) |
ean8 |
EAN-8 |
ean8composite |
EAN-8 Composite |
flattermarken |
Flattermarken |
gs1-128 |
GS1-128 |
gs1-128composite |
GS1-128 Composite |
gs1-cc |
GS1 Composite 2D Component |
gs1datamatrix |
GS1 Data Matrix |
gs1datamatrixrectangular |
GS1 Data Matrix Rectangular |
gs1northamericancoupon |
GS1 North American Coupon |
gs1qrcode |
GS1 QR Code |
hanxin |
Han Xin Code |
hibcazteccode |
HIBC Aztec Code |
hibccodablockf |
HIBC Codablock F |
hibccode128 |
HIBC Code 128 |
hibccode39 |
HIBC Code 39 |
hibcdatamatrix |
HIBC Data Matrix |
hibcdatamatrixrectangular |
HIBC Data Matrix Rectangular |
hibcmicropdf417 |
HIBC MicroPDF417 |
hibcpdf417 |
HIBC PDF417 |
hibcqrcode |
HIBC QR Code |
iata2of5 |
IATA 2 of 5 |
identcode |
Deutsche Post Identcode |
industrial2of5 |
Industrial 2 of 5 |
interleaved2of5 |
Interleaved 2 of 5 (ITF) |
isbn |
ISBN |
ismn |
ISMN |
issn |
ISSN |
itf14 |
ITF-14 |
japanpost |
Japan Post 4 State Customer Code |
kix |
Royal Dutch TPG Post KIX |
leitcode |
Deutsche Post Leitcode |
mailmark |
Royal Mail Mailmark |
matrix2of5 |
Matrix 2 of 5 |
maxicode |
MaxiCode |
micropdf417 |
MicroPDF417 |
microqrcode |
Micro QR Code |
msi |
MSI Modified Plessey |
onecode |
USPS Intelligent Mail |
pdf417 |
PDF417 |
pdf417compact |
Compact PDF417 |
pharmacode |
Pharmaceutical Binary Code |
pharmacode2 |
Two-track Pharmacode |
planet |
USPS PLANET |
plessey |
Plessey UK |
posicode |
PosiCode |
postnet |
USPS POSTNET |
pzn |
Pharmazentralnummer (PZN) |
qrcode |
QR Code |
rationalizedCodabar |
Codabar |
raw |
Custom 1D symbology |
royalmail |
Royal Mail 4 State Customer Code |
sscc18 |
SSCC-18 |
symbol |
Miscellaneous symbols |
telepen |
Telepen |
telepennumeric |
Telepen Numeric |
ultracode |
Ultracode |
upca |
UPC-A |
upcacomposite |
UPC-A Composite |
upce |
UPC-E |
upcecomposite |
UPC-E Composite |
Outcome
- You can generate any supported barcode type with a single GET request.
- You control scaling, rotation, padding, colors, and optional 1D/2D parameters explicitly.
- The response embeds directly as an image.
Links