{{ define "title" }}API Documentation{{ end }} {{ define "head" }} {{ end }} {{ define "body" }}

For simple textual QR, Aztec or DataMatrix codes, a GET request can be made as follows:

/generate?type=[qr|aztec|datamatrix]&text=[YOUR_TEXT]

Dimensions will default to 300x300, and ECC level to 2.

This is also the format for URL barcodes

For other barcode types and custom options, API Requests can be made by making a POST request to /generate

The request body should be JSON similar to the below

        
            {
                "barcode_type": "code128",
                "width": 600,
                "height": 100,
                "ecc_level": 4,
                "content": "45684562"
            }
        
    

barcode_type should be one of:

width and height are in pixels - PDF417 is a fixed size and these options will only change the canvas size.

ecc_level should be 1, 2, 3 or 4 where 1 is least resilient and 4 is most resilient

content should be the value you wish the barcode to display. This should be a string and may not accept all characters - that is dependent on the barcode type.

The response will be a PNG image

Formatted Barcodes

Formatted barcodes are under development, this API endpoint /generate/format will produce a QR, Aztec or Datamatrix barcode with one of the following formats:

Note that URLs have no special formatting and can be produced as plain text barcodes using the /generate endpoint

This endpoint is not yet available

{{ end }}