Process Multi-file Document
Last updated: September 29, 2026 Updated by: VNPT eContract's team
Purpose
Processes the root workflow step of a multi-file document. The API identifies the component file to sign with fileInfoId and can also process adjacent workflow steps.
- Request URL:
/v2/documents/process - HTTP method:
POST - HTTP content-type:
application/json - Authorize:
Bearer token
Parameters
| Key | Type | Required | Description |
|---|---|---|---|
processId | string (GUID) | Yes | ID of the root process to handle. Get it from waitingProcess.id or processes[].id. |
reason | string | No | Processing, signing, approval, or rejection reason. |
reject | boolean | No | true rejects the document; false processes it normally. |
signatureDisplayMode | int | No | Signature display mode: 1 text only, 2 text and image, 3 image only. |
signatureImage | string | No | Signature image as Base64/Data URI. |
signingPage | int | No | Page containing the signature. |
signingPosition | string | No | Signature coordinates in llx,lly,urx,ury format. |
fileInfoId | string (GUID) | No | ID of the component file to sign. Get it from Get Document Details, for example from downloadFileUrls[].id. |
signatureText | string | No | Displayed signature text. |
fontSize | int | No | Signature text font size. |
processAllAdjacentProcesses | boolean | No | Process all adjacent workflow steps using configured setup values. |
adjacentProcesses | Array[object] | No | Explicit list of adjacent workflow steps to process with the root process. |
adjacentProcesses object
| Key | Type | Required | Description |
|---|---|---|---|
processId | string (GUID) | Yes | ID of the adjacent process. |
signingPage | int | No | Signing page. If omitted, the configured value is used. |
signingPosition | string | No | Signing coordinates. If omitted, the configured value is used. |
fileInfoId | string (GUID) | No | ID of the component file to sign for this adjacent process. |
signatureDisplayMode | int | No | Signature display mode for Sign Draw/E-Sign. |
reason | string | No | Processing/signing reason. |
signatureImage | string | No | Signature image as Base64/Data URI. |
signatureText | string | No | Displayed signature text. |
fontSize | int | No | Signature text font size. |
caution
- For a document containing multiple files, pass the correct
fileInfoIdfor each process that places a signature. Otherwise, the target file is ambiguous. - Do not send
processAllAdjacentProcesses: truetogether withadjacentProcessesunless this combination has been confirmed for the deployed version. The precedence is not defined in the source specification. - Signature-related fields are conditionally required depending on access permission, signing method, OTP policy, and configured signing positions.
Adjacent process behavior
| Configuration | Behavior |
|---|---|
processAllAdjacentProcesses: false, without adjacentProcesses | Process only the root process. |
processAllAdjacentProcesses: false, with adjacentProcesses | Process the root process and only the listed adjacent processes. |
processAllAdjacentProcesses: true, without adjacentProcesses | Process the root process and all adjacent processes using configured values. |
Sample request
{
"processId": "a5af6828-6470-4282-8e42-08df1d03012f",
"reason": "Agree",
"reject": false,
"signatureDisplayMode": 2,
"signatureImage": "data:image/png;base64,...",
"signingPage": 1,
"signingPosition": "10,100,200,150",
"fileInfoId": "c85895bd-3b1c-428e-bc72-b285ff7e5286",
"signatureText": "Confirm document content",
"fontSize": 12,
"processAllAdjacentProcesses": false,
"adjacentProcesses": [
{
"processId": "d70fdf67-3fc2-4ca0-8e41-08df1d03012f",
"reason": "Agree",
"signatureDisplayMode": 2,
"signatureImage": "data:image/png;base64,...",
"signingPage": 2,
"signingPosition": "10,100,200,150",
"fileInfoId": "64b60a44-706c-4449-a866-bc880b755599",
"signatureText": "Confirm document content",
"fontSize": 12
}
]
}
Sample response body
The response contains the updated document, workflow, and component-file download information. The sample below is shortened but remains valid JSON.
{
"data": {
"id": "926cbf31-644b-43e1-a6f6-a4f222ecc1d0",
"createdDate": "2026-09-28T14:24:31.1791577",
"lastModifiedDate": "2026-09-28T15:15:49.1999547+07:00",
"completedDate": "2026-09-28T15:15:49.2000205+07:00",
"no": "26.TEST.SELN.N3XP",
"subject": "Document 26.TEST.SELN.N3XP",
"status": {
"value": 4,
"description": "Completed"
},
"processInOrder": true,
"processes": [
{
"id": "6972d59f-7826-4346-1035-08df1d2f16e6",
"orderNo": 1,
"reason": "Agree",
"pageSign": 1,
"position": "325,654,505,744",
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 3,
"description": "Signed"
},
"documentId": "926cbf31-644b-43e1-a6f6-a4f222ecc1d0",
"fileInfoId": "297b8d9a-4b24-42af-a5bb-d3531f6bcd7c"
}
],
"downloadFileUrls": [
{
"id": "297b8d9a-4b24-42af-a5bb-d3531f6bcd7c",
"fileName": "Sample1.pdf",
"downloadUrl": "{HOST}/Api/Download?token=...",
"orderNo": 1,
"size": 345882
},
{
"id": "64b60a44-706c-4449-a866-bc880b755599",
"fileName": "Sample2.pdf",
"downloadUrl": "{HOST}/Api/Download?token=...",
"orderNo": 2,
"size": 192524
}
],
"zipDownloadUrl": "{HOST}/Api/Download/MergeFilesZipDocument?token=...",
"fixedPosition": false
},
"success": true,
"code": 0,
"messages": [
"Sign document success"
]
}
Response notes
| Key | Description |
|---|---|
data.processes[].fileInfoId | Component file processed by that workflow step. |
data.downloadFileUrls | Download information for each component file. |
data.zipDownloadUrl | URL for downloading all component files as a ZIP archive. |
data.status | Current document status after processing. |