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

Cập nhật chứng từ

Ngày cập nhật: 10 tháng 8, 2026
Người cập nhật: VNPT eContract's team


Mục đích​

Hàm thực hiện cập nhật các thông tin của chứng từ ở trạng thái mới khởi tạo.

  • Request URL: /api/documents/update
  • HTTP method: POST
  • HTTP content-type: multipart/form-data
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idstring[Bắt buộc] Id chứng từ cần cập nhật
nostringMã chứng từ
subjectstringTiêu đề chứng từ
filefileFile chứng từ (định dạng PDF, docx)
descriptionstringMô tả
typeIdintId loại chứng từ
documentTemplateIdintId mẫu chứng từ
departmentIdintId bộ phận
customerCodestringMã khách hàng
customerInformationstringThông tin khách hàng
relatedDocumentIdsArray[string]Mảng Id các chứng từ liên quan
attachmentsArray[file]Mảng các file đính kèm

Mẫu response body​

{
"data": {
"id": "67f7f485-3c65-4e5a-a8fd-08dad7588424",
"createdDate": "2022-12-06T14:07:19.7166444+07:00",
"lastModifiedDate": "2022-12-06T14:07:19.7168438+07:00",
"no": "Test0.02656043684177667",
"subject": "Test0.02656043684177667",
"hasVerified": false,
"hasSeal": false,
"requireVerifiedUserSigning": false,
"status": {
"value": 1,
"description": "New document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Test tạo mới chứng từ bằng API",
"createdByUserId": 2341,
"processRecipientCount": 0,
"processInOrder": false,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"isFillable": false,
"type": {
"id": 46,
"code": "CKDS",
"name": "Chiết khấu doanh số",
"description": "Chứng từ chiết khấu doanh số",
"documentCount": 1
},
"processes": [],
"histories": [
{
"createdDate": "2022-12-06T14:07:20.0170103+07:00",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "10.70.39.66",
"activity": {
"value": 1,
"description": "Create document"
}
}
],
"attachments": [],
"relatedDocuments": [],
"messages": [],
"file": {
"name": "Document.pdf",
"size": 1194181
},
"downloadUrl": "{HOST}/Api/Download?token=..."
},
"success": true,
"code": 0,
"messages": [
" Update document template 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ụ: ["Update document success"])
dataobjectĐối tượng chứa thông tin chi tiết của chứng từ vừa tạo thành công (xem chi tiết)

Các lỗi thường gặp​

MessageDescription
Document type not foundId loại chứng từ không tồn tại
Invalid file format. Only PDF and DOCX formats are supportedSai định dạng file (chỉ PDF hoặc DOCX)
Existed document noMã chứng từ đã tồn tại