Skip to main content

Operations

The client.operations object (OpsManager) provides methods for fingerprint identification, person management, and image retrieval.

Overview

All operations automatically include the scanner's sensor serial number and device information when a DriverSocket is available. If no imageBase64 is provided, the SDK uses the last captured fingerprint result from the scanner.

Finger index

Finger indices follow the standard mapping:

Left hand

IndexFinger
0Thumb
1Index
2Middle
3Ring
4Little

Right hand

IndexFinger
5Little
6Ring
7Middle
8Index
9Thumb
Finger index mapping

Identify person

Identifies an existing person by their fingerprint. If the fingerprint matches a registered person, it returns their HHID.

const hhid = await client.operations.identifyPerson(
1, // idFinger — finger index
// score and imageBase64 are optional; uses last scanner result if omitted
);
console.log('Matched HHID:', hhid);

Check fingerprint

Returns a temporary hash for the given fingerprint, used as input when registering a new person with createPerson. If the fingerprint is already registered, the response may also include the HHID.

const result = await client.operations.checkFingerprint(
1, // idFinger — finger index
// score and imageBase64 are optional; uses last scanner result if omitted
);

// result is the raw API response object:
// result.id — temporary hash (pass to createPerson)
console.log('Hash:', result.id);

Create person

Register a new person with their fingerprint data. Requires a hash list obtained from prior checkFingerprint calls and a consent flag.

// 1. Capture and check fingerprints to build hash list
const hash1 = await client.operations.checkFingerprint(1);
const hash2 = await client.operations.checkFingerprint(2);

// 2. Create person with collected hashes
const hhid = await client.operations.createPerson(
[hash1, hash2], // hashList
true, // consentTraining
);
console.log('Created person:', hhid);

Delete person

Delete a person and all their fingerprint data by HHID.

await client.operations.deletePerson(
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
);
info

The HHID is validated as a UUID v4 before the request is sent. A ConfigError is thrown if the format is invalid.

Image retrieval

Permissions required

Access to fingerprint images requires specific permissions that must be granted by Heuristik. Contact the Heuristik team to request access.

MethodReturnsDescription
getFingerprintImageAvailable(hhid)number[]List finger indices with stored images
getFingerprintImage(hhid, idFinger)stringPresigned URL — use as <img src> to display in the browser
getFingerprintImageRaw(hhid, idFinger)ArrayBufferRaw binary data — use to download as a file or process server-side
getFingerprintImproveImage(hhid, idFinger)stringPresigned URL for the enhanced image — use as <img src> to display
getFingerprintImprove(hhid, idFinger)ArrayBufferRaw binary data (enhanced) — use to download as a file
// List available fingers
const fingers = await client.operations.getFingerprintImageAvailable(hhid);
// Returns an array of finger indices that have stored images
// e.g. [0, 5, 7] → Left Thumb, Right Little, Right Middle

// Get presigned URL (use directly as <img src="...">)
const url = await client.operations.getFingerprintImage(hhid, 1);

// Get raw BMP binary
const buffer = await client.operations.getFingerprintImageRaw(hhid, 1);
const blob = new Blob([buffer], { type: 'image/bmp' });

Method summary

MethodDescription
identifyPerson(idFinger, score?, imageBase64?)Identify person by fingerprint
checkFingerprint(idFinger, score?, imageBase64?)Get temporary hash for registration
createPerson(hashList, consentTraining)Register new person
deletePerson(hhid)Delete person by HHID
getFingerprintImageAvailable(hhid)List available finger indices
getFingerprintImage(hhid, idFinger)Presigned URL for browser display
getFingerprintImageRaw(hhid, idFinger)Raw binary for download
getFingerprintImproveImage(hhid, idFinger)Enhanced image presigned URL for display
getFingerprintImprove(hhid, idFinger)Enhanced image raw binary for download