Barcodes

Questline Barcodes is for private use only.

API Documentation

The barcodes.questline.com web API can be used to generate barcodes and/or QR codes for your websites, web applications or other use. The API uses a very simple RESTful interface. Each barcode can be generated by creating the proper URL and making a GET call to that URL.

This is especially useful for web applications which show a barcode in an <img> tag by using the url in its src attribute.

1 Dimensional Barcodes

Types

Currently, the API supports the following barcode types:

URL Format

Each URL follows the following format:

http://barcodes.questline.com/barcode/[type]/[value].[imagetype]

To build your URL:

  1. Replace [type] with the necessary type (c39, c128a, c128b, c128c, i2of5).
  2. Replace [value] with the value of your requested barcode.
  3. Replace [imagetype] with the type of image you would like created (png, gif, jpg).

A Few Samples

http://barcodes.questline.com/barcode/c39/AnyValueYouWish.png http://barcodes.questline.com/barcode/c128b/AnyValueYouWish.gif http://barcodes.questline.com/barcode/i2of5/1234567.jpg

Additional Options

A number of additional options are available through the use of a URL query string suffixed to your base URL.

Custom Size

Use the height query parameter to create a barcode with custom pixel dimensions. (Default: 100px) Image width cannot be specified as it's based on the requested value of the barcode, which might not fit in a specified width.

?height=200

Increase Resolution of barcode

By default, an individual bar in the barcode will be drawn with a 1px width. If more suitable for your needs, you can increase that resolution by specifying a larger width up to 4.

?resolution=2

Margin

Use the margin query parameter to adjust the size of the quiet zone around the barcode. (Default: 10px)

?margin=15

Render Text beneath barcode

To render the value of the barcode as text beneath, use the IsTextDrawn boolean parameter.

?IsTextDrawn=1

The TextSize query parameter is used to specify the size of the text. (Default 20px)

?IsTextDrawn=1&TextSize=15

Render Border

To render a 1 pixel black border around the image, use the IsBorderDrawn boolean parameter.

?IsBorderDrawn=1

Reversed Colors

Barcodes.questline.com currently only supports black and white barcodes. By default barcodes are generated with black ink on a white background. You can reverse this by using the IsReverseColor boolean parameter.

?IsReverseColor=1

QR Codes

URL Format

Each URL follows the following format:

http://barcodes.questline.com/barcode/qr/[filename].[imagetype]?value=[value]

To build your URL:

  1. Replace [filename] with a valid filename for the image.
  2. Replace [imagetype] with the type of image you would like created (png, gif, jpg). Use htm for more information about the barcode.
  3. Replace [value] with the value of your requested barcode.

A Few Samples

http://barcodes.questline.com/barcode/qr/myfilename.png?value=My%20QR%20Code http://barcodes.questline.com/barcode/qr/google.png?value=http%3A%2F%2Fwww.google.com%2F

Additional Options

A number of additional options are available through the use of a URL query string suffixed to your base URL.

Size

QR codes can be generated in sizes from 104x104 to 728x728 though use of the size parameter. Valid size options are integers from 1 to 40. The default is 4, resulting in a 200x200 image.

?size=1

Error Correction Capability (ECC) Level

To specify the ECC Level, use the eccLevel parameter:

Value Level Codeword Restoration
0 Low (L) 7%
1 Medium-Low (M) 15%
2 Medium-High (Q) 25%
3 High (H) 30%
?ecclevel=3

Margin

Use the margin query parameter to adjust the size of the quiet zone around the barcode. (Default: 10px)

?margin=15

Render Border

To render a 1 pixel black border around the image, use the IsBorderDrawn boolean parameter.

?IsBorderDrawn=1

Reversed Colors

Barcodes.questline.com currently only supports black and white barcodes. By default barcodes are generated with black ink on a white background. You can reverse this by using the IsReverseColor boolean parameter.

SSL Support

Barcode URL's are available over both HTTP and HTTPS. To create barcodes which you can use in a secure setting, simply update your URL to use https:// instead.