Nhảy tới nội dung
Phiên bản: 2.3.0

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:
KeyVị tríTypeBắt buộcDescription
documentIdPath paramGUIDCó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​

KeyTypeDescription
successbooleanTrạng thái phản hồi của yêu cầu (true: Thành công, false: Thất bại)
codeintMã phản hồi từ hệ thống
messagesarrayDanh sách thông báo hoặc lỗi trả về từ hệ thống (Ví dụ: ["Send to recipient success"])
dataobjectĐố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.

KeyTypeDescription
statusobjectTrạng thái chứng từ — chuyển sang value = 2 ("Ready" — Sẵn sàng) sau khi gửi quy trình
createdByUserobjectThông tin người tạo chứng từ (xem bên dưới)
waitingProcessobjectNgười đang chờ xử lý ở bước hiện tại của quy trình ký (xem bên dưới)
waitingProcessesarrayTrù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
processesarrayToà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:​

KeyTypeDescription
idintId người tạo
codestringMã người dùng
namestringHọ tên người tạo
emailstringEmail người tạo
usernamestringTên đăng nhập (thường trùng email)

Chi tiết đối tượng waitingProcess:​

KeyTypeDescription
idGUIDId bước xử lý (process)
createdDatedatetimeThời điểm tạo bước xử lý
comIdintId công ty của người xử lý
isOrderbooleanBước xử lý có thuộc quy trình tuần tự hay không
orderNointThứ tự xử lý
pageSignintSố trang cần ký trong file
positionstringTọa độ vị trí đặt chữ ký trên file, định dạng "x1,y1,x2,y2"
displayTypeobjectKiểu hiển thị chữ ký (xem danh mục Enum tại Phụ lục)
accessPermissionobjectQuyề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)
statusobjectTrạng thái bước xử lý (ví dụ: Waiting — Chờ xử lý)
processedByUserIdintId người được phân công xử lý bước này
processedByUserobjectThông tin người được phân công xử lý bước này
documentIdstring (GUID)Id chứng từ chứa bước xử lý này
fillingItemsarrayDanh sách trường dữ liệu cần điền tại bước này (nếu có)
fileInfoIdstring (GUID)ID file thành phần cần xử lý ở bước này
attachmentsarrayTệp đính kèm phát sinh tại bước xử lý (nếu có)
Lưu ý

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