Skip to main content

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
NameTypeMandatory/OptionalDescription
APIKEYStringMandatoryAPI key
AuthorizationStringMandatoryAccess token
  • PATH PARAMETERS
NameTypeMandatory/OptionalDescription
processoIdStringMandatoryProcess 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:

NameTypeDescription
idstringIndicates the process ID created by sending the photo.
statusintegerIndicates the status of the Process, used to indicate whether it is completed or not. The complete list can be seen at Process Status.
unicoId.resultstringIndicates the authenticity of the CPF. Values can be Yes or Inconclusive.
document.idstringIndicates the ID of the document created.
document.typestringIndicates the type of document returned by the typification. The complete list can be seen at Document Type.
document.cpfMatchstringReturns 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.contentlistList 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.fileUrlsintSigned 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:

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

Importante
  • 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.