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, ordocumentNumber. Each is a string result or date result, and isundefined/nilwhen 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.
- Web (TS)
- Android (Kotlin)
- iOS (Swift)
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;
On Android, value returns the best available value across alphabets:
val firstName = result.firstName?.value
On iOS, value returns the best available value across alphabets, or read a specific alphabet with value(for:):
let firstName = result.firstName?.value
let firstNameLatin = result.firstName?.value(for: .latin)
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 componentsoriginalString: the date exactly as printed on the documentsuccessfullyParsed: whether the string was parsed into numeric partsfilledByDomainKnowledge: 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 nameisoNumericCountryCode,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 ofnot-performed,failed, orsuccessstatePerField: the per-field verdicts, each pairing afieldType(such asdocument-numberordate-of-birth) with its ownstate
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 Zonemrz: data extracted from the Machine Readable Zonebarcode: data extracted from the barcodeinputImage: the full input framedocumentImage: the cropped document imagefaceImage: the cropped face imagesignatureImage: the cropped signature imagebarcodeImage: 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,husbandNamelocalizedName,additionalNameInformationsex,dateOfBirth,placeOfBirth,nationality,bloodTypemaritalStatus,religion,race,profession,employer
Document data:
documentNumber,documentAdditionalNumber,documentOptionalAdditionalNumberpersonalIdNumber,additionalPersonalIdNumber,nationalInsuranceNumberdateOfIssue,dateOfExpiry,dateOfExpiryPermanent,effectiveDate,dateOfEntryissuingAuthority,documentSubtype,certificateNumber,cardAccessNumbercountryCode,specificDocumentValidity
Address:
address,additionalAddressInformation,additionalOptionalAddressInformationplaceOfBirth,localityCode,municipalityCode,municipalityOfRegistrationsectionCode,stateName,stateCode,registrationCenterCode,pollingStationCode
Residency, visa, and status:
residentialStatus,residencePermitType,legalStatus,socialSecurityStatuseligibilityCategory,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.