2️⃣ Read MRZ
The Machine Readable Zone - MRZ contains the information that acts as "proof of authorization" to access the chip content. If machine-reading of the MRZ is not possible the information can be entered manually.
Api Signature
fun readMRZ(onCompletion: (DocumentResult<MRZDocument>) -> Unit) public static func readMRZ(
completion: @escaping (Result<MrzDocument, KeylessDocument.DocumentError>) -> Void
)Future<DocumentResult<MRZDocument>> readMRZ()Returned result
If the Keyless Document SDK can read the MRZ it will return an instance of MRZDocument containing the data read.
data class MRZDocument(
val documentNumber: String,
val dateOfBirth: String,//Format as yy-MM-dd
val dateOfExpiration: String,//Format as yy-MM-dd
val personalNumber: String? = null,
val firstName: String? = null,
val lastName: String? = null,
val nationality: String? = null,
val issuingState: String? = null,
val documentType: String? = null,
var gender: String? = null
)public struct MrzDocument {
public let documentNumber: String
public let birthdate: String
public let expirationDate: String
}class MRZDocument {
final String documentNumber;
final String dateOfBirth; // Format: yy-MM-dd (e.g., 23-05-15)
final String dateOfExpiration; // Format: yy-MM-dd (e.g., 23-05-15)
final String? personalNumber;
final String? firstName;
final String? lastName;
final String? nationality;
final String? issuingState;
final String? documentType;
final String? gender;
}Errors
In case of errors the Keyless Document SDK will return the following errors:
Example usage
Last updated
Was this helpful?