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

Lấy thông tin chứng từ theo id

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


Mục đích​

Hàm thực hiện lấy thông tin chi tiết của chứng từ theo id. Trong trường hợp muốn tìm nhiều chứng từ, vui lòng tham khảo Lấy danh sách chứng từ

  • Request URL: /api/documents/{id}
  • HTTP method: GET
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idstring[Bắt buộc] Id chứng từ

Mẫu request​

Thông tin id của chứng từ: id = "f877ee4c-eb23-4274-1eca-08dcd87b88c1"
Request: /api/documents/f877ee4c-eb23-4274-1eca-08dcd87b88c1

Mẫu response body​

{
"data": {
"id": "f877ee4c-eb23-4274-1eca-08dcd87b88c1",
"createdDate": "2024-09-25T10:56:27.4025434",
"lastModifiedDate": "2025-02-25T09:28:21.0974161",
"expiryDate": "2025-02-25T12:00:00",
"completedDate": "2025-02-25T09:28:21.0974181",
"no": "42/PTTT",
"subject": "Chứng từ thử nghiệm dịch vụ Quản lý chứng từ điện tử",
"hasVerified": false,
"hasVerify": false,
"hasSeal": false,
"requireVerifiedUserSigning": false,
"status": {
"value": 4,
"description": "Completed"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"department": {
"id": 2061,
"name": "Phòng phát triển thị trường",
"code": "PTTT",
"users": [
]
},
"createdByUser": {
"id": 10287,
"code": "ChauChau",
"name": "KAMONWAN SIVARAKSA",
"email": "thuychaunguyen98@gmail.com",
"phone": "0817XXXXXX",
"comId": 2211
},
"createdByUserId": 10287,
"processRecipientCount": 1,
"waitingProcesses": [
],
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"isFillable": false,
"type": {
"id": 2057,
"code": "TEST",
"name": "Chứng từ thử nghiệm các dịch vụ",
"description": "Chứng từ thử nghiệm",
"documentCount": 1,
"children": [
]
},
"batchImport": {
"id": 5714,
"createdDate": "2024-09-25T10:56:21.7197004",
"uploadedByUserId": 10287,
"uploadedByUser": {
"id": 10287,
"code": "ChauChau",
"name": "KAMONWAN SIVARAKSA",
"email": "thuychaunguyen98@gmail.com",
"phone": "0817XXXXXX",
"comId": 2211
},
"numberOfRecords": 1,
"name": "Lô mẫu lỗi break page CNCL",
"status": {
"value": 999,
"description": "Process sent"
},
"documents": [
null
],
"errors": [
]
},
"processes": [
{
"id": "7845eaf3-b73b-4fa4-b11c-08dd2df53ec0",
"lastModifiedDate": "2025-01-06T08:55:49.8230006",
"createdDate": "2024-09-25T10:56:27.4024352",
"comId": 2211,
"isOrder": true,
"orderNo": 1,
"signatureText": "KAMONWAN SIVARAKSA\r\nC=VN,ST=TP Hồ Chí Minh,L=Quận 3,CN=Nguyen Van A,UID=id:10287\r\nĐồng ý ký nháy\r\n25/02/2025 9:28:20 SA +07:00",
"reason": "Đồng ý với nội dung trình ký",
"pageSign": 1,
"position": "13,688,193,778",
"fontSize": 8,
"displayType": {
"value": 2,
"description": "Text and image"
},
"signedMethod": {
"value": 2,
"description": "VNPT SmartCA"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 3,
"description": "Signed"
},
"processedDate": "2025-02-25T09:28:21.089046",
"processedByUserId": 10287,
"processedByUser": {
"id": 10287,
"code": "ChauChau",
"name": "KAMONWAN SIVARAKSA",
"email": "thuychaunguyen98@gmail.com",
"phone": "0817XXXXXX",
"comId": 2211
},
"documentId": "f877ee4c-eb23-4274-1eca-08dcd87b88c1",
"fillingItems": [
]
},
{
"id": "fb8cb263-ae46-4ec3-b11e-08dd2df53ec0",
"lastModifiedDate": "2025-01-06T08:55:49.8234033",
"createdDate": "2024-12-13T11:14:03.5506869",
"comId": 2211,
"isOrder": true,
"orderNo": 2,
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 1,
"description": "View only"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 8252,
"processedByUser": {
"id": 8252,
"code": "IT02756",
"name": "Nguyen Van A",
"email": "email_address",
"phone": "0817XXXXXX",
"comId": 2211
},
"documentId": "f877ee4c-eb23-4274-1eca-08dcd87b88c1",
"fillingItems": [
]
}
],
"accessibleViewProcesses": [
],
"histories": [
{
"createdDate": "2024-09-25T10:56:27.4024537",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "123.25.190.41",
"user": {
"id": 10287,
"code": "ChauChau",
"name": "KAMONWAN SIVARAKSA",
"email": "email_address",
"phone": "0817XXXXXX",
"comId": 2211
},
"activity": {
"value": 1,
"description": "Create document"
}
},
{
"createdDate": "2024-09-25T10:56:40.6895006",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "123.25.190.41",
"user": {
"id": 10287,
"code": "ChauChau",
"name": "KAMONWAN SIVARAKSA",
"email": "email_address",
"phone": "0817XXXXXX",
"comId": 2211
},
"activity": {
"value": 3,
"description": "Invite recipient"
}
}
],
"attachments": [
],
"relatedDocuments": [
],
"linkedDocuments": [
],
"messages": [
{
"createdDate": "2024-12-11T14:45:42.4977745",
"content": "Đồng ý ký nháy",
"senderId": 10287,
"sender": {
"id": 10287,
"code": "ChauChau",
"name": "KAMONWAN SIVARAKSA",
"email": "email_address",
"phone": "0817XXXXXX",
"comId": 2211
}
}
],
"file": {
"name": "IT2.CKDS2025.VNPT-IT2.5EWU.pdf",
"size": 153554
},
"downloadUrl": "{HOST}/Api/Download?token=...",
"downloadOriginalUrl": "{HOST}/Api/Download?token=...",
"downloadWatermarkMetadataUrl": "{HOST}/Api/Download?token=...",
"fillingItems": [
{
"key": "{{name}}",
"positions": []
},
{
"key": "{{gender}}",
"positions": []
}
],
"sharedUsers": [],
"isMarkStar": false,
"requiresSealSendConfirmation": false,
"fixedPosition": false,
"isLaborContractDocument": false
},
"success": true,
"code": 0,
"messages": [
]
}

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
dataobjectĐối tượng chứa thông tin chi tiết của chứng từ (xem chi tiết bên dưới)

Chi tiết dữ liệu trong data:​

KeyTypeDescription
idstringID chứng từ (định dạng GUID)
createdDatestringThời gian tạo chứng từ (định dạng ISO 8601)
lastModifiedDatestringThời gian cập nhật gần nhất (định dạng ISO 8601)
expiryDatestringThời hạn hết hạn xử lý của chứng từ (định dạng ISO 8601)
nostringMã chứng từ
subjectstringTiêu đề chứng từ
hasVerifiedbooleanTrạng thái xác thực chứng từ (true: Đã xác thực, false: Chưa xác thực)
hasSealbooleanChứng từ sẽ được chứng nhận bởi VNPT SEAL (true: Có, false: Không)
requireVerifiedUserSigningbooleanYêu cầu người ký đã xác thực danh tính (true: Bắt buộc xác thực, false: Không bắt buộc)
statusobjectTrạng thái của chứng từ: {"value": int, "description": string}
-4: Đã hết hạn
-3: Đã hủy
-2: Đã xóa
-1: Đã bị từ chối
1: Chứng từ mới
2: Sẵn sàng
3: Đang xử lý
4: Đã hoàn tất
5: Đang hiệu chỉnh
6: Đang trong hàng chờ
7: Đang xử lý ký tự động
contractStatusobjectTrạng thái hiệu lực hợp đồng: {"value": int, "description": string}
0: Không xác định
1: Còn hiệu lực
2: Gần hết hiệu lực
-2: Chưa có hiệu lực
-1: Hết hiệu lực
descriptionstringMô tả chi tiết về chứng từ
departmentobjectThông tin phòng ban/bộ phận:
{"id": int, "name": string, "code": string}
createdByUserIdintID người tạo chứng từ
processRecipientCountintTổng số người tham gia xử lý chứng từ
waitingProcessobjectThông tin chi tiết lượt xử lý đang chờ (xem chi tiết bên dưới)
processInOrderbooleanCấu hình xử lý tuần tự (true: Theo thứ tự, false: Song song)
isWaitToSignDrawbooleanTrạng thái đang chờ ký nháy (true/false)
isWaitToSignDigitalbooleanTrạng thái đang chờ ký số (true/false)
isWaitToApprovebooleanTrạng thái đang chờ phê duyệt (true/false)
isWaitToFillDatabooleanTrạng thái đang chờ điền thông tin (true/false)
isWaitToCoordinatebooleanTrạng thái đang chờ điều phối (true/false)
isWaitToESignbooleanTrạng thái đang chờ ký điện tử (E-Sign) (true/false)
isWaitToEkycbooleanTrạng thái đang chờ ký xác thực eKYC (true/false)
isFillablebooleanCho phép điền dữ liệu vào form chứng từ (true/false)
typeobjectLoại chứng từ:
{
    "id": int,
    "code": string, 
    "name": string,
    "description": string, 
    "documentCount": int
}
documentTemplateobjectMẫu chứng từ sử dụng:
{
    "id": int, 
    "name": string, 
    "createdDate": string, 
    "fileName": string, 
    "downloadUrl": string, 
    "pdfDownloadUrl": string
}
batchImportobjectThông tin lô nhập tạo chứng từ này (xem chi tiết bên dưới)
processesarrayDanh sách các lượt xử lý trong quy trình (Array[object]) (xem chi tiết bên dưới)
historiesarrayLịch sử thao tác trên chứng từ (Array[object]) (xem chi tiết bên dưới)
attachmentsarrayDanh sách tệp đính kèm đi kèm chứng từ (Array[object])
relatedDocumentsarrayDanh sách chứng từ liên quan (Array[object])
messagesarrayDanh sách tin nhắn/trao đổi trong chứng từ (Array[object])
fileobjectThông tin file chứng từ gốc: {"name": string, "size": int}
downloadUrlstringĐường dẫn tải xuống file chứng từ
fillingItemsarrayDanh sách trường thông tin điền động
fixedPositionbooleanCấu hình cố định vị trí hiển thị chữ ký (true: Có, false: Không)
isLaborContractDocumentbooleanCó phải hợp đồng lao động hay không (true: Có, false: Không)

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

Thông tin về lô tải lên ban đầu chứa chứng từ này:

KeyTypeDescription
idintID của lô nhập
createdDatestringThời gian tạo lô
uploadedByUserIdintID người tải lô lên
uploadedByUserobjectThông tin người tải lô lên (id, code, name, email,...)
numberOfRecordsintTổng số lượng bản ghi trong lô
namestringTên lô mẫu nhập
statusobjectTrạng thái của lô: {"value": int, "description": string}
documentsarrayDanh sách các chứng từ thuộc lô
errorsarrayDanh sách thông tin lỗi trong quá trình xử lý lô

Chi tiết danh sách processes:​

Danh sách chứa các đối tượng lượt xử lý trong quy trình chứng từ với các thuộc tính của 1 phần tử:

KeyTypeDescription
idstringID định danh của lượt xử lý
createdDatestringThời gian tạo lượt xử lý
comIdintID công ty/đơn vị xử lý
isOrderbooleanXác định có thứ tự xử lý hay không
orderNointThứ tự xử lý trong quy trình
pageSignintTrang đặt khung chữ ký
positionstringTọa độ vị trí đặt khung chữ ký
displayTypeobjectKiểu hiển thị chữ ký:
{ "value": int, "description": string }
accessPermissionobjectQuyền xử lý chứng từ: {"value": int, "description": string}
1: Chỉ xem
2: Ký nháy
3: Phê duyệt
4: Ký số
5: Điền thông tin
6: Điều phối
7: Ký điện tử
8: Ký xác thực eKYC
statusobjectTrạng thái của lượt xử lý:
{ "value": int, "description": string }
-1: Đã từ chối
1: Chờ xử lý
2: Đã xem
3: Đã ký
4: Đã phê duyệt
5: Đã điền thông tin
7: Đã điều phối
8: Đang trong hàng chờ
processedByUserIdintID của người dùng thực hiện xử lý
documentIdstringID chứng từ liên quan

Chi tiết lịch sử thao tác (histories):​

KeyTypeDescription
createdDatestringThời gian thực hiện thao tác (định dạng ISO 8601)
requestTypeobjectNguồn thực hiện request: {"value": int, "description": string}
-1: Unspecified (Không xác định)
0: Web
1: Api
3: Service (Dịch vụ hệ thống)
4: Mobile (Ứng dụng di động)
ipAddressstringĐịa chỉ IP thực hiện
userobjectThông tin người thực hiện:
{
    "id": "ID người dùng",
    "code": "Mã người dùng",
    "name": "Tên người dùng",
    "email": "Email người dùng",
    "comId": "ID công ty",
    "username": "Tên tài khoản"
}
activityobjectThao tác thực hiện: {"value": int, "description": string}
-3: Hủy chứng từ
-2: Xóa chứng từ
-1: Từ chối chứng từ
1: Tạo chứng từ
2: Cập nhật chứng từ
3: Mời người nhận
4: Xem chứng từ
5: Ký chứng từ
6: Tải chứng từ