Skip to main content

CreateProcess

This article explains how to create a biometric process using the Unico Check REST API.

This method creates a biometric process for the authentication score. All validation in this flow is done after the user performs the biometric capture. Upload the captured image and the person's information.

The image is processed after successful upload.

How to use it?

Make a POST request to the /processes endpoint

With a valid Access token, make a request to the endpoint (POST/processes/) sending the following parameters:

{
"subject": {
"Code": "CPF_Titular",
"Name": "NOME_Titular",
"Gender": "GENERO_Titular",
"BirthDate": "DATANASCIMENTO_Titular",
"Email": "EMAIL_Titular",
"Phone": "PHONE_Titular"
},
"onlySelfie": "SELFIE_TRUE_FALSE",
"webHookUrl": "WEBHOOK_URL",
"webHookSecret": "WEBHOOK_tokenAcesso",
"imagebase64": "IMAGEM_Titular"
}

Parameters:

  • HEADER PARAMETERS
NameTypeMandatory/OptionalDescription
APIKEYStringMandatoryAPI key
AuthorizationStringMandatoryAccess token
Content-TypeStringMandatory"application/json"
  • REQUEST BODY SCHEMA
NameTypeMandatory/OptionalDescription
subject.CodeStringMandatoryCPF válido
subject.NameStringMandatoryNome da pessoa
subject.GenderStringOptionalGênero da pessoa, podendo ser M ou F.
subject.BirthDateStringOptionalData de nascimento. String de 10 caracteres. Exemplo: 01/01/0001.
subject.EmailStringOptionalEmail da pessoa
subject.PhoneStringOptionalTelefone da pessoa
onlySelfieBooleanMandatoryInforma se é um processo que contém apenas a foto biométrica e se pode concluir o processo. Quando 'false' o processo tem 60 minutos para ser concluído (ficando com status 1 até a chamada do ExecuteProcess) ou será cancelado automaticamente.
webHookUrlStringOptionalUrl do endpoint para retorno do status (necessário ter configuração de webhook preexistente).
webHookSecretStringOptionalAccess token do endpoint de retorno.
imagebase64StringMandatoryPhoto of the person. The image must be in base64 (png, jpg, jpeg). If the photo is captured using the Unico SDK with Liveness, the image sent must be the Json Web Token (.jwt). The .jwt must be sent within 10 minutes to prevent the image from expiring. And this .jwt can only be used once.

Request example:

Arquivo JSON
{
"subject": {
"Code": "12345678910",
"Name": "Bob",
"Gender": "M",
"BirthDate": "01/01/0001",
"Email": "email@example.com",
"Phone": "5543999999999"
},
"onlySelfie": true,
"webHookUrl": "status.webhook.com",
"webHookSecret": "fo9graB5ids9",
"imagebase64": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAgSURBVDhPY/wPBAwUACYoTTYYNWDUABAYNWDgDWBgAABrygQclUTopgAAAABJRU5ErkJggg=="
}

Successful request

If the request was executed successfully, the return response is a JSON with the process ID as follows:

{
"id": "6ab1771e-dfab-4e47-8316-2452268e5481"
}

Request error

If an error occurs, the return response is a JSON containing the error code and description:

{
"Error": {
"code": "40004",
"description": "Error description"
}
}

For more information on the errors returned, see the list available in the article Response Errors.

Any concerns?

Missing something or still need help? If you are already a customer or partner, you can contact us through the Help Center.