Gửi quy trình chứng từ
Ngày cập nhật: 16 tháng 09, 2026
Người cập nhật: VNPT eContract's team
Mục đích
Kích hoạt gửi quy trình ký/duyệt đã cấu hình ở mục 4.3 cho chứng từ, chuyển chứng từ sang trạng thái sẵn sàng xử lý và thông báo tới người xử lý đầu tiên trong quy trình.
- Request URL:
/v2/documents/send-process/{documentId} - HTTP method:
POST - Authorize:
Bearer token - Parameter:
| Key | Vị trí | Type | Bắt buộc | Description |
|---|---|---|---|---|
documentId | Path param | GUID | Có | Id chứng từ cần gửi quy trình (ví dụ: /v2/documents/send-process/c7cd1930-...) |
Mẫu request
POST /v2/documents/send-process/f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e
Mẫu response body
{
"data": {
"id": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"createdDate": "2026-08-13T17:55:40.8560899",
"lastModifiedDate": "2026-08-13T17:58:46.1287882+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": 2,
"description": "Ready"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Ví dụ cập nhật chứng từ DOCUMENT-MF-001",
"createdByUser": {
"id": 27938,
"code": "user002",
"name": "Người dùng 002",
"email": "user002@yopmail.com",
"phone": "0123456789",
"comId": 7354,
"username": "user002@yopmail.com",
"isSelected": false
},
"createdByUserId": 27938,
"processRecipientCount": 2,
"waitingProcess": {
"id": "bba867ee-09f9-41f6-6ddb-08def929c6d3",
"createdDate": "2026-08-13T17:58:15.7798094",
"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,
"processedByUser": {
"id": 59407,
"code": "user001",
"name": "Người dùng 001",
"email": "user001@yopmail.com",
"comId": 7354,
"username": "user001@yopmail.com",
"isSelected": false
},
"documentId": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"fillingItems": [
],
"fileInfoId": "6865273c-90f5-49cd-403b-08defc11a479",
"attachments": [
]
},
"waitingProcesses": [
{
"id": "bba867ee-09f9-41f6-6ddb-08def929c6d3",
"createdDate": "2026-08-13T17:58:15.7798094",
"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,
"processedByUser": {
"id": 59407,
"code": "user001",
"name": "Người dùng 001",
"email": "user001@yopmail.com",
"comId": 7354,
"username": "user001@yopmail.com",
"isSelected": false
},
"documentId": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"fillingItems": [
],
"fileInfoId": "6865273c-90f5-49cd-403b-08defc11a479",
"attachments": [
]
}
],
"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",
"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,
"processedByUser": {
"id": 59407,
"code": "user001",
"name": "Người dùng 001",
"email": "user001@yopmail.com",
"comId": 7354,
"username": "user001@yopmail.com",
"isSelected": false
},
"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",
"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,
"processedByUser": {
"id": 27938,
"code": "user002",
"name": "Người dùng 002",
"email": "user002@yopmail.com",
"phone": "0123456789",
"comId": 7354,
"username": "user002@yopmail.com",
"isSelected": false
},
"documentId": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"fillingItems": [
],
"fileInfoId": "a940f960-213c-4a89-403c-08defc11a479",
"attachments": [
]
}
],
"accessibleViewProcesses": [
],
"histories": [
{
"createdDate": "2026-08-13T17:58:46.1260242+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.34",
"user": {
"id": 27938,
"code": "creator",
"name": "Văn thư",
"email": "creator@yopmail.com",
"phone": "0919380915",
"comId": 7354,
"username": "creator@yopmail.com",
"isSelected": false
},
"activity": {
"value": 3,
"description": "Invite recipient"
}
}
],
"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": [
"Send to recipient 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ụ: ["Send to recipient success"]) |
data | object | Đối tượng chứa thông tin chi tiết của chứng từ sau khi gửi quy trình (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, contractStatus, type, downloadFileUrls, zipDownloadUrl, zipDownloadOriginalUrl, zipDownloadWatermarkMetadataUrl, processInOrder, processRecipientCount... 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 gửi quy trình.
| Key | Type | Description |
|---|---|---|
status | object | Trạng thái chứng từ — chuyển sang value = 2 ("Ready" — Sẵn sàng) sau khi gửi quy trình |
createdByUser | object | Thông tin người tạo chứng từ (xem bên dưới) |
waitingProcess | object | Người đang chờ xử lý ở bước hiện tại của quy trình ký (xem bên dưới) |
waitingProcesses | array | Trùng nội dung với waitingProcess ở trên (dữ liệu mẫu chỉ chứa lại đúng bước đang chờ), cấu trúc từng phần tử xem tại waitingProcess |
processes | array | Toàn bộ các bước xử lý của quy trình ký (không chỉ bước đang chờ) — cấu trúc từng phần tử giống waitingProcess |
Chi tiết đối tượng createdByUser:
| Key | Type | Description |
|---|---|---|
id | int | Id người tạo |
code | string | Mã người dùng |
name | string | Họ tên người tạo |
email | string | Email người tạo |
username | string | Tên đăng nhập (thường trùng email) |
Chi tiết đối tượng waitingProcess:
| Key | Type | Description |
|---|---|---|
id | GUID | Id bước xử lý (process) |
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: {"value": int, "description": string}1: Chỉ xem (View only) 2: Ký nháy (Sign draw) 3: Phê duyệt (Approve) 4: Ký số (Sign digital) 5: Điền dữ liệu (Fill data) 6: Điều phối (Coordinate) 7: Ký điện tử (E-Sign) 8: Ký eKYC (eKYC sign) |
status | object | Trạng thái bước xử lý (ví dụ: Waiting — Chờ xử lý) |
processedByUserId | int | Id người được phân công xử lý bước này |
processedByUser | object | Thông tin người đượ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ó) |
Sau khi gửi, chứng từ chuyển trạng thái sang "Ready" (Sẵn sàng), data.waitingProcess thể hiện người đang chờ xử lý ở bước đầu tiên của quy trình (processedByUser), kèm quyền xử lý (accessPermission) và vị trí ký (fileInfoId, position, pageSign).