Get Process
This article explains how to obtain the result of a document capture process through the REST API of the Unico IDDocs.
How to use it?
Make a GET request to the /processes/v1/{id}
endpoint
With the valid access token, make a request to the endpoint (GET/processes/v1/{id}). The {id} parameter must be the same as the one generated when the transaction was created.
Parameters:
- HEADER PARAMETERS
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
APIKEY | String | Mandatory | API key |
Authorization | String | Mandatory | Access token |
- PATH PARAMETERS
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
processoId | String | Mandatory | Process number |
Successful request
If the request was executed successfully, the return response is a JSON containing the following parameters:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": 3,
"unicoId": {
"result": "Yes"
},
"document": {
"id": "b97c3fd9-d95d-413f-bc0a-75eb87304421",
"type": "CNH",
"cpfMatch": false,
"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"
},
"fileUrls": [
"https://url-signer-1",
"https://url-signer-2"
]
}
}
The return parameters are:
Name | Type | Description |
---|---|---|
id | string | Indicates the process ID created by sending the photo. |
status | integer | Indicates the status of the Process, used to indicate whether it is completed or not. The complete list can be seen at Process Status. |
unicoId.result | string | Indicates the authenticity of the CPF. Values can be Yes or Inconclusive. |
document.id | string | Indicates the ID of the document created. |
document.type | string | Indicates the type of document returned by the typification. The complete list can be seen at Document Type. |
document.cpfMatch | string | Returns whether the CPF entered is the same as that contained in the document. If the CPF sent is invalid (example: 123.456.789.12) this field is automatically returned as false before the comparison. |
document.content | list | List of information contained in the document. It is returned whenever the quality of the document allows data to be extracted. The content returned in document.content will vary according to the document.type parameter. For more details see Content returned in document.content based on document.type. |
document.fileUrls | int | Signed urls of the files that make up the document. To access the document's images, simply access these urls, which have an expiry time of 10 minutes. |
Content returned in document.content based on document.type
The content returned is compatible with the description below:
- CNH
- RG
- CIN
- UNKNOWN
- Type: CNH
- Content: Brazilian National Driver 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: Identification Card (Brazilian Person Identification Number)
- 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: UNKNOWN
- Content: Unknown document. This means that the type of document could not be detected.
content {
}
The content is returned empty.
- When the GET request goes to a process with status 5 (error), the return status code is 410 (Gone) instead of 200 (Success).
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.