Response Object
The typescript interface for the resulting response object
For Enroll / Recognition / Verification flows
interface ResultData {
result: boolean;
errors?: string[];
externalId?: string;
name?: string;
selfieImage?: string;
trackingId?: string;
warnings?: string[];
}
For Onboarding flow
interface ResultData {
result: boolean;
errors?: string[];
externalId?: string;
name?: string;
selfieImage?: string;
trackingId?: string;
warnings?: string[];
id?: IDData;
}
interface IDData {
idScanSkipped: boolean;
idInfo?: {
userModifiedFields?: {
[key: string]: {
scannedValue: string;
userUpdatedValue: string;
};
};
parsedInfo: ParsedInfo;
images: {
front?: string; // base64
back?: string; // base64
face?: string; // base64
};
mrzFound: boolean;
faceMatch: string; // 'high' | 'medium' | 'low' | 'not-found'
faceMatchPercentage: number;
};
}
interface ParsedInfo {
issuingCountry: string;
number?: string; // Id number
name?: string; // same as fullName
surname?: string; // backward compatibility
fullName: string;
firstName: string;
secondName?: string;
firstSurname: string;
secondSurname?: string;
gender: string;
nationality?: string;
birthDate?: string;
age?: string;
expirationDate?: string;
address?: string[];
claveElector?: string; // only for Mexican IDs
format: string;
}
Parameters Explanation
Parameter | Description |
---|---|
result | A boolean value to denote if the given action/flow was successful or not |
errors | An array containing error details if result is false. You can see the full list of possible errors here: Error list |
externalId | The user ID used to onboard the user |
name | The name found in the ID |
selfieImage | A base64 encoded string containing the selfie image taken in the onboarding process |
trackingId | This is the same optional field that you can set to track between different calls to the SDK |
warnings | An array containing different warnings we could find during the onboarding process. You can see the full list of possible warnings here: Warning list |
id | An object containing all the information scanned from the id (only for onboarding flow) |
Inside id
object we have two properties (only Onboarding flow)
parameter | Description |
---|---|
idScanSkipped | A boolean value to denote if the user skipped ID scanning or not |
idInfo | An object containing all the information scanned from the id |
The information scanned from the id will be returned in an object called idInfo
containing the following properties:
parameter | Description |
---|---|
parsedInfo | An object containing the parsed information gotten from the id, such as the birth date, full name, etc |
images | An object with the front, back and face images gotten from the id in base64 encoding |
faceMatch | A string value of 'high', 'medium' or 'low' for the matching between the id picture and the user face, or 'not-found' if no picture was found on the id. |
faceMatchPercentage | A number value for the matching between the id picture and the user face |
mrzFound | A boolean value that is true if an MRZ was found on the document |
userModifiedFields | An object containing the fileds modified by the user |