Adjust document process
Updated date: 17/07/2026
Updated by: VNPT eContract's team
Purpose
This API adjusts the document processing workflow after the document has already been sent for processing.
After a document is sent, participants process the document according to the configured order/workflow. During processing, the document creator can adjust only the part of the workflow that has not been processed yet.
- Request URL:
/api/documents/adjust-process - HTTP method:
POST - HTTP content-type:
application/json - Authorize:
Bearer token - Parameter:
| Key | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the document whose workflow needs to be adjusted. |
fixedPosition | boolean | No | Signing position fixed configuration: true means fixed signing position, false means non-fixed signing position. |
processes | Array[object] | Yes | List of processors to update or add to the unprocessed part of the workflow. |
processes.processId | string | No | Existing process ID. If provided, the existing process is adjusted. If omitted or null, a new process is added. |
processes.orderNo | int | Yes | Processing order number in the workflow. |
processes.processedByUserCode | string | Yes | Code of the processor in the workflow. |
processes.accessPermissionCode | string | Yes | Processing permission code. |
processes.position | string | No | Signature position / coordinates Rectangle = llx, lly, urx, ury • llx, lly = coordinates of the bottom-left corner of the signature • urx = llx + width • ury = lly + height The coordinate origin is the bottom-left point of the document. |
processes.pageSign | int | No | Page containing the signature box. Required when using a fixed signing position for signing permissions. |
tip
accessPermissionCode is access permissions:
- V is view only
- D is digital sign
- E is e-sign
- EKYC is eKYC sign
- DR is sign draw
- A is approve
- F is fill data
- C is coordinate
caution
- This API is used after the document has been sent for processing. To configure the workflow before sending, use Update document process.
- Only workflow steps that have not been processed can be adjusted.
processIdmust belong to the document being adjusted. Otherwise, the API returns an error.- F should be placed before D, E, EKYC, and DR in sequential processing if the signer needs filled data before signing.
Sample request
Update the unprocessed workflow steps by replacing/adding processors:
{
"id": "b5b6a4e8-4a95-483b-bcc9-a0cf1038c5c1",
"processes": [
{
"orderNo": 1,
"processedByUserCode": "NVANH",
"accessPermissionCode": "D"
},
{
"orderNo": 2,
"processedByUserCode": "NVBAS",
"accessPermissionCode": "E"
}
]
}
Update an existing process and add a new process:
{
"id": "b5b6a4e8-4a95-483b-bcc9-a0cf1038c5c1",
"fixedPosition": true,
"processes": [
{
"processId": "8629d95b-aa15-4dd2-a7e4-08dee3d99e84",
"orderNo": 2,
"processedByUserCode": "USER_B",
"accessPermissionCode": "D",
"position": "440,750,570,820",
"pageSign": 2
},
{
"orderNo": 3,
"processedByUserCode": "USER_C",
"accessPermissionCode": "A"
}
]
}
Sample response body
{
"data": {
"id": "b5b6a4e8-4a95-483b-bcc9-a0cf1038c5c1",
"createdDate": "2024-07-18T13:41:21.4627228",
"lastModifiedDate": "2026-07-17T15:09:41.6939414+07:00",
"no": "VAT.CKDS2",
"subject": "Chứng từ quyết toán thuế 2026",
"status": {
"value": 5,
"description": "Correcting"
},
"createdByUserId": 6,
"processRecipientCount": 2,
"waitingProcesses": [],
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"processes": [
{
"id": "8629d95b-aa15-4dd2-a7e4-08dee3d99e84",
"createdDate": "2026-07-17T15:09:41.6939379+07:00",
"comId": 164,
"isOrder": true,
"orderNo": 2,
"accessPermission": {
"value": 4,
"description": "Sign digital"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 6,
"documentId": "b5b6a4e8-4a95-483b-bcc9-a0cf1038c5c1",
"fillingItems": [],
"attachments": []
},
{
"id": "eba513b5-eb51-4314-a7e5-08dee3d99e84",
"createdDate": "2026-07-17T15:09:41.6939402+07:00",
"comId": 164,
"isOrder": true,
"orderNo": 2,
"accessPermission": {
"value": 7,
"description": "E-Sign"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "b5b6a4e8-4a95-483b-bcc9-a0cf1038c5c1",
"fillingItems": [],
"attachments": []
}
],
"messages": [],
"file": {
"name": "vat2026.pdf",
"size": 777261
},
"downloadUrl": "{HOST}/Api/Download?token=F42Mxflf",
"downloadOriginalUrl": "{HOST}/Api/Download?token=yDmW286I",
"downloadWatermarkMetadataUrl": "{HOST}/Api/Download?token=tmvuA",
"fixedPosition": false
},
"success": true,
"code": 0,
"messages": [
"Update document success"
]
}
Error response body
Process ID does not belong to the document:
{
"success": false,
"code": 0,
"messages": [
"Process with Id '3a60b176-0f71-41af-4f2b-08ded1c2cf74, 64db826c-5ddf-4c02-4f2c-08ded1c2cf74' not found in the document"
]
}
Processor user code does not exist:
{
"success": false,
"code": 0,
"messages": [
"User code 'USER_B3' not found"
]
}
Error description
| Error message pattern | Cause | How to handle |
|---|---|---|
Process with Id '{ids}' not found in the document | One or more processId values do not belong to the document. | Re-check the document's current processes[].id before adjusting. |
User code '{code}' not found | processedByUserCode does not exist or is not available in the company. | Re-check the processor user code and user status. |