Barcode Scanner
Zia Barcode Scanner enables you to scan the most commonly used linear and 2D barcode formats and decode the encoded data. Barcode Scanner can detect formats like Codabar, EAN-13, ITF, UPC-A, QR Code, and more.
Execute Barcode Scanner
Description
This API is used to decode the data encoded in a barcode from an image file. You must specify the path to the image file in the API request, as shown in the sample request.
You can optionally specify the barcode format. If you don’t specify it, Catalyst will automatically process the default value all for it. The JSON response returns the decoded data.
Request Details
Request URL
{api-domain}/baas/v1/project/{project_id}/ml/barcode
Request Headers
Authorization: Zoho-oauthtoken {oauth_token}
content-type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW
Optional Headers
CATALYST-ORG: {org_id}
Environment: Development
Scope
ZohoCatalyst.mlkit.READ
Request JSON Properties
The input file with the barcode to be scanned.
Allowed formats: .webp, .jpeg, .png, .txt
File size limit: 10 MB
Resolution limit: 36000000 pixels
The format of the barcode in the image. The format codes are specified in the table below.
You must provide the path to it in your local system.
Allowed formats: .webp, .jpeg, .png
File size limit: 10 MB
Barcode Format Codes
| Barcode Format | Format Code |
|---|---|
| Code 39 | code39 |
| Code 128 | code128 |
| Code 93 | code93 |
| Ean 8 | ean8 |
| Ean 13 | ean13 |
| Codabar | codabar |
| ITF | itf |
| UPC-A | upca |
| UPC-E | upce |
| RSS | rss |
| QR code | qrcode |
| Aztec | aztec |
| PDF417 | pdf417 |
| Data Matrix | datamatrix |
| If you don't know the format or if you don't specify it |
all |
Response Details
The response will contain the data detected in the barcode in the content field.
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/ml/ocr
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type: multipart/form-data; boundary=—-WebKitFormBoundary7MA4YWxkTrZu0gW”
-F “file=@attachment1.txt”
-d ‘{
“format”: “ITF”
}’
{
"status": "success",
"data": {
"content": "40156"
}
}
Yes
No
Send your feedback to us