Skip to main content
Version: 2.3.0

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:
KeyTypeDescription
documentIdsArray[string][Required] Array of many Document Id
accessPermissionCodestring[Required] Access permissions
caution
  • documentIds must 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 accessPermissionCode is 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​

KeyTypeDescription
successbooleanResponse status (true: Success, false: Failure)
codeintResponse code from the system
messagesarrayList of messages returned by the system (e.g., ["Batch process created successfully"])
dataobjectObject containing information about the newly created document batch (see details below)

Details of data:​

KeyTypeDescription
idstringID of the batch processing task (GUID format)
comIdintCompany/organization ID
accessPermissionobjectProcessing permission applied to the document batch: {"value": int, "description": string} (e.g., Sign draw, ...)
statusobjectStatus of the document batch: {"value": int, "description": string}
1: New (Newly created)
processesarrayList 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:

KeyTypeDescription
idstringProcess ID (GUID format)
createdDatestringProcess creation time (ISO 8601 format)
comIdintCompany/organization ID
isOrderbooleanWhether it is the current processing turn (true: Current turn, false: Not the current turn)
orderNointProcessing order number in the workflow
pageSignintPage where the signature is placed on the document
positionstringSignature position coordinates (format "x1,y1,x2,y2")
displayTypeobjectSignature display type: {"value": int, "description": string}
accessPermissionobjectProcessing permission for this turn: {"value": int, "description": string} (e.g., Sign draw, Approve, ...)
statusobjectProcessing status: {"value": int, "description": string} (e.g., Waiting, Signed, ...)
processedByUserIdintID of the user responsible for processing this turn
documentIdstringID of the individual document in the batch (GUID format)
fillingItemsarrayList of data fields to be filled in (Array[object])
fileInfoIdstringID of the component file associated with the process, when the source document contains multiple files.

Common Errors​

MessageDescription
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.