Batch process document
Updated date: 29/09/2026
Updated by: VNPT eContract's team
Purpose
Processes the document workflows in a batch created by the Create batch process API. The API supports signing, approval, rejection, and processing adjacent workflow steps using their configured setup values.
caution
The function processes documents and requires the batchProcessId information from the Create batch process API.
- Request URL:
/api/documents/batch-process - HTTP method:
POST - HTTP content-type:
application/json - Authorize:
Bearer token - Parameter:
| Key | Type | Required | Description |
|---|---|---|---|
batchProcessId | string | Yes | Batch process ID from data.id returned by Create batch process. |
reason | string | No | Processing, signing, approval, or rejection reason. |
reject | boolean | No | true rejects the documents; false processes them normally. |
otp | string | No | OTP confirmation code when required. First call: null; confirmation call: OTP received through Email/SMS. |
signatureDisplayMode | int | No | Signature display mode: 1 text only, 2 text and image, 3 image only. |
signatureImage | string | No | Signature image as a Base64/Data URI. |
signingPage | int | No | Signing page. Use null to use each process's configured page. |
signingPosition | string | No | Signing coordinates in llx,lly,urx,ury format. Use null to use configured positions. |
signatureText | string | No | Displayed signature text. |
fontSize | int | No | Signature text font size. |
showReason | boolean | No | Whether to display the processing reason on the signature. |
confirmTermsConditions | boolean | No | Confirmation of legal terms before processing. |
processAllAdjacentProcesses | boolean | No | true processes all adjacent steps using configured setup values. |
info
Only batchProcessId is universally required by the request model. Other fields are conditionally required depending on the processing permission, signing method, OTP policy, and system configuration.
Sample request 1st
{
"batchProcessId": "673c0f4f-8744-4cf7-1061-08dc9a457201",
"reason": "Sign this valid documents",
"reject": false,
"otp": null,
"signatureDisplayMode": 3,
"signatureImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAD…",
"signingPage": null,
"signingPosition": null,
"signatureText": "Nguyen Van A",
"fontSize": 12,
"showReason": false,
"confirmTermsConditions": true,
"processAllAdjacentProcesses": true
}
Sample response body 1st
{
"data": {
"isBatchProcess": false,
"isSingleProcess": false,
"isProcessedByWorkerService": false,
"batchProcessId": "673c0f4f-8744-4cf7-1061-08dc9a457201",
"documentId": "00000000-0000-0000-0000-000000000000",
"documentIds": [],
"accessPermission": 2,
"signMethod": 2,
"signatureDisplayMode": 2,
"batchProcessStatus": 0,
"signingPage": 0,
"signatureText": "Ky hang loat",
"reason": "Dong y voi noi dung trinh ky",
"confirmReason": "Dong y voi noi dung trinh ky",
"showReason": false,
"fontSize": 0,
"receiveOtpMethod": 2,
"receiveOtpPhone": "09123XXXXX",
"receiveOtpEmail": "example@email.com",
"requireOtpConfirmation": true,
"vnptCaPluginAdvancedSign": false,
"drawSigns": [],
"documentMessages": [],
"histories": [],
"digitalSignatures": [],
"processes": [],
"documents": [],
"sharedUsers": [],
"sharedDepartments": [],
"sharedUserGroups": [],
"sharedUserIds": [],
"sharedDepartmentIds": [],
"sharedUserGroupIds": [],
"signatureVerifications": [],
"confirmTermsConditions": false,
"documentIndex": 1,
"fillingItems": [],
"isFillPreview": false,
"isSmartCaLoginRequired": false,
"isBusinessSmartCaAccount": false,
"smartCaCerts": []
},
"success": true,
"code": 100,
"messages": [
"Send confirmation otp success"
]
}
Sample request 2nd (After receiving the OTP code from Email/SMS)
{
"batchProcessId": "673c0f4f-8744-4cf7-1061-08dc9a457201",
"reason": "Sign this valid documents",
"reject": false,
"otp": "089278",
"signatureDisplayMode": 3,
"signatureImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAD…",
"signingPage": null,
"signingPosition": null,
"signatureText": "Nguyen Van A",
"fontSize": 12,
"showReason": false,
"confirmTermsConditions": true
}
Sample response body 2nd
{
"success": true,
"code": 0,
"messages": [
"Sign batch document success"
]
}