Web API Barcode Reader (WaBR)

Overview

Web API Barcode Reader (WaBR) extends Inlite’s ClearImage barcode recognition technology to cloud-based imaging applications.

WaBR Server implements server-side RESTful API for barcode reading and deployed as:

  • WaBR SaaS Server – Inlite- hosted production Web site, available by subscription.
  • WaBR In-House Server – Pre-configured Web site, licensed by Inlite, for deployment on a customer-owned Windows Server with IIS
  • WaBR Test Server – a free Inlite-hosted Web site for development and testing client-side code

Thus customer is free to focus on their application client-side development.

Step-by-Step

1 – Test your images on the WaBR Test Server

  • Go to WaBR Test Server test page https://wabr.inliteresearch.com
  • Use the file or url as image source to read barcodes from your images. Start with sample image listed below.
    NOTE: Without an Inlite authorization code the WaBR Test Server returns only partial barcode text is returned. The authorization code will be supplied after you complete development and client-side code (see Step 3)
  • If WaBR fails to read your barcode try, try uploading your image to Inlite’s Online Barcode Reader.  If that reader succeeds, then set the tbr field to value 103, and read again. .
    If the barcode is still unreadable or you want read barcodes faster or you have any other questions send the image file or image URL to support@inliteresearch.com and we will advise further.

2 – Develop client-side code or use Command Line EXE

Alternatively use BarcodeReaderCL.exe. This is a Windows command line application client to any WaBR Server. Download BarcodeReaderCL.zip from here.

3 – Test client-side with Authorization code

To obtain the full value of barcode from the WaBR Test Server you will need an Authorization code.

  • Send your request for the Authorization to sales@inliteresearch.com with ALL of following details:
    • Your company name and company Web Site
    • You name, phone number, your company e-mail (not a Gmail, Hotmail, Yahoo Mail, etc.)
    • Short description of your production application.
    • Expected number of images to be processed per-day and per-month in production deployment.
  • Update your client-side code to use the Authorization code. supplied by Inlite.
  • Test your client code with WaBR test Server.

4 – Evaluate on Production WaBR Server

Choose one of production WaBR server hosting options.

Using your WaBR In-house Server:

Using the Inlite WaBR SaaS server:

  • Request the URL of the WaBR SaaS Server URL and the Authorization Code from support@inliteresearch.com
  • Replace the URL in your client-side code. Change the endpoint https://wabr.inliteresearch.com with WaBR SaaS Server
  • Test your client-side operations

5 – Start Production use

Using your WaBR In-house Server:

  • Purchase a WaBR Server License   and the appropriate SDK Server License (1D, 2D, 1D+2D, or DL/ID)
  • Install ClearImage PDK and register the purchased product certificates (both will be supplied in an e-mail after the purchase)
  • Restart IIS Server
Using the Inlite WaBR SaaS server:
  • Purchase a WaBR SaaS subscription
  • Inlite will activate your subscription on WaBR SaaS server

WaBR API

Endpoints

The following endpoints read barcodes from various sources. All optional reader parameters can be used with each endpoint.

/barcodes POST request using any combination of url, file and image parameters as an image source
/barcodes/url GET request using url parameter as an image source
/barcodes/file POST request using file parameter as an image source
/barcodes/base64 POST request using image parameter as an image source

Image source parameters

At least one image source should be specified. Most popular image formats are acceptable as image source, including PDFTIFJPEG etc. Multi-page PDF and TIF files are supported

url – URL of an image file. The name should start with http:// , https:// or file://. Examples:

https://wabr.inliteresearch.com/SampleImages/1d.pdf  
https://upload.wikimedia.org/wikipedia/commons/0/07/Better_Sample_PDF417.png 
url value supplied as query parameter if GET request should be url-encoded. (e.g. use encodeURIComponent() in JavaScript)

file – Local file supplied in POST request .   JavaScript examples:

formData.append('file[]', "\\COMPUTER_NAME\another_folder\another_file.pdf","another_file.pdf");
formData.append('file[]', "c:/image_folder/some_image_file.tif","some_image_file.tif")

image – Base64-encoded string representing content of an image file.   Example:

