Unico IDCloud - DevCenter
HomepageAuthenticationAPIsSDKs
English (United States)
English (United States)
  • Welcome
  • GETTING STARTED
    • Unico IDCloud
    • Capabilities
    • Integration Methods
    • Capabilities and Integration Methods
  • INTEGRATIONS
    • Quickstart
    • Authentication
      • Creating a Service Account
      • Preparing to Make an Authenticated API Request
      • Additional Resources
        • Example in Javascript
        • Authentication Errors
        • Postman Collection
    • Integration by Unico
      • Overview
      • API
        • API Reference
          • CreateProcess
            • CreateProcess separated by flows
          • GetProcess
          • GetSelfie
          • GetEvidenceSet
            • Specification of the evidential set
          • GetDocumentSigned
          • GetEvidenceSign
        • Errors
      • Controlling the experience
        • Redirecting the user
        • SDK
        • QR Code
        • Customizations
      • Additional Resources
        • Postman Collection
        • PoCs available
    • Integration by Client
      • Overview
      • API
        • API Reference
          • Liveness + Identity Verification + Behavior Alert
          • Liveness + Identity Verification + Behavior Alert + Risk Score
          • Liveness + Validation (1:1) + Behavior Alert
          • Document Capture and Reuse
        • Response Scenarios
        • Additional Resources
          • Postman Collection
      • Capture standard (without SDK)
    • Webhook
    • SDK
      • Overview
      • Update Policy
      • SDK Integration
        • Android SDK
          • Installation Guide
          • Usage and Integration Guide
            • Selfie Capture
            • Document Capture
          • Error Handling Guide
          • Android Customization
          • Troubleshooting
          • Release notes
        • iOS SDK
          • Installation Guide
          • Usage and Integration Guide
            • Selfie Capture
            • Document Capture
          • Error Handling Guide
          • iOS Customization
          • Troubleshooting
          • Release notes
        • Flutter SDK
          • Installation Guide
          • Usage and Integration Guide
            • Selfie Capture
            • Document Capture
          • Error Handling Guide
          • Flutter Customization
          • Troubleshooting
          • Release notes
        • Web SDK
          • Installation Guide
          • Usage and Integration Guide
            • Selfie Capture
            • Document Capture
            • Accessibility
          • Error Handling Guide
          • Web Customization
          • Release notes
      • Additional Resources
        • Available PoCs
        • Best Practices for SDK Implementation
  • help & faq
    • Glossary
    • Help Center
Powered by GitBook

Institucional

  • Sobre nós

Copyright © 2024 unico. All rights reserved

On this page

Was this helpful?

Export as PDF
  1. INTEGRATIONS
  2. Integration by Client
  3. API
  4. API Reference

Document Capture and Reuse

In this section, you will find the specific details on creating a process that includes Document Capture and Reuse as a capability

PreviousLiveness + Validation (1:1) + Behavior AlertNextResponse Scenarios

Last updated 1 day ago

Was this helpful?


Introduction


In this section, you will find detailed documentation about the functionality of the endpoints related to the Document Capture and Reuse capability. The use of Reuse requires that there be a previous Identity Verification process and this must obtain a “YES” response OR the Risk Score equal or more than +50, otherwise it will be necessary to capture the user's document.

This is an synchronous capability that requires consuming two endpoints, detailed in this documentation, for its full utilization.

The capabilities of the Unico IDCloud platform via Client are managed through API Keys—used as a parameter in the request headers—that define the access scope. As a prerequisite, it is necessary to have an API Key configured exclusively for the Document Capture and Reuse capability, ensuring dedicated and secure access to the resource.

Talk to your project manager to obtain the API Key with this configuration.

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 .

Endpoints:

  • UAT: ;

  • Production: .

GetReusableDocuments


If you find a document to be reused, in the process creation endpoint you will enter the ID of this document in the document.documentId parameter and it will not be necessary to capture the document and send the base64 in the document.files parameter.

CreateProcess


Important:

  • To use the Document Capture and Reuse capability, the Identity Verification capability must be used beforehand, as it is necessary to include the processId obtained from the Identity Verification in the document.authProcessId parameter:

    • 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;

  • When using the Document Capture and Reuse feature, it is mandatory to 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:

Tips:

  • When implementing your business rules, always validate the final statuses of the processes (3, 5). To validate the response of IDCloud capabilities, only consider status = 3 for your decision-making process;

  • For more information about 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 .

here
https://api.id.uat.unico.app
https://api.id.unico.app
​
Help Center

Create process

post

Endpoint to create a new Document process via Client.

Header parameters
AuthorizationstringRequired

Valid access token.

APIKEYstringRequired

Valid APIKEY with the capabilitie Document Capture and Reuse enabled.

Body
Responses
200
Process information successfully retrieved.
application/json
400
Invalid payload.
application/json
403
Missing APIKEY parameter in the request header.
application/json
500
Unexpected error (Internal error or parameter issue).
application/json
post
POST /processes/v1 HTTP/1.1
Host: api.id.uat.unico.app
Authorization: text
APIKEY: text
Content-Type: application/json
Accept: */*
Content-Length: 240

{
  "subject": {
    "code": "12345678909",
    "name": "Luke Skywalker",
    "email": "luke@unico.io",
    "phone": "551972557070"
  },
  "document": {
    "purpose": null,
    "authProcessId": "80371b2a-3ac7-432e-866d-57fe37896ac6",
    "documentId": "80371b2a-3ac7-432e-866d-57fe37896ac6"
  }
}
{
  "id": "2b034568-dfaf-463f-94fb-18ed93c312e8",
  "status": 3,
  "document": {
    "id": "b97c3fd9-d95d-413f-bc0a-75eb87304421",
    "type": "Driver's License",
    "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"
    ]
  }
}
  • 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 {
}

GetReusableDocuments

get

Endpoint to get a user's documents for reuse in by Client.

Query parameters
codestringRequired

User identifier value (e.g., CPF value).

Example: 12345678909
typestringRequired

Document type (e.g., BR_CPF).

Example: BR_CPF
Header parameters
AuthorizationstringRequired

Valid access-token.

APIKEYstringRequired

Valid APIKEY with the capabilitie Document Capture and Reuse enabled.

Responses
200
Process information retrieved successfully.
application/json
400
Invalid payload.
application/json
403
Missing APIKEY parameter in the request header.
application/json
404
When the process is not found.
application/json
500
Unexpected error (internal error or parameter issue).
application/json
get
GET /documents/v1 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"
    }
  ]
}
  • Introduction
  • Getting started
  • GetReusableDocuments
  • GETGetReusableDocuments
  • CreateProcess
  • POSTCreate process