Skip to main content

Validation

To execute facial recognition validation of a client, it is necessary to send a face photo along with the CPF of a registered client.

From there, that user's registration will be searched in the system to then perform a 1:1 validation between a client photo stored in the database and the sent image.

Object Definition

Request Body
{
"validation_key": "ee37510e-4dfe-4b9c-b1f4-667288de2190",
"document_number": "123.456.789-00",
"image": {
"image_key": "f1c0d2e1-f950-4360-896d-36588e443fc9",
"file_size": 47407,
"width_px": 0,
"height_px": 0,
"created_at": "2020-07-29T18:40:57Z",
},
"registration": {
"registration_key": "903dcb34-2970-4ddf-add5-87463ba51d99",
"registration_status": "authentic",
"registration_date": "2020-07-29T18:40:57Z"
},
"similarity_ratio": "99",
"validation_result": "pass",
"validation_date": "2020-07-29T18:40:57Z"
}

All client validations through facial recognition will generate a Validation object. If desired, this object can be recovered later through the appropriate endpoint.

nametypedescription
validation_keystringValidation object key
document_numberstringClient's CPF
imageimageObject that carries the properties of the image sent in validation
registrationregistrationObject that carries the properties of the registration being used as a reference in validation
similarity_ratiointegerSimilarity ratio between the registered image and the sent image
validation_resultstringResult of the 1:1 analysis performed
validation_datedatetimeFacial recognition validation date in UTC

Creating a Validation

Request Body: Simultaneous image submission (Base64)
{
"document_number": "123.456.789-00",
"image": "base_64_image_code",
}
Request Body: Prior image submission
{
"document_number": "123.456.789-00",
"image_key": "f1c0d2e1-f950-4360-896d-36588e443fc9",
}

Just like in registration, two JSON formats are also accepted, one containing the image Base64 and another containing the image_key received at the time of image submission through the /image endpoint.

https://api.caas.qitech.app/face_recognition/validation

After submission, a JSON object containing the analysis result along with the UUID pointing to the sent image will be returned.

Attention - When performing simultaneous image submission with facial recognition validation, it will be submitted to the same quality tests executed when the image is sent through the /image endpoint. Thus, the sent image is subject to the same rules described in the Image section of this documentation.

Status Dynamics - validation_result

After the analysis is executed, the analysis result will be sent under the validation_result flag. The possible results are:

ResultDescription
matchSent photo corresponds to the registered user
mismatchSent photo does not correspond to the registered user

Object recovery

Response Body
{
"validation_key": "ee37510e-4dfe-4b9c-b1f4-667288de2190",
"document_number": "123.456.789-00",
"validation_image": {
"image_key": "f1c0d2e1-f950-4360-896d-36588e443fc9",
"file_size": 47407,
"width_px": 0,
"height_px": 0,
"created_at": "2020-07-29T18:40:57Z",
},
"registration": {
"registration_key": "903dcb34-2970-4ddf-add5-87463ba51d99",
"registration_status": "authentic",
"registration_date": "2020-07-29T18:40:57Z"
},
"similarity_ratio": "99",
"validation_result": "pass",
"validation_date": "2020-07-29T18:40:57Z"
}

At any time, validation data can be recovered through a GET request to the endpoint:

https://api.caas.qitech.app/face_recognition/validation/{validation_key}