Skip to main content

GetProcess - IDDocs flow

This article explains how to get the result of a process in the iddocs 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": "iddocs",
"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": {
"code": "RG"
},
"typified": true,
"cpf_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
},
},
"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_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 typed (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.consent_grantedIndicates whether there was (true) or not (false) user consent.
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.