GetProcess
In this section, you will find how to obtain the result of a process in by Unico through the REST API
Introduction
In this section, you will find detailed documentation on how the Process Result Query endpoint works in by Unico.
Getting started
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Process Result
Endpoint to get the result of a process in by Unico.
Process ID.
Process details retrieved successfully.
When the process ID is invalid.
Access token error.
When the process cannot be found.
Unexpected error (Internal error or parameter issue).
GET /client/v1/process/{processId} HTTP/1.1
Host: api.cadastro.uat.unico.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"process": {
"id": "53060f52-f146-4c12-a234-5bb5031f6f5b",
"flow": "idunicosign",
"callbackUri": "/path/to/callback-url/",
"userRedirectUrl": "https://cadastro.dev.unico.app/process/53060f52-f146-4c12-a234-5bb5031f6f5b",
"state": "PROCESS_STATE_FINISHED",
"result": "PROCESS_RESULT_OK",
"createdAt": "2023-10-05T18:28:58.537985Z",
"finishedAt": "2023-10-09T15:15:25.417105Z",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"notifications": [
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
}
]
},
"purpose": "creditprocess",
"authenticationInfo": {
"authenticationResult": "AUTHENTICATION_RESULT_INCONCLUSIVE",
"authenticationId": "fd433602-d496-4291-adbb-dda95a3e50b1",
"livenessResult": "LIVENESS_RESULT_LIVE",
"bioTokenEngineResult": "BIO_TOKEN_ENGINE_RESULT_UNSPECIFIED",
"trustResult": "TRUST_RESULT_UNSPECIFIED",
"identityFraudstersResult": "TRUST_RESULT_UNSPECIFIED",
"faceWithOtherIdResult": "TRUST_RESULT_UNSPECIFIED",
"frictionlessResult": "FRICTIONLESS_RESULT_UNSPECIFIED",
"riskLevelResult": "TRUST_RESULT_UNSPECIFIED",
"smartRevalidationResult": "SMART_REVALIDATION_RESULT_UNSPECIFIED",
"scoreEngineResult": {
"scoreEnabled": "SCORE_ENABLED_TRUE",
"score": 50
},
"serproResult": {
"score": 50
}
},
"capacities": [
"PROCESS_CAPACITY_IDUNICO",
"PROCESS_CAPACITY_IDCHECK",
"PROCESS_CAPACITY_IDDOCS",
"PROCESS_CAPACITY_IDSIGN",
"PROCESS_CAPACITY_IDLIVE"
],
"services": [
{
"documents": [
{
"doc": {
"version": 2,
"code": "RG",
"data": {
"dataExpiracao": "2025-10-35T00:00:00Z",
"dataHabilitacao": "2022-08-09T00:00:00Z",
"dataNascimento": "1950-06-30T00:00:00Z",
"nomeCivil": "John Doe",
"rgNumero": 5478854,
"categoria": "D",
"cpfNumero": 73689290074,
"dataEmissao": "2020-08-09T00:00:00Z",
"localEmissao": "DEREX SP",
"numero": 85775532778,
"renachNumero": ""
}
},
"typified": true,
"cpf_match": true,
"face_match": true,
"doc_id": "1e61a978-3673-4fdd-8fa8-808d0a26d131",
"validate_doc": true,
"reused_doc": true,
"signed_url": "https://api.datafortre[...]OXc9PQ%3D%3D"
}
],
"consent_granted": true,
"envelopeId": "4d4f3d90-04a3-4259-b63b-930ab10d2e47",
"documentIds": [
"03307601-b518-49ca-b368-ae3919e24e54"
]
}
],
"expiresAt": "2023-10-09T15:15:25.417105Z",
"token": "",
"companyData": {
"branchId": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a",
"countryCode": "BRA"
},
"bioTokenData": {
"referenceProcessId": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a",
"authenticationId": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a"
},
"clientReference": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a",
"useCase": "USE_CASE_IDENTITY_REVALIDATION_7_DAYS"
}
}Processes must be created exclusively through backend-to-backend communication, due to our CORS policy, which prevents processes from being created through frontend-to-backend communication.
The content returned in the process.services.documents.doc.data parameter, referring to the OCR Extraction technology, can be consulted below:
Type: CNH
Content: Brazilian National Driving License
String numero;
String rgNumero;
String cpfNumero;
String nomeCivil;
List string filiacao;
Datetime dataNascimento;
Datetime data_habilitacao;
Datetime data_expiracao;
Datetime data_emissao;
String local_emissao;
String categoria;
String renachNumero;
"content": {
"numero": "044589731564",
"rgNumero": "123456789 SESP PR",
"nomeCivil": "Homer Simpson",
"filiacao": [
"Monasimpson",
"Monasimpson"
],
"dataNascimento": "1990-05-12T00:00:00Z",
"dataHabilitacao": "1997-11-18T00:00:00Z",
"dataExpiracao": "2017-12-07T00:00:00Z",
"dataEmissao": "2012-12-07T00:00:00Z",
"localEmissao": "Curitiba PR",
"categoria": "B",
"renachNumero": "PR904987581"
}Type: RG
Content: Brazilian General Registration
String numero;
String orgao_emissor;
String uf_emissor;
String cpfNumero;
String carteira_profissionalNumero;
String certificado_militarNumero;
String cnsNumero;
String nis_pis_pasepNumero;
String ctpsNumero;
String ctps_serie;
String ctps_uf;
String titulo_eleitorNumero;
String nomeCivil;
String nome_social;
List string filiacao;
Datetime dataNascimento;
String naturalidade;
Datetime data_emissao;
"content": {
"dataEmissao": "2012-12-21T02:00:00Z",
"dataNascimento": "1980-12-19T03:00:00Z",
"filiacao": [
"Rosa Coelho Da Costa",
"Edivaldo Da Costa",
"Rosa Coelho Da Costa",
"Edivaldo Da Costa"
],
"naturalidade": "Sao Paulo SP",
"nomeCivil": "Daniel Coelho Da Costa",
"numero": "4815162342",
"orgaoEmissor": "Secretaria Da Segurança Pública (SSP)",
"ufEmissor": "UF_SP"
}Type: CIN
Content: Brazilian national Identity Card
string rgNumero;
string cpfNumero;
string nomeCivil;
string nome_social;
List string filiacao;
Datetime dataNascimento;
Datetime data_expiracao;
Datetime data_emissao;
string orgao_emissor;
string local_emissao;
string naturalidade;
string nacionalidade;
"content": {
"nomeCivil": "Vitor Ra",
"nomeSocial": "Vitor Ra",
"filiacao": [
"Danilo Luis Renan Ramos",
"Giovanna Vitoria",
"Danilo Luis Renan Ramos",
"Giovanna Vitoria"
],
"dataExpiracao": "2034-03-02T00:00:00Z",
"dataEmissao": "2024-03-02T00:00:00Z",
"orgaoEmissor": "Detran/Rj",
"localEmissao": "Rio De Janeiro RJ",
"naturalidade": "Rio De Janeiro RJ",
"nacionalidade": "BRA"
}Type: Passport
Content: Brazilian Passport
string numero;
string nome;
string sobrenome;
string pais_emissor;
string nacionalidade;
string naturalidade;
Datetime data_nascimento;
Datetime data_emissao;
Datetime data_expiracao;
string autoridade.
"content": {
"numero": "AA011906",
"nome": "CHANCHÃO AMARELO",
"sobrenome": "PASSAREDO",
"paisEmissor": "BRA",
"nacionalidade": "BRASILEIRO(A)",
"naturalidade": "<nil>",
"dataNascimento": "1920-06-01T00:00:00Z",
"dataEmissao": "2000-01-01T00:00:00Z",
"dataExpiracao": "2010-01-01T00:00:00Z",
"autoridade": "SR/DPF/DF"
}Type: UNKNOWN
Content: Unknown document.
content {
}If the response from the result parameter is "
PROCESS_RESULT_INVALID_IDENTITY" we will not request the steps following the capture of the selfie (documents and/or electronic signature);If we are unable to extract a field from the document, it is not listed in the API return;
The link returned in
signed_urlis valid for 5 minutes. A GET request must be made during the process to refresh the link and extend its validity.
Tips:
To implement your business rules, always validate the response from the capabilities by checking the parameters in the following order:
state = PROCESS_STATE_FINISHEDANDresult = PROCESS_RESULT_OK;THEN, you can proceed with decision-making by analyzing the
authenticationInfoparameter.If you receive
state = PROCESS_STATE_FINISHEDANDresult = PROCESS_RESULT_ERROR, interpret this as an error in the biometric process and attempt the process again.
To improve the performance of your operation, you can use our Webhooks and only query the results of processes that are in the finalized statuses.
For more information about the possible errors for this endpoint, refer to the Errors section.
Still need help?
Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.
Last updated