Cập nhật chứng từ nhiều file
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 thông tin của chứng từ nhiều file đã được tạo trước đó, bao gồm thông tin chung của chứng từ và danh sách file thành phần theo dữ liệu được truyền trong request.
- Request URL:
/v2/documents/update - HTTP method:
POST - HTTP content-type:
multipart/form-data - Authorize:
Bearer token - Parameter:
| Key | Type | Bắt buộc | Description |
|---|---|---|---|
id | GUID | Có | Id của chứng từ cần cập nhật |
no | string(40) | Không | Số/mã chứng từ |
subject | string(200) | Có | Tiêu đề chứng từ |
description | string(500) | Không | Mô tả chứng từ |
typeId | int | Không | Id loại chứng từ theo danh mục hệ thống |
departmentId | int | Không | Id phòng/ban phát hành chứng từ |
files | array<file> | Không | Danh sách các file thành phần của chứng từ, được truyền trực tiếp trong request theo định dạng multipart/form-data. Hỗ trợ truyền nhiều file trong cùng một request |
relatedDocumentIds | array<GUID> | Không | Id chứng từ đã tồn tại — dùng khi cần trích xuất/liên kết thêm file vào chứng từ đã có sẵn |
attachments | array<file> | Không | Mảng danh sách tệp tin đính kèm theo chứng từ |
customerCode | string(500) | Không | Mã khách hàng, được sử dụng để định danh hoặc tham chiếu khách hàng liên quan đến chứng từ |
customerInformation | string(100) | Không | Thông tin khách hàng liên quan đến chứng từ |
Mẫu request
| Trường | Giá trị mẫu |
|---|---|
id | f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e |
no | DOCUMENT-MF-001 |
subject | Chứng từ nhiều file DOCUMENT-MF-001 - Cập nhật |
description | Ví dụ cập nhật chứng từ DOCUMENT-MF-001 |
files | [Tai-lieu-chinh-01.pdf, Phu-luc-02.pdf] |
Mẫu response body
{
"data": {
"id": "f5b0c112-d357-44ce-b8a8-7cb77d3d0b9e",
"createdDate": "2026-08-13T11:12:51.3713264+07:00",
"lastModifiedDate": "2026-08-17T16:02:30.0372285+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": 0,
"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": [],
"accessibleViewProcesses": [],
"histories": [
{
"createdDate": "2026-08-17T16:02:30.0196228+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.23",
"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": 168155,
"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": 147531,
"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 Xem chi tiết |
Lưu ý
data.id là DocumentId của chứng từ sau khi cập nhật. Mảng data.downloadFileUrls trả về danh sách file thành phần của chứng từ sau cập nhật, trong đó trường id là fileInfoId tương ứng của từng file. Các fileInfoId này được sử dụng khi cấu hình quy trình xử lý cho từng file tại API Cập nhật quy trình chứng từ Xem chi tiết.