Skip to main content

Registration

Before using the Facial Validation API feature, it is necessary to register the client. This action will generate an initial entry in the database that will provide an image to be used as a base during validation.

Object Definition

Request Body
{        
"registration_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",
},
"status": "indeterminate",
"registration_status_events": [],
"registration_date": "2020-07-29T18:40:57Z"
}

When registering a client, our API will generate a JSON object containing all information related to this registration. This object will be used as a reference when performing facial recognition of this client before a transaction.

nametypedescription
registration_keystringRegistration object key
document_numberstringClient's CPF
imageimageObject that carries the properties of the image sent in registration
statusstringClient registration status
registration_status_eventsregistration_status_eventsObject that carries the registration status modification history
registration_datedatetimeRegistration date in UTC

Status Dynamics - status

Once a client is registered, the status of this registration will be returned under the status flag. The possible results are:

ResultDescription
authenticThis registration has a history of successfully completed transactions
undefinedThis registration has no fraud history nor history of successfully completed transactions
fraudThis registration has associated fraud history

Creating a Registration

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",
}

To register a client, simply send a registration JSON object with a POST request to the endpoint:

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

Two types of registration JSON objects are supported. One in case of prior image submission through the /image endpoint, and another in case of simultaneous image submission with the registration request.

nametypedescription
document_numberStringClient's CPF
imageStringImage Base64 without headers or additional information
image_keyStringUUID4 returned during image submission by the /image endpoint

After submission, a Registration object containing the user registration data will be returned.

Attention - When performing simultaneous image submission with registration, 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 Update - status

Request Body
{
"registration_status": "fraud",
"incident": "misappropriation",
"event_date": "2029-08-25T13:34:12-03:00"
}

To ensure feedback to the fraud database, it is necessary to inform the system if a client commits any type of fraud or if the client completes their first transaction successfully.

For this, updating a client's registration status as a fraudster should be sent as a PUT request to the endpoint:

https://api.caas.qitech.app/face_recognition/registration/{registration_key}/status

The following values can be used in the incident field, which indicates the type of fraud committed by the client:

EnumeratorDescription
misappropriationIndividual performed misappropriation of some product
misrepresentationIndividual registered under false or third-party documents
successfull_transactionIndividual completed a transaction successfully
status_restorationEnumerator used in cases where it is desired to restore the status to undefined

Object recovery

Response Body
{        
"registration_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",
},
"status": "fraud",
"registration_status_events": [
{
"registration_status": "fraud",
"incident": "misappropriation",
"event_date": "2020-08-25T13:34:12Z"
}
],
"registration_date": "2020-07-29T18:40:57Z"
}

At any time, a client's registration data can be recovered through a GET request to the endpoint:

https://api.caas.qitech.app/face_recognition/registration/{registration_key}