Skip to main content
Version: v8000

Result object reference

This article describes the structure of the scanning result returned by BlinkID. It documents the parts that are common to every platform. For platform-specific types (image formats, enums, and exact accessor signatures), follow the API reference for your platform:

Top-level structure​

The scanning result groups data into:

  • field values: the data read from the document, such as firstName, dateOfExpiry, or documentNumber. Each is a string result or date result, and is undefined/nil when the field is absent or wasn't extracted.
  • documentClassInfo: what the document is (country, type, region). See document class info.
  • dataMatchResult: whether values that appear on multiple sides agree. See data match.
  • images and per-side data: the cropped and input images, plus the raw VIZ/MRZ/barcode data for each scanned side, in subResults. See per-side results.

String results​

Most text fields are string results rather than plain strings, because a document can carry the same field in more than one alphabet (for example, a name printed in both Latin and Cyrillic). A string result holds one value per alphabet: latin, arabic, cyrillic, and greek.

How you read the value differs by platform.

On web, index into the alphabet you want; each alphabet entry has a value:

const firstName = result.firstName?.latin?.value;
const firstNameCyrillic = result.firstName?.cyrillic?.value;

Date results​

Date fields (dateOfBirth, dateOfExpiry, dateOfIssue, and similar) are date results. A date result exposes the parsed parts plus the original text:

  • day, month, year: the parsed numeric components
  • originalString: the date exactly as printed on the document
  • successfullyParsed: whether the string was parsed into numeric parts
  • filledByDomainKnowledge: whether the SDK inferred the date from domain knowledge rather than reading it
const expiry = result.dateOfExpiry;
const year = expiry?.year;
const asPrinted = expiry?.originalString;

The result also exposes dateOfExpiryPermanent, a boolean that is set when the document never expires.

Document class info​

documentClassInfo identifies the scanned document:

  • country, region, type: the classified country, region, and document type (platform enums)
  • countryName: the human-readable issuing country name
  • isoNumericCountryCode, isoAlpha2CountryCode, isoAlpha3CountryCode: ISO country codes for the issuer

Use it to branch your logic on document type, or to decide whether a document is supported.

Data match​

When a document is scanned on both sides, dataMatchResult reports whether values that appear on both sides agree, which is a useful signal against tampering.

  • overallState: the combined verdict, one of not-performed, failed, or success
  • statePerField: the per-field verdicts, each pairing a fieldType (such as document-number or date-of-birth) with its own state
if (result.dataMatchResult?.overallState === "success") {
// Front and back agree on the cross-checked fields
}

Per-side results​

subResults is an array with one entry per scanned side. Each entry is a single-side result containing the raw, zone-level data and the images for that side:

  • viz: data extracted from the Visual Inspection Zone
  • mrz: data extracted from the Machine Readable Zone
  • barcode: data extracted from the barcode
  • inputImage: the full input frame
  • documentImage: the cropped document image
  • faceImage: the cropped face image
  • signatureImage: the cropped signature image
  • barcodeImage: the input frame that contained the scanned barcode

The top-level field values are the SDK's best combined reading across all sides. Reach into subResults only when you need the raw per-zone data or the images. Image formats are platform-specific; see your platform's API reference.

Available field values​

Identity and personal data:

  • firstName, lastName, fullName, maidenName, fathersName, mothersName, husbandName
  • localizedName, additionalNameInformation
  • sex, dateOfBirth, placeOfBirth, nationality, bloodType
  • maritalStatus, religion, race, profession, employer

Document data:

  • documentNumber, documentAdditionalNumber, documentOptionalAdditionalNumber
  • personalIdNumber, additionalPersonalIdNumber, nationalInsuranceNumber
  • dateOfIssue, dateOfExpiry, dateOfExpiryPermanent, effectiveDate, dateOfEntry
  • issuingAuthority, documentSubtype, certificateNumber, cardAccessNumber
  • countryCode, specificDocumentValidity

Address:

  • address, additionalAddressInformation, additionalOptionalAddressInformation
  • placeOfBirth, localityCode, municipalityCode, municipalityOfRegistration
  • sectionCode, stateName, stateCode, registrationCenterCode, pollingStationCode

Residency, visa, and status:

  • residentialStatus, residencePermitType, legalStatus, socialSecurityStatus
  • eligibilityCategory, visaType, sponsor, remarks, workRestriction

Vehicle and driver licence:

  • driverLicenseDetailedInfo, vehicleType, vehicleOwner, manufacturingYear

Family:

  • dependentsInfo, parentsInfo

Each of these is a string result, except the date fields, which are date results.