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

POST

{api-domain}/baas/v1/project/{project_id}/ml/barcode

copy

api-domain
URL
The DC-specific domain to access Catalyst API

project_id
Numerical
The unique ID of the project

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

file file
mandatory

The input file with the barcode to be scanned.

Allowed formats: .webp, .jpeg, .png, .txt
File size limit: 10 MB
Resolution limit: 36000000 pixels

format string
optional

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 FormatFormat Code
Code 39code39
Code 128code128
Code 93code93
Ean 8ean8
Ean 13ean13
Codabarcodabar
ITFitf
UPC-Aupca
UPC-Eupce
RSSrss
QR codeqrcode
Aztecaztec
PDF417pdf417
Data Matrixdatamatrix
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.

Sample Request
copy

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” }’

Sample Response
copy
{
	"status": "success",
	"data": {
		"content": "40156"
	}
}