Cập nhật quy trình xử lý
Ngày cập nhật: 16 tháng 09, 2026
Người cập nhật: VNPT eContract's team
Mục đích
Cập nhật quy trình xử lý cho chứng từ đã được tạo tại mục 4.1 và cập nhật tại mục 4.2 (nếu có), bao gồm danh sách người tham gia xử lý, thứ tự thực hiện, quyền xử lý và thông tin vị trí ký tương ứng trên từng file thành phần (fileInfoId) của chứng từ.
- Request URL:
/v2/documents/update-process - HTTP method:
POST - HTTP content-type:
application/json - Authorize:
Bearer token - Parameter:
| Key | Type | Bắt buộc | Description |
|---|---|---|---|
id | GUID | Có | DocumentId của chứng từ cần cấu hình quy trình (lấy từ response API mục 4.1 hoặc 4.2) |
processInOrder | boolean | Có | Quy trình xử lý tuần tự (true) hay song song (false) |
processes | array | Có | Danh sách bước xử lý - chi tiết bên dưới |
processes[].orderNo | int | Có | Thứ tự xử lý (nếu processInOrder = true) |
processes[].processedByUserCode | string(50) | Có | Mã người dùng được phân công xử lý |
processes[].accessPermissionCode | string(50) | Có | Mã quyền xử lý (ví dụ: "D" — Ký số; xem thêm danh mục quyền xử lý tại Phụ lục) |
processes[].position | string | Có | Tọa độ vị trí đặt chữ ký trên file, định dạng "x1,y1,x2,y2" |
processes[].pageSign | int | Có | Trang cần ký trong file |
processes[].fileInfoId | GUID | Có | ID file thành phần cần xử lý (lấy từ downloadFileUrls[].id của response mới nhất tại API mục 4.1 hoặc 4.2) |
Mẫu request
{
"id": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"processInOrder": true,
"processes": [
{
"orderNo": 1,
"processedByUserCode": "user001",
"accessPermissionCode": "D",
"position": "234,514,374,574",
"pageSign": 1,
"fileInfoId": "6865273c-90f5-49cd-403b-08defc11a479"
},
{
"orderNo": 2,
"processedByUserCode": "user002",
"accessPermissionCode": "D",
"position": "334,614,474,674",
"pageSign": 1,
"fileInfoId": "a940f960-213c-4a89-403c-08defc11a479"
}
]
}
Mẫu response body
{
"data": {
"id": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"createdDate": "2026-08-13T17:55:40.8560899",
"lastModifiedDate": "2026-08-13T17:58:15.7799973+07:00",
"no": "DOCUMENT-MF-001",
"subject": "Chứng từ nhiều file DOCUMENT-MF-001 - Cập nhật",
"hasVerified": false,
"hasVerify": false,
"hasSeal": false,
"requireVerifiedUserSigning": false,
"status": {
"value": 1,
"description": "New"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Ví dụ cập nhật chứng từ DOCUMENT-MF-001",
"createdByUserId": 27938,
"processRecipientCount": 2,
"waitingProcesses": [
],
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"isFillable": false,
"type": {
"id": 8950,
"code": "DOCID",
"name": "Chứng từ thử nghiệm",
"documentCount": 1,
"enableVnptSeal": false,
"requireVerifiedUserSigning": false,
"children": [
]
},
"processes": [
{
"id": "bba867ee-09f9-41f6-6ddb-08def929c6d3",
"createdDate": "2026-08-13T17:58:15.7798094+07:00",
"comId": 7354,
"isOrder": true,
"orderNo": 1,
"pageSign": 1,
"position": "234,514,374,574",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 4,
"description": "Sign digital"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 59407,
"documentId": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"fillingItems": [
],
"fileInfoId": "6865273c-90f5-49cd-403b-08defc11a479",
"attachments": [
]
},
{
"id": "129da2f9-85d4-4390-6ddc-08def929c6d3",
"createdDate": "2026-08-13T17:58:15.7799953+07:00",
"comId": 7354,
"isOrder": true,
"orderNo": 2,
"pageSign": 1,
"position": "334,614,474,674",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 4,
"description": "Sign digital"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 27938,
"documentId": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"fillingItems": [
],
"fileInfoId": "a940f960-213c-4a89-403c-08defc11a479",
"attachments": [
]
}
],
"accessibleViewProcesses": [
],
"histories": [
{
"createdDate": "2026-08-13T17:58:15.7800305+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.34",
"activity": {
"value": 2,
"description": "Update document"
}
}
],
"attachments": [],
"relatedDocuments": [],
"linkedDocuments": [],
"messages": [],
"fillingItems": [],
"sharedUsers": [],
"isMarkStar": false,
"downloadFileUrls": [
{
"id": "6865273c-90f5-49cd-403b-08defc11a479",
"fileName": "Tai-lieu-chinh-01.pdf",
"downloadUrl": "{HOST}/api/Download?token=...",
"downloadWatermarkMetadataUrl": "{HOST}/api/Download?token=...",
"orderNo": 1,
"size": 358043,
"fileType": {
"value": 0,
"description": "General"
},
"hasSeal": false
},
{
"id": "a940f960-213c-4a89-403c-08defc11a479",
"fileName": "Phu-luc-02.pdf",
"downloadUrl": "{HOST}/api/Download?token=...",
"downloadWatermarkMetadataUrl": "{HOST}/api/Download?token=...",
"orderNo": 2,
"size": 262757,
"fileType": {
"value": 0,
"description": "General"
},
"hasSeal": false
}
],
"zipDownloadUrl": "{HOST}/api/Download/MergeFilesZipDocument?token=...",
"zipDownloadOriginalUrl": "{HOST}/api/Download/MergeFilesZipDocument?token=...",
"zipDownloadWatermarkMetadataUrl": "{HOST}/api/Download/MergeFilesZipDocument?token=...",
"requiresSealSendConfirmation": false,
"fixedPosition": false,
"isLaborContractDocument": false
},
"success": true,
"code": 0,
"messages": [
"Update document success"
]
}
Mô tả Response Body
| Key | Type | Description |
|---|---|---|
success | boolean | Trạng thái phản hồi của yêu cầu (true: Thành công, false: Thất bại) |
code | int | Mã phản hồi từ hệ thống |
messages | array | Danh sách thông báo hoặc lỗi trả về từ hệ thống (Ví dụ: ["Update document success"]) |
data | object | Đối tượng chứa thông tin chi tiết của chứng từ sau khi cập nhật quy trình xử lý (xem chi tiết bên dưới) |
Chi tiết dữ liệu trong data:
Các trường id, createdDate, lastModifiedDate, no, subject, description, status, contractStatus, type, downloadFileUrls, zipDownloadUrl, zipDownloadOriginalUrl, zipDownloadWatermarkMetadataUrl... có ý nghĩa giống API Tạo chứng từ nhiều file (mục 4.1). Bảng dưới đây chỉ mô tả các trường thay đổi giá trị hoặc phát sinh mới sau khi cập nhật quy trình cho chứng từ.
| Key | Type | Description |
|---|---|---|
processRecipientCount | int | Số người tham gia xử lý quy trình vừa cấu hình |
processInOrder | boolean | Quy trình xử lý tuần tự (true) hay song song (false), lấy theo giá trị đã gửi ở request |
processes | array | Danh sách bước xử lý vừa được cấu hình — chi tiết từng phần tử (xem bên dưới) |
Chi tiết danh sách processes:
Danh sách chứa các đối tượng bước xử lý trong quy trình chứng từ với các thuộc tính của 1 phần tử:
| Key | Type | Description |
|---|---|---|
id | GUID | Id bước xử lý (process) do hệ thống sinh ra |
createdDate | datetime | Thời điểm tạo bước xử lý |
comId | int | Id công ty của người xử lý |
isOrder | boolean | Bước xử lý có thuộc quy trình tuần tự hay không |
orderNo | int | Thứ tự xử lý |
pageSign | int | Số trang cần ký trong file |
position | string | Tọa độ vị trí đặt chữ ký trên file, định dạng "x1,y1,x2,y2" |
displayType | object | Kiểu hiển thị chữ ký (xem danh mục Enum tại Phụ lục) |
accessPermission | object | Quyền xử lý được cấp cho bước này (ví dụ: Ký số - xem danh mục Enum tại Phụ lục) |
status | object | Trạng thái bước xử lý (ví dụ: Waiting - Chờ xử lý) |
processedByUserId | int | Id người dùng được phân công xử lý bước này |
documentId | string (GUID) | Id chứng từ chứa bước xử lý này |
fillingItems | array | Danh sách trường dữ liệu cần điền tại bước này (nếu có) |
fileInfoId | string (GUID) | ID file thành phần cần xử lý ở bước này |
attachments | array | Tệp đính kèm phát sinh tại bước xử lý (nếu có) |
Response trả về lại toàn bộ thông tin chứng từ sau khi cập nhật quy trình: mảng processes thể hiện các bước xử lý vừa được cấu hình (trạng thái "Waiting" - Chờ xử lý), processRecipientCount thể hiện số người tham gia xử lý.