Create batch process
Updated date: 29/09/2026
Updated by: VNPT eContract's team
Purpose
Creates a processing batch from individual documents and a specified processing permission. Use the returned data.id as batchProcessId when calling the Batch process document API.
- Request URL:
/api/documents/create-batch-process - HTTP method:
POST - HTTP content-type:
application/json - Authorize:
Bearer token - Parameter:
| Key | Type | Description |
|---|---|---|
documentIds | Array[string] | [Required] Array of many Document Id |
accessPermissionCode | string | [Required] Access permissions |
caution
documentIdsmust identify documents with a valid pending process for the authenticated user.- The authenticated user must participate in the processes being added to the batch.
- One
accessPermissionCodeis applied to the entire processing batch.
tip
accessPermissionCode is access permissions:
- V is view only
- D is digital sign (supported)
- E is e-sign (supported)
- EKYC is eKYC sign
- DR is sign draw (supported)
- A is approve (supported)
- F is fill data
- C is coordinate
Sample request
{
"documentIds": [
"f184943f-e394-42e8-98b3-1e3d178ee62c",
"9c7a4764-2b4b-4169-8be8-d528491af0cb"
],
"accessPermissionCode": "DR"
}
Sample response body
{
"data": {
"id": "673c0f4f-8744-4cf7-1061-08dc9a457201",
"comId": 2211,
"processes": [
{
"id": "2d446004-f560-40ba-3d78-08dc837a4c87",
"createdDate": "2024-06-03T13:41:58.6093432",
"comId": 2211,
"isOrder": true,
"orderNo": 1,
"pageSign": 2,
"position": "414,624,520,676",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 6199,
"documentId": "f184943f-e394-42e8-98b3-1e3d178ee62c",
"fileInfoId": "0ae400d4-96ee-4861-9de2-1f6c2e7e3ec5",
"fillingItems": []
},
{
"id": "c843fdf2-d2a3-405b-3ca6-08dc837a4c87",
"createdDate": "2024-06-03T10:11:56.8206304",
"comId": 2211,
"isOrder": true,
"orderNo": 1,
"pageSign": 1,
"position": "414,78,520,130",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 6199,
"documentId": "9c7a4764-2b4b-4169-8be8-d528491af0cb",
"fillingItems": []
}
],
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "New"
}
},
"success": true,
"code": 0,
"messages": [
"Batch process created successfully"
]
}
Response Body Description
| Key | Type | Description |
|---|---|---|
success | boolean | Response status (true: Success, false: Failure) |
code | int | Response code from the system |
messages | array | List of messages returned by the system (e.g., ["Batch process created successfully"]) |
data | object | Object containing information about the newly created document batch (see details below) |
Details of data:
| Key | Type | Description |
|---|---|---|
id | string | ID of the batch processing task (GUID format) |
comId | int | Company/organization ID |
accessPermission | object | Processing permission applied to the document batch: {"value": int, "description": string} (e.g., Sign draw, ...) |
status | object | Status of the document batch: {"value": int, "description": string}1: New (Newly created) |
processes | array | List of detailed processing information corresponding to each document in the batch (Array[object]) (see details below) |
Details of processes:
List of objects describing detailed processing information for each processing step of the documents in the batch:
| Key | Type | Description |
|---|---|---|
id | string | Process ID (GUID format) |
createdDate | string | Process creation time (ISO 8601 format) |
comId | int | Company/organization ID |
isOrder | boolean | Whether it is the current processing turn (true: Current turn, false: Not the current turn) |
orderNo | int | Processing order number in the workflow |
pageSign | int | Page where the signature is placed on the document |
position | string | Signature position coordinates (format "x1,y1,x2,y2") |
displayType | object | Signature display type: {"value": int, "description": string} |
accessPermission | object | Processing permission for this turn: {"value": int, "description": string} (e.g., Sign draw, Approve, ...) |
status | object | Processing status: {"value": int, "description": string} (e.g., Waiting, Signed, ...) |
processedByUserId | int | ID of the user responsible for processing this turn |
documentId | string | ID of the individual document in the batch (GUID format) |
fillingItems | array | List of data fields to be filled in (Array[object]) |
fileInfoId | string | ID of the component file associated with the process, when the source document contains multiple files. |
Common Errors
| Message | Description |
|---|---|
No valid processes found for the provided documents. | No valid processing workflows were found for the provided document IDs (possibly because the documents do not exist, have already been completed, or do not have a suitable workflow). |
Only user who are part of the process can create a batch processing task. Please verify the user account used to create the batch. | Only users who are part of the document processing workflow have permission to create a batch processing task. Please verify the user account used to create the batch. |