Reuse and capture of documents
Endpoint to get a user's documents for reuse in by Client.
User identifier value (e.g., CPF value).
12345678909Document type (e.g., BR_CPF).
BR_CPFValid access-token.
Valid APIKEY with the capabilitie Document Capture and Reuse enabled.
Process information retrieved successfully.
Bad Request.
Forbidden.
Not Found.
Internal Server Error.
GET /documents/v1?code=text&type=text HTTP/1.1
Host: api.id.uat.unico.app
Authorization: text
APIKEY: text
Accept: */*
{
"items": [
{
"documentType": "unico.moja.dictionary.br.rg.v2.Rg",
"documentId": "2aaf6037-0153-415d-b9fe-cf7e8198408f"
}
]
}Endpoint to create a new Document process by Client.
Valid access token.
Valid APIKEY with the capabilitie Document Capture and Reuse enabled.
Process information successfully retrieved.
Bad Request.
Forbidden.
Internal Server Error.
POST /processes/v1 HTTP/1.1
Host: api.id.uat.unico.app
Authorization: text
APIKEY: text
Content-Type: application/json
Accept: */*
Content-Length: 278
{
"subject": {
"code": "12345678909",
"name": "Luke Skywalker",
"email": "[email protected]",
"phone": "551972557070"
},
"document": {
"purpose": null,
"authProcessId": "80371b2a-3ac7-432e-866d-57fe37896ac6",
"documentId": "80371b2a-3ac7-432e-866d-57fe37896ac6",
"files": [
{
"data": "/9j/4AAQSkZJR..."
}
]
}
}{
"id": "2b034568-dfaf-463f-94fb-18ed93c312e8",
"status": 3,
"document": {
"id": "b97c3fd9-d95d-413f-bc0a-75eb87304421",
"type": "unico.moja.dictionary.br.rg.v2.Rg",
"cpfMatch": false,
"faceMatch": 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"
]
}
}Important:
To use the Document Capture and Reuse capability, the Identity Verification capability must be used beforehand, as it is necessary to include the
processIdobtained from the Identity Verification in thedocument.authProcessIdparameter:The process must have valid biometrics, be used within 24 hours of completion and cannot be reused.
It is possible to reuse a biometric authentication previously performed by the same user within a period of up to 24 hours. Within this timeframe, the ID authentication proof can be used in different document verification processes (e.g., RG and CNH) without the need for a new biometric authentication.
If we are unable to extract a field from the document, it is not listed in the API return.
The link returned in
fileUrlsis valid for 10 minutes. A GET request must be made during the process to refresh the link and extend its validity.When using the Document Capture and Reuse feature, it is
mandatoryto inform the user, on the interface, about the reuse, as required by the contract.If an error occurs during processing, the process will return a
status = 5, as shown in the example below:{ "id": "80371b2a-3ac7-432e-866d-57fe37896ac6", "status": 5 }
Content returned in document.content based on document.type:
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 {
}Tips:
To implement your business rules, always validate the final statuses of the processes (
3,5). To validate the response from the IDCloud capabilities, only considerstatus = 3for your decision-making.
Errors
20900
O base64 informado não é válido.
The base64 parameter is invalid. Possible causes: It's not an image or it's an injection attempt.
20807
A imagem precisa estar no padrão HD ou possuir uma resolução superior a 640 x 480.
The resolution of the uploaded image is too low.
20507
O parâmetro subject.code é inválido.
Non-standard or non-existent CPF.
20506
O base64 informado é muito grande. O tamanho máximo suportado é até 800kb.
When the e-mail address provided is not vThe image is too large. The image can be compressed to JPEG92 without loss of quality.
20505
O base64 informado não é suportado. Os formatos aceitos são png, jpeg e webp.
When the phone number entered is not validBase64 invalid. Possible causes: not a valid image or invalid prefix.
20009
O parâmetro imagebase64 não foi informado.
The imagebase64 parameter, which contains the person's selfie, is missing.
20006
O parâmetro subject.name não foi informado.
The subject.name parameter, which contains the person's name, is missing.
20005
O parâmetro subject.code não foi informado.
The subject.code parameter, which contains the person's cpf, is missing.
20004
O parâmetro subject não foi informado.
The subject parameter, which contains the person's data (cpf, name), is missing.
20003
The request body is missing or invalid.
Null or invalid payload.
20002
O parâmetro APIKey não foi informado.
The APIKEY parameter is missing from the request header.
20001
O parâmetro authtoken não foi informado
The integration token parameter is missing from the request header.
10508
The JWT with the captured face has already been used.
The jwt can only be used once.
10507
The JWT with the captured face is expired.
JWT expired. The .jwt must be sent within 10 minutes.
10506
The bundle is invalid.
Invalid bundle. APIKEY uses a security method and this request does not meet the security requirements (SDK).
30017
Jwt header is an invalid JSON.
When the access-token used contains wrong characters.
10502
O token informado está expirado.
When the access-token used has expired
10501
O token informado é inválido.
The authentication token is invalid.
10201
O AppKey informado é inválido.
The APIKEY parameter has not been entered or does not exist.
99999
Internal failure! Try again later
When there is an internal error.
Last updated
Was this helpful?