Skip to main content
Version: 2.3.0

Update document process

Updated date: 09/01/2025
Updated by: VNPT eContract's team


Purpose

The function updates the information of the document processing workflow, including details such as the handler, position/coordinates, and processing permissions on the document.

  • Request URL: /api/documents/update-process
  • HTTP method: POST
  • HTTP content-type: application/json
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idstring[Required] Id of document
processInOrderbooleanThe document template configuration is sequential or non-sequential:
true: sequential processing workflow
false: non-sequential processing workflow
processesArray[object]An array of information about participants and document processors in the workflow:
{
"orderNo": The processing order number in the workflow,
"processedByUserCode": The code of the processor in the workflow,
"accessPermissionCode": The code for document processing permission in the workflow,
"position": The coordinate position of the signature frame,
"pageSign": The page containing the signature frame
}
tip

accessPermissionCode is access permissions:

  • V is view only
  • D is digital sign
  • E is e-sign
  • EKYC is eKYC sign
  • DR is sign draw
  • A is approve
  • F is fill data
  • C is coordinate
Caution

F allways placed before D, E, EKYC and DR in sequential processing

Sample request

{
"id": "73f4e64c-521e-457f-013f-08dad829ec1c",
"processInOrder": true,
"processes": [
{
"orderNo": 1,
"processedByUserCode": "baoth",
"accessPermissionCode": "DR",
"position": "20,750,150,820",
"pageSign": 1
},
{
"orderNo": 2,
"processedByUserCode": "phannhan",
"accessPermissionCode": "D",
"position": "440,750,570,820",
"pageSign": 1
},
{
"orderNo": 3,
"processedByUserCode": "usercode",
"accessPermissionCode": "A"
}
]
}

Sample response body

{
"data": {
"id": "73f4e64c-521e-457f-013f-08dad829ec1c",
"createdDate": "2022-12-07T15:06:17.9285943",
"lastModifiedDate": "2022-12-07T15:07:33.5124703+07:00",
"no": "177667",
"subject": "Create document via API",
"hasVerified": false,
"fileType": 0,
"status": {
"value": 1,
"description": "New document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Create sample document via API",
"createdByUserId": 2341,
"processRecipientCount": 2,
"processInOrder": false,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isCancelable": true,
"isEditable": true,
"isShareable": false,
"isAccessable": false,
"isExpired": false,
"canDownload": false,
"processes": [
{
"id": "9ba763ea-e6f2-4dfb-b6de-08dad82a185b",
"createdDate": "2022-12-07T15:07:33.5122804+07:00",
"comId": 164,
"isOrder": false,
"orderNo": 1,
"pageSign": 0,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 1,
"description": "View only"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "73f4e64c-521e-457f-013f-08dad829ec1c"
},
{
"id": "04434de3-4bd4-4576-b6df-08dad82a185b",
"createdDate": "2022-12-07T15:07:33.5124667+07:00",
"comId": 164,
"isOrder": false,
"orderNo": 2,
"pageSign": 0,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "73f4e64c-521e-457f-013f-08dad829ec1c"
},
{
"id": "40259656-d5fb-4a3b-b6e0-08dad82a185b",
"createdDate": "2022-12-07T15:07:33.5124699+07:00",
"comId": 164,
"isOrder": false,
"orderNo": 3,
"pageSign": 0,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 3,
"description": "Approve"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 2341,
"documentId": "73f4e64c-521e-457f-013f-08dad829ec1c"
}
],
"histories": [
{
"createdDate": "2022-12-07T15:07:33.5125307+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.66",
"activity": {
"value": 2,
"description": "Update document"
}
}
],
"messages": [],
"downloadUrl": "{HOST}/Api/Download?token=..."
},
"success": true,
"code": 0,
"messages": [
"Update document success"
]
}