Skip to main content

GetProcess - IDdocsign flow

This article explains how to get the result of a process in the iddocsign flow through the REST API.

How to use it?

Make a GET request for the endpoint:

With a valid access token, make a request to the endpoint passing the {id} parameter, which must be the same as the one generated during process creation (CreateProcess).

Parameters:

  • PATH PARAMETERS
NameTypeMandatory/OptionalDescription
idStringMandatoryProcess number

Request executed successfully

If the request was successful, the return response is a 200 OK and a JSON containing the following parameters:

{
"process": {
"id": "53060f52-f146-4c12-a234-5bb5031f6f5b",
"flow": "iddocssign",
"company": {
"code": "unico",
"friendlyName": "Acesso QA Digital",
"logoUrl": "https://unico.io/wp-content/themes/theme_unico/img/logo/unico-color.svg"
},
"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",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "John Doe",
},
"purpose": "creditprocess",
"authenticationInfo": {
"authenticationResult": "AUTHENTICATION_RESULT_INCONCLUSIVE",
"scoreEngineResult": {
"scoreEnabled": "SCORE_ENABLED_TRUE",
"score": 50
},
"authenticationId": "",
"livenessResult": "LIVENESS_RESULT_UNSPECIFIED"
},
"capacities": [
"PROCESS_CAPACITY_IDUNICO",
"PROCESS_CAPACITY_IDCHECK",
"PROCESS_CAPACITY_IDDOCS",
"PROCESS_CAPACITY_IDSIGN",
"PROCESS_CAPACITY_IDLIVE"
],
"services": {
"docs": {
"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.datafortress.dev.private.unico.run/url-signer/signature/dmF1bHQ6[...]OXc9PQ%3D%3D"
}
],
"consent_granted": true
},
"sign": {
"signature": {
"envelopeId": "4d4f3d90-04a3-4259-b63b-930ab10d2e47",
"documentIds": [
"03307601-b518-49ca-b368-ae3919e24e54"
]
}
}
},
"createdAt": "2023-10-05T18:28:58.537985Z"
"finishedAt": "2023-08-09T15:15:25.417105Z"
}
}
ParameterDescription
idThe process identifier.
flowDefines the journey that was created.

id: Identity validation flow with facial biometrics.
idcheck: Identity validation flow with facial biometrics with score in the case of inclusion.
iddocs: Identity validation flow with document capture and reuse (RG or CNH).
idsign: Identity validation flow with electronic signature.
iddocssign: Identity validation flow, capture/reuse of documents (RG or CNH) and electronic signature.
callbackUriDefines where the user will be redirected at the end of the process.

More details in Request Parameters.
company.codeFlags the company code in the Unico ecosystem.
company.friendlyNameFlags the customer name displayed in the user journey.
company.logoUrlFlags the customer logo displayed in the user journey.
userRedirectUrlURL where you should redirect the user to complete the journey
stateIndicates the current state of the process, as it is of the type:

PROCESS_STATE_CREATED: Process created and not yet finished by the user.

PROCESS_STATE_FINISHED: Process completed by the user successfully.

PROCESS_STATE_FAILED: Process created or terminated with error.
resultIndicates the result of the user journey process, which may be of the type:

PROCESS_RESULT_OK: Process completed successfully.

PROCESS_RESULT_WARNING: Process ended with alert.

PROCESS_RESULT_ERROR: Process ended with some type of error.

PROCESS_RESULT_UNSPECIFIED: It is returned when the client uses the IDUnico alone. Process ended with unspecified result.
person.personDuiTypeDefines the user identifier type.

DUI_TYPE_BR_CPF: For CPF as identifier.
person.personDuiValueSets the value of the user identifier specified in the personDuiType field.
person.friendlyNameSets the user name, for example, John Doe.
authenticationInfo.authenticationResultResult of identity validation using ID.

AUTHENTICATION_RESULT_UNSPECIFIED: Waiting for the authentication process to return.

