Skip to main content
Version: 2.3.0

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​

KeyTypeRequiredDescription
processIdstring (GUID)YesID of the root process to handle. Get it from waitingProcess.id or processes[].id.
reasonstringNoProcessing, signing, approval, or rejection reason.
rejectbooleanNotrue rejects the document; false processes it normally.
signatureDisplayModeintNoSignature display mode: 1 text only, 2 text and image, 3 image only.
signatureImagestringNoSignature image as Base64/Data URI.
signingPageintNoPage containing the signature.
signingPositionstringNoSignature coordinates in llx,lly,urx,ury format.
fileInfoIdstring (GUID)NoID of the component file to sign. Get it from Get Document Details, for example from downloadFileUrls[].id.
signatureTextstringNoDisplayed signature text.
fontSizeintNoSignature text font size.
processAllAdjacentProcessesbooleanNoProcess all adjacent workflow steps using configured setup values.
adjacentProcessesArray[object]NoExplicit list of adjacent workflow steps to process with the root process.

adjacentProcesses object​

KeyTypeRequiredDescription
processIdstring (GUID)YesID of the adjacent process.
signingPageintNoSigning page. If omitted, the configured value is used.
signingPositionstringNoSigning coordinates. If omitted, the configured value is used.
fileInfoIdstring (GUID)NoID of the component file to sign for this adjacent process.
signatureDisplayModeintNoSignature display mode for Sign Draw/E-Sign.
reasonstringNoProcessing/signing reason.
signatureImagestringNoSignature image as Base64/Data URI.
signatureTextstringNoDisplayed signature text.
fontSizeintNoSignature text font size.
caution
  • For a document containing multiple files, pass the correct fileInfoId for each process that places a signature. Otherwise, the target file is ambiguous.
  • Do not send processAllAdjacentProcesses: true together with adjacentProcesses unless 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​

ConfigurationBehavior
processAllAdjacentProcesses: false, without adjacentProcessesProcess only the root process.
processAllAdjacentProcesses: false, with adjacentProcessesProcess the root process and only the listed adjacent processes.
processAllAdjacentProcesses: true, without adjacentProcessesProcess 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​

KeyDescription
data.processes[].fileInfoIdComponent file processed by that workflow step.
data.downloadFileUrlsDownload information for each component file.
data.zipDownloadUrlURL for downloading all component files as a ZIP archive.
data.statusCurrent document status after processing.