Skip to main content

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

ParameterDescription
resultA boolean value to denote if the given action/flow was successful or not
errorsAn array containing error details if result is false. You can see the full list of possible errors here: Error list
externalIdThe user ID used to onboard the user
nameThe name found in the ID
selfieImageA base64 encoded string containing the selfie image taken in the onboarding process
trackingIdThis is the same optional field that you can set to track between different calls to the SDK
warningsAn array containing different warnings we could find during the onboarding process. You can see the full list of possible warnings here: Warning list
idAn object containing all the information scanned from the id (only for onboarding flow)

Inside id object we have two properties (only Onboarding flow)

parameterDescription
idScanSkippedA boolean value to denote if the user skipped ID scanning or not
idInfoAn 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:

parameterDescription
parsedInfoAn object containing the parsed information gotten from the id, such as the birth date, full name, etc
imagesAn object with the front, back and face images gotten from the id in base64 encoding
faceMatchA 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.
faceMatchPercentageA number value for the matching between the id picture and the user face
mrzFoundA boolean value that is true if an MRZ was found on the document
userModifiedFieldsAn object containing the fileds modified by the user