Barcode
Input Image Requirements
Please ensure that you follow the below guidelines and requirements when scanning an image.
-
Please make sure that the image in not blurry and in good quality.
-
Recommended Formats: JPG
-
Supported Formats: JPG, PNG
-
Maximum Body size: 10MB
Using the Barcode API
To make a call to the Barcode, create a POST Request and include the following shown in the below example:
curl --request POST \
--url https://api.anyline.com/v2/barcode \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{image: "yourBase64Image"}'
Be sure to replace YOUR_ACCESS_TOKEN with your actual access-token, and the "yourBase64Image" String with the blob for the image you wish to scan.
|
After the call has been sent, you will receive a result including a JSON File like the following example:
{
"barcodes": [
{
"value": "Anyline Cloud API",
"format": "QR_CODE",
"coordinates": [
949,
949,
950,
145,
149,
149,
149,
928
]
}
]
}
And that’s it! You’ve successfully scanned an image using the Barcode API!
Optional Parameters
Our barcode scanning solution supports parsing AAMVA format PDF417 barcodes commonly found on North American driving licenses. This feature extracts standardized driver information from the barcode data.
To enable AAMVA parsing, include the parseAAMVA field in your POST request:
{
"image": "yourBase64Image",
"parseAAMVA": true
}
After the call has been sent, you will receive a result containing the original PDF417 content (value), and the humand readable parsed format (parsedAAMVA):
{
"barcodes": [
{
"value": "@\n\u001e\rANSI 636025080002DL00410268ZP03090030DLDAQ99999999\nDCSSAMPLE\nDDEU\nDACJANICE\nDDFU\nDADANN\nDDGU\nDCAC\nDCBNONE\nDCDNONE\nDBD10052015\nDBB08041969\nDBA08042023\nDBC2\nDAU066 IN\nDAYBRO\nDAG123 MAIN STREET\nDAIHARRISBURG\nDAJPA\nDAK171010000 \nDCF1234567890123456789012345\nDCGUSA\nDCK1234567890123456\nDDB10012015\nDDK1\nDDL1\n\rZPZPAN\nZPB00\nZPC123\n\rZPDNONE\n\r",
"format": "PDF_417",
"coordinates": [
987,
226,
988,
52,
58,
51,
58,
226
],
"parsedAAMVA": "{\"AAMVA_version\":8,\"additional-part\":{\"ZPA\":\"AN\",\"ZPB\":\"00\",\"ZPC\":\"123\"},\"body-part\":{\"cardRevisionDate\":\"2015-10-01\",\"city\":\"HARRISBURG\",\"countryID\":\"USA\",\"customerIDNumber\":\"99999999\",\"dateOfBirth\":\"1969-08-04\",\"dateOfExpiry\":\"2023-08-04\",\"dateOfIssue\":\"2015-10-05\",\"documentDiscriminator\":\"1234567890123456789012345\",\"drivingPrivilege\":\"NONE\",\"endorsementCode\":\"NONE\",\"eyes\":\"BRO\",\"firstName\":\"JANICE\",\"firstNameTruncated\":\"U\",\"height\":\"066 IN\",\"inventoryControlNumber\":\"1234567890123456\",\"jurisdictionCode\":\"PA\",\"lastName\":\"SAMPLE\",\"lastNameTruncated\":\"U\",\"licenseClass\":\"C\",\"middleName\":\"ANN\",\"middleNameTruncated\":\"U\",\"organDonorIndicator\":\"1\",\"postalCode\":\"171010000 \",\"sex\":\"2\",\"street\":\"123 MAIN STREET\",\"veteranIndicator\":\"1\"}}\n"
}
]
}
Scan capability overview
The Anyline Barcode Cloud API currently supports the fallowing symbologies:
-
Content of the barcode
-
Format of the barcode
-
Position (X,Y coordinates) of barcode on the input image
Anyline has leveraged our extensive computer vision and machine-learning expertise to develop a best-in-class 1D and 2D barcode symbology API. With the ability to tolerate real-world variations like reflections, warping due to cylindrical or curved surfaces, low contrast codes, damaged or obscured codes, and inverted polarity codes, customers can realize faster throughput and more accurate data quality in their front-line barcode scanning applications.