AUTHENTICATION_RESULT_INCONCLUSIVE: Inconclusive authentication result.

AUTHENTICATION_RESULT_POSITIVE: Positive authentication result.
authenticationInfo.authenticationResult.
scoreEngineResult.scoreEnabled
Indicates whether the process has Check enabled in case the ID is inconclusive.

SCORE_ENABLED_TRUE: Enabled.

SCORE_ENABLED_FALSE: Disabled.
authenticationInfo.authenticationResult.
scoreEngineResult.score
Indicates the result of the Check score.

0: If disabled.

-100 to 100: score result.
authenticationInfo.livenessResultIndicates the enumerated with the liveness result.

LIVENESS_RESULT_UNSPECIFIED: Unexpected return.
LIVENESS_RESULT_NOT_LIVE: The user did not pass the proof of life check LIVENESS_RESULT_LIVE: The user's proof of life was checked.
authenticationInfo.authenticationIdid of the IDCloud process that generated the user authentication of the By Unico process.
capacitiesUnico capabilities used in processes:

PROCESS_CAPACITY_IDUNICO: with identity validation with facial biometrics.

PROCESS_CAPACITY_IDCHECK: with identity validation with facial biometrics and score in the case of inclusion.

PROCESS_CAPACITY_IDDOCS: with identity validation with capture and reuse of documents (RG or CNH).

PROCESS_CAPACITY_IDSIGN: with identity validation with electronic signature.

PROCESS_CAPACITY_IDLIVE: with identity validation and proof of life.
services.docs.documentsservice.docs: Displays the data shared by the documents stage.

.documents: List of documents shared by the user.
services.docs.documents.doc.codeWhen typed, it will return RG or CNH, when not “Unknown

RG: Signals that the shared document is of type RG.
CNH: Signals that the shared document is of the CNH type.

A document is typified when it is possible to identify the layout of that document during image capture.
services.docs.documents.doc.dataWhen typed, it will return the document extracted data

RG: numero, orgaoEmissor, ufEmissor, cpfNumero, carteiraProfissionalNumero, certificadoMilitarNumero, cnsNumero, nisPisPasepNumero, ctpsNumero, ctpsSerie, ctpsUf, tituloEleitorNumero, nomeCivil, nomeSocial, filiacao, dataNascimento, naturalidade, dataEmissao.

CIN: rgNumero, cpfNumero, nomeCivil, nomeSocial, filiacao, dataNascimento, dataExpiracao, dataEmissao, orgaoEmissor, localEmissao, naturalidade, nacionalidade.

CNH: numero, rgNumero, cpfNumero, nomeCivil, filiacao, dataNascimento, dataHabilitacao, dataExpiracao, dataEmissao, localEmissao, categoria, renachNumero.
services.docs.documents.doc_idUnique identifier of the shared document.
services.docs.documents.signed_urlIndicates the signed URL of the document.
services.docs.documents.validate_docIndicates whether there was (true) or not (false) validation of the document.

A document is validated when it is possible to identify that the document's CPF is the same as the user's.
services.docs.documents.reuse_docIndicates whether (true) or not (false) the document was reused.

A document is reused when it already exists in the Unico database and the user has given permission to reuse it without the need for a new capture.
services.docs.documents.typifiedIndicates whether the document was typified (true) or not (false).

A document is typified when it is possible to identify its layout.
services.docs.documents.cpf_matchIndicates whether the CPF of the request is the same as the document. If yes (true), if not (false).
services.docs.documents.face_matchIndicates whether the face of the request is the same as the document. If yes (true), if not (false), if not implemented (null).
services.docs.consent_grantedIndicates whether there was (true) or not (false) user consent.
services.sign.signatureDisplays the data shared by the signing stage.
services.sign.signature.envelopeIdUnique identifier of the signed envelope.
services.sign.signature.documentIdsArray of envelope document identifiers.
createdAtIndicates the moment the process was created.
finishedAtIndicates the moment at which the process was completed by the user.

Request error

For 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.