Skip to main content

Set Process Document

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 for processes whose Custom Flow allows creation without a document — i.e., processes in the AWAITING_FOR_DOCUMENT state.

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. Values: DUI_TYPE_BR_CPF, DUI_TYPE_MX_CURP, DUI_TYPE_US_SSN. This endpoint supports a subset of the document types accepted by Create Process — Custom Flows that allow optional document creation are currently validated against this narrower list.
duiValuestringyesDocument number, without formatting. Maximum 320 characters (accommodates encoded or composite identifiers; standard document numbers such as CPF or CURP are significantly shorter).

Example

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

Responses

200 OK
{
"process": {
"id": "abc-123",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678901"
}
}
}
FieldTypeDescription
process.idstringProcess identifier.
process.person.duiTypestringDocument type set on the process.
process.person.duiValuestringDocument value set on the process.
400 Bad Request

Returned when the request payload is malformed, required fields are missing, or the process state does not allow the operation.

401 Unauthorized

Bearer token missing, expired, or invalid. See Authentication.

404 Not Found

Process not found.

429 Too Many Requests

Rate limit reached. No detailed error code is provided — HTTP status only.

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