Skip to main content
Set Process DocumentPOST

Create a process without a document, let the user complete the capture, then send the document from your back-end. The process finishes after that.

Lifecycle​

  1. Your back-end creates the process with Create Process, without person.duiType and person.duiValue. The flow must allow an optional document. The process starts as PROCESS_STATE_CREATED.
  2. The user runs the journey and performs the capture.
  3. The Unico API moves the process to AWAITING_FOR_DOCUMENT, the state that Get Process returns while the process waits for the document. You can already read the partial results of the capabilities that do not depend on duiValue.
  4. Your back-end calls this endpoint with the process ID in the URL and the document in the body. The Unico API then finishes the process, and it moves to PROCESS_STATE_FINISHED.
The response does not carry the final result

Read the final state and result with Get Process, or wait for the webhook.

Endpoint​

EnvironmentURL
ProductionPOST https://api.idcloud.unico.app/client/v1/process/{processId}/document
SandboxPOST https://api.idcloud.uat.unico.app/client/v1/process/{processId}/document

Request​

Headers
HeaderValue
AuthorizationBearer <access_token> (see Authentication)
Content-Typeapplication/json

The credentials need the same permission used to call Create Process.

Path parameters
ParameterTypeRequiredDescription
processIdstring (UUID)yesProcess identifier returned by Create Process.
Body parameters
FieldTypeRequiredDescription
duiTypeenumyesDocument type. DUI_TYPE_UNSPECIFIED is rejected. See duiType values below.
duiValuestringyesDocument number, without formatting. Up to 320 characters.
duiType values
CountryValueDescription
ARDUI_TYPE_AR_PASSPORTArgentine Passport
ARDUI_TYPE_AR_DNIArgentine DNI
ARDUI_TYPE_AR_LNCArgentine Driving Licence (Licencia Nacional de Conducir)
ATDUI_TYPE_AT_STNRAustrian Tax Number (STNR)
BEDUI_TYPE_BE_NNBelgian National Number (NN)
BRDUI_TYPE_BR_CPFBrazilian CPF
BRDUI_TYPE_BR_PASSPORTBrazilian Passport
BRDUI_TYPE_BR_CNPJBrazilian CNPJ
CADUI_TYPE_CA_SINCanadian SIN
CHDUI_TYPE_CH_AHVSwiss AHV/AVS Number
CLDUI_TYPE_CL_RUNChilean RUN
CLDUI_TYPE_CL_PASSPORTChilean Passport
CLDUI_TYPE_CL_LICENCIA_CONDUCIRChilean Driving Licence (Licencia de Conducir)
CODUI_TYPE_CO_NITColombian NIT
CODUI_TYPE_CO_PASSPORTColombian Passport
CODUI_TYPE_CO_LICENCIA_CONDUCCIONColombian Driving Licence (Licencia de Conducción)
CODUI_TYPE_CO_CCColombian Citizenship Card (Cédula de Ciudadanía)
DEDUI_TYPE_DE_IDNRGerman Tax Identification Number (IdNr)
DKDUI_TYPE_DK_CPRDanish CPR
ECDUI_TYPE_EC_NIEcuadorian NI
ESDUI_TYPE_ES_NIESpanish Foreigner Identity Number (NIE)
ESDUI_TYPE_ES_DNISpanish National Identity Document (DNI)
FIDUI_TYPE_FI_HETUFinnish Personal Identity Code (HETU)
FRDUI_TYPE_FR_SPIFrench Tax Reference Number (SPI)
GBDUI_TYPE_GB_NINOBritish National Insurance Number (NINO)
GTDUI_TYPE_GT_CUIGuatemalan CUI
IDDUI_TYPE_ID_NIKIndonesian NIK
IEDUI_TYPE_IE_PPSNIrish Personal Public Service Number (PPSN)
ITDUI_TYPE_IT_CFItalian Codice Fiscale (CF)
LKDUI_TYPE_LK_NICSri Lankan NIC
LUDUI_TYPE_LU_MATRICULELuxembourg National Identification Number (Matricule)
MXDUI_TYPE_MX_CURPMexican CURP
MXDUI_TYPE_MX_RFC_PERSONA_FISICAMexican RFC (Persona Física)
MXDUI_TYPE_MX_LICENCIA_CONDUCIRMexican Driving Licence (Licencia de Conducir)
NGDUI_TYPE_NG_NINNigerian NIN
NGDUI_TYPE_NG_BVNNigerian Bank Verification Number (BVN)
NGDUI_TYPE_NG_BVN_TOKENNigerian BVN Token (hashed)
NGDUI_TYPE_NG_NIN_TOKENNigerian NIN Token (hashed)
NLDUI_TYPE_NL_BSNDutch Citizen Service Number (BSN)
NODUI_TYPE_NO_FNRNorwegian National Identity Number (Fødselsnummer)
PEDUI_TYPE_PE_RUCPeruvian RUC
PEDUI_TYPE_PE_DNIPeruvian DNI
PEDUI_TYPE_PE_PASSPORTPeruvian Passport
PLDUI_TYPE_PL_PESELPolish PESEL
PTDUI_TYPE_PT_NIFPortuguese Tax Identification Number (NIF)
SEDUI_TYPE_SE_PNRSwedish Personal Number (PNR)
SEDUI_TYPE_SE_SAMORDNINGSNUMMERSwedish Coordination Number (Samordningsnummer)
TRDUI_TYPE_TR_TCKNTurkish Identification Number (TCKN)
USDUI_TYPE_US_SSNUnited States SSN
USDUI_TYPE_US_PASSPORTUnited States Passport
USDUI_TYPE_US_DRIVER_LICENSEUnited States Driver's License
USDUI_TYPE_US_PASSPORT_CARDUnited States Passport Card
USDUI_TYPE_US_POLYCARBONATE_PASSPORTUnited States Polycarbonate Passport
USDUI_TYPE_US_ID_CARDUnited States ID Card
UYDUI_TYPE_UY_CIUruguayan CI
ZZDUI_TYPE_ZZ_EMAILEmail address
ZZDUI_TYPE_ZZ_PHONE_NUMBERPhone number
When the call is accepted
  • The process is in AWAITING_FOR_DOCUMENT: the user already completed the capture.
  • The process has not expired.
  • The flow allows an optional document.

The document is immutable. A second call fails, because the process is no longer awaiting a document.

Example​

curl -X POST https://api.idcloud.unico.app/client/v1/process/$PROCESS_ID/document \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678909"
}'

Responses​

200 OK
{
"processId": "3116552c-6a3e-4c1f-9d2b-8f0e7a5b4c21",
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678909"
}
FieldTypeDescription
processIdstring (UUID)Process identifier.
duiTypeenumDocument type registered for the process.
duiValuestringDocument number registered for the process.

The example values are placeholders.

Error Codes​

CodeDescription
3processId is missing or invalid, duiType is unspecified, or duiValue is empty or longer than 320 characters.
9The process is not awaiting a document (this includes a document already set), has expired or finished, or the flow does not allow an optional document.
note

The document is registered with the identity service before it is stored. If that registration fails, the call returns the status of that failure.

What's next​