The Scanning API is also a RESTful endpoint residing on the target terminal, however it consists solely of GET requests with appropriate parameters as detailed below. Furthermore, the API is intended to capture barcode and QR code data ONLY and will return this data as a Base64 encoded string.

/scan API Request



An HTTPS GET request should be sent to the above URL with the following parameters:

POST /scan - Query String Parameters
Field NameStateData TypeDescription

This is the Serial Number of the terminal that should print the request. This is printed on a label on the rear of the device.

preferFrontCameraOptionalBooleanDetermines whether the scanner should use the Front Camera (if available). Set to true to use the front-facing camera.

Default = false.
timeoutSecOptionalIntegerDetermines how long in seconds to wait for the scanner before cancelling the request.

Default = 60 seconds.
POST /transaction - Header Parameters
AuthorizationMandatoryStringThis field should be populated with a value of
Bearer 6945595921271780

Example Request


/scan API Response

If properly formatted, you will receive a 200 HTTP response with the following fields:

GET /scan - Response
Field NameData TypeDescription
resultCodeIntegerThe outcome of the Scan attempt. Can be one of the following values:
dataStringBase64 encoded barcode/QR results.

In the event of an unsuccessful scan, this field will be "null".

Example Responses

"resultCode": 1,
"data": "aHR0cHM6Ly9kZXZlbG9wZXIuZG5hcGF5bWVudHMuY29tLw=="

Both QR codes and Barcodes are returned as base64 encoded strings.