Skip to main content

Set Process Document

Markdown

Sets the identification document (CPF, CURP, SSN or other duiType) on a process that was created without one. Once set, the document is immutable.

Only available when the Custom Flow allows creating a process without a document, and only while the process is in PROCESS_STATE_AWAITING_FOR_DOCUMENT.

Lifecycle​

  1. Your back-end creates the process with Create Process, without person.duiType and person.duiValue. The Custom 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 process moves to PROCESS_STATE_AWAITING_FOR_DOCUMENT. Check it in the state field returned by Get Process.
  4. Your back-end calls this endpoint with the process ID in the URL and the document in the body. The process moves back to PROCESS_STATE_CREATED and resumes: the capabilities that depend on the document run, and the process moves to PROCESS_STATE_FINISHED when they complete.

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
Path parameters
FieldTypeRequiredDescription
processIdstringyesProcess ID returned in process.id at creation.
Body parameters
FieldTypeRequiredDescription
duiTypeenumyesDocument type. DUI_TYPE_UNSPECIFIED is rejected. See duiType values below.
duiValuestringyesDocument number, without formatting. Maximum 320 characters (accommodates encoded or composite identifiers; standard document numbers such as CPF or CURP are significantly shorter).
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

Example​

curl -X POST https://api.idcloud.unico.app/client/v1/process/3116552c-6a3e-4c1f-9d2b-8f0e7a5b4c21/document \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678901"
}'

Responses​

200 OK
{
"processId": "3116552c-6a3e-4c1f-9d2b-8f0e7a5b4c21",
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678901"
}
FieldTypeDescription
processIdstringProcess identifier.
duiTypestringDocument type set on the process.
duiValuestringDocument value set on the process.

The example values are placeholders.

Error Codes​

CodeMessageDescription
3process id is invalidWhen the process id is invalid.
3dui_type is requiredWhen the document type is not provided.
3dui_value is requiredWhen the document number is not provided.
3dui_value exceeds maximum lengthWhen the document number exceeds the maximum character limit.
3—When duiValue is not a valid number for the given duiType.
9process is not awaiting for documentWhen the specified process does not accept document submission.
9process expiredWhen the specified process has expired.
9document already set, cannot be modifiedWhen the process already has a linked document.
9process already finishedWhen the process has already been finalized.
9flow does not allow optional documentWhen the document is mandatory for the flow executed by the process.

What's next​

  • After setting the document, the process continues its pipeline. Call Get Process to fetch the result, or wait for the webhook.