Skip to main content
Version: v8001

Restrict scanning to specific document types or countries

You can restrict which documents are accepted at scan time with a document class filter.

Add a filter​

The following filter allows only Croatian and German documents. Any other document is rejected.

const blinkId = await createBlinkId({ licenseKey: "your-license-key" });

const cleanup = blinkId.addDocumentClassFilter((documentClassInfo) => {
return documentClassInfo.country?.id === "croatia" || documentClassInfo.country?.id === "germany";
});