data:application/pdf;base64,WTTVKM3OWFKFMERCMT5... :::IMAGE_FILE.PDF 
Format :
[data:[MIME-type][;base64],]content[:::filename] 

Only content, representing file content encoded as base64, is required. The values in [ ] are optional. The values in italic are variables.
MIME-type identifies file format. e.g. application/pdf or image/tiff. The value is only for compatibility with data URI scheme. The barcode reader will automatically identify file format based on data in content

Optional reader parameters

String parameters are not case-sensitive and might contain the list of comma-separated values. If parameter not specified, default value is used.

types - Barcode types to read. Default value is  1d, 2d. Valid values are:

1dsame as code39, code128, code93, ucc128, codabar, interleaved2of5, upca, upce, ean8, ean13
code39Code 39 Full ASCII
code128Code 128
code93Code 93
codabarCodabar
ucc128GS1-128
interleaved2of5 Interleaved 2 of 5
ean13EAN-13
ean8EAN-8
upcaUPC-A
upceUPC-E
2dsame as pdf417, datamatrix, qr
pdf417PDF417 code
datamatrixDataMatrix code
qrQR code
drvlicDriver License, ID Cards and military CAC ID
postalsame as imb, bpo, aust, sing, postnet
imbUS Post Intelligent Mail Barcode
bpoUK Royal Mail barcode (RM4SCC)
austAustralia Post barcode
singSingapore Post barcode 
postnetPostnet, Planet
code39basicCode 39 Basic
patchPatch code

format -  Identifies output format. Default value is json. Valid values:

xmlXML-formatted result
json JSON-formatted result (default)

fields -  Identifies elements of barcode information present in output. Default: value is all fields except meta. Valid values:

textBarcode value as text (UTF-8 formatted)
dataUn-formatted barcode value as Base64 string. This value should be used to obtain binary content of barcode.
valuesList of values obtain after parsing barcode content. For example Driver License fields
lengthLength of un-formatted barcode value
typeBarcode type (also called symbology)
rectanglePosition of barcode on a page (in pixels)
rotationBarcode orientation
fileName of the file
pagePage number in a file
metaTechnical information about barcode

options -  Additional options: Default: no options

horzread only horizontal barcodes.
vertread only vertical barcodes.
inforeturn additional information about WaBR server

tbr -  Target Barcode Reader code(s). Default: no TBR code

TBR should be used only if WaBR fails to read your barcode. Try tbr value 103 (used by Inlite’s Online Barcode Reader).  If your barcode is still unreadable, you want read barcodes faster or you have any other questions send the image file or image URL to support@inliteresearch.com and we will advise further.

JavaScript WaBR example

The following examples demonstrate the basic techniques to read barcodes from an image file or URL page. Try it here

Sample Images

In order to simplify your rapid WaBR evaluation, development, deployment and testing Inlite provides a set of sample Images (see list below) with multiple symbologies and content. The images can be used from either your client-side code or from the Inlite Test Web Page.
The same images are included in your Web Server installation Kit to facilitate testing in your secure environment.

  • To test a URL, include the link in your GET or POST request
  • To test a file or base64 upload, first download the images to your client, then use them in the POST request.


https://www.dropbox.com/s/qcd8zfdvckwwdem/img39.pdf?dl=1
https://wabr.inliteresearch.com/SampleImages/1d.pdf
https://wabr.inliteresearch.com/SampleImages/2d.pdf
https://wabr.inliteresearch.com/SampleImages/postal.pdf
https://wabr.inliteresearch.com/SampleImages/drvlic.ca.jpg
https://wabr.inliteresearch.com/SampleImages/c39.multipage.tif
https://wabr.inliteresearch.com/SampleImages/I25.tbr132.jpg
https://wabr.inliteresearch.com/SampleImages/pdf417.adobe.pdf
https://wabr.inliteresearch.com/SampleImages/pdf417.utf8.pdf
https://wabr.inliteresearch.com/SampleImages/pdf417.ЙшзщЪфг_Russian.pdf
https://wabr.inliteresearch.com/SampleImages/pdf417.بساطة لأنه الأل _Arabic.pdf

