Skip to main content
Version: 2.3.0

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:
KeyTypeRequiredDescription
batchProcessIdstringYesBatch process ID from data.id returned by Create batch process.
reasonstringNoProcessing, signing, approval, or rejection reason.
rejectbooleanNotrue rejects the documents; false processes them normally.
otpstringNoOTP confirmation code when required. First call: null; confirmation call: OTP received through Email/SMS.
signatureDisplayModeintNoSignature display mode: 1 text only, 2 text and image, 3 image only.
signatureImagestringNoSignature image as a Base64/Data URI.
signingPageintNoSigning page. Use null to use each process's configured page.
signingPositionstringNoSigning coordinates in llx,lly,urx,ury format. Use null to use configured positions.
signatureTextstringNoDisplayed signature text.
fontSizeintNoSignature text font size.
showReasonbooleanNoWhether to display the processing reason on the signature.
confirmTermsConditionsbooleanNoConfirmation of legal terms before processing.
processAllAdjacentProcessesbooleanNotrue 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"
]
}