Output Examples

Reading 1D barcode with with types set to code39,code128:

{
  "Barcodes": [
    {
      "Text": "Code 39",
      "Data": "Q29kZSAzOQ==",
      "Type": "Code39",
      "Length": 7,
      "Page": 1,
      "Rotation": "none",
      "Left": 895,
      "Top": 124,
      "Right": 1839,
      "Bottom": 384,
      "File": "https://wabr.inliteresearch.com/SampleImages/1d.pdf"
    },
    {
      "Text": "Code 128",
      "Data": "Q29kZSAxMjg=",
      "Type": "Code128",
      "Length": 8,
      "Page": 1,
      "Rotation": "none",
      "Left": 91,
      "Top": 128,
      "Right": 762,
      "Bottom": 388,
      "File": "https://wabr.inliteresearch.com/SampleImages/1d.pdf"
    }
  ]
}

Reading Pdf417 with UTF-8 encoded data with with types set to pdf417:

{
  "Barcodes": [
    {
      "Text": "Lorem Ipsum - это текст-\"рыба\", часто используемый в печати и вэб-дизайне. Lorem Ipsum является стандартной \"рыбой\" для текстов на латинице с начала XVI века. В то время некий",
      "Data": "TG9yZW0gSXBzdW0gLSDRjdGC0L4g0YLQtdC60YHRgi0i0YDRi9Cx0LAiLCDRh9Cw0YHRgtC+INC40YHQv9C+0LvRjNC30YPQtdC80YvQuSDQsiDQv9C10YfQsNGC0Lgg0Lgg0LLRjdCxLdC00LjQt9Cw0LnQvdC1LiBMb3JlbSBJcHN1bSDRj9Cy0LvRj9C10YLRgdGPINGB0YLQsNC90LTQsNGA0YLQvdC+0LkgItGA0YvQsdC+0LkiINC00LvRjyDRgtC10LrRgdGC0L7QsiDQvdCwINC70LDRgtC40L3QuNGG0LUg0YEg0L3QsNGH0LDQu9CwIFhWSSDQstC10LrQsC4g0JIg0YLQviDQstGA0LXQvNGPINC90LXQutC40Lk=",
      "Type": "Pdf417",
      "Length": 290,
      "Page": 1,
      "Rotation": "none",
      "Left": 23,
      "Top": 21,
      "Right": 959,
      "Bottom": 523,
      "File": "https://wabr.inliteresearch.com/SampleImages/pdf417.ЙшзщЪфг_Russian.pdf"
    }
  ]
}

Reading driver license barcode with fields set to values:

{
  "Barcodes": [
    {
      "Values": {
        "AAMVA": {
          "last": "Sample",
          "first": "Samantha",
          "middle": "Jane",
          "dob": "1974-01-01",
          "eyes": "BLU",
          "hair": "BN",
          "sex": "F",
          "height": "5'7\"",
          "weight": "135 lbs",
          "street": "1801 W Jefferson St",
          "city": "Phoenix",
          "state": "AZ",
          "postal": "85007-3289",
          "id": "D01404860",
          "issued": "2001-06-28",
          "expires": "2039-01-01"
        }
      }
    }
  ]
}

WaBR Server Hosting Options

Inlite’s hosted WaBR Service is a convenient cloud solution. User can also license WaBR Server and one of ClearImage barcode readers to be hosted customer’s server.

Both approaches offer the highest performance engines with respect to:

  • Recognition rate, i.e. percentage of recognized barcodes
  • Recognition speed, i.e. engine time to read barcode
  • Robustness, based on thousands of production installation around the world, and our continuous improvement program.

Hosting WaBR on your own server is the right choice for users that:

  • Expect very heavy request load.
  • Operate in a mission-critical application
  • Want tighter control over response time
  • Have security requirements of images staying within internal network

Inlite’s hosted WaBR SaaS is the right choice for applications where:

  • Load requirements are lighter and sporadic.
  • Your IT environment is Linux and Windows Servers are not available
  • Image security allows them to traverse the internet
  • The customer wants to pay for the service on a subscription basis, which includes all support