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:
| Key | Type | Description |
|---|---|---|
id | string | [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
| 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 |
data | object | Đố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:
| Key | Type | Description |
|---|---|---|
id | string | ID chứng từ (định dạng GUID) |
createdDate | string | Thời gian tạo chứng từ (định dạng ISO 8601) |
lastModifiedDate | string | Thời gian cập nhật gần nhất (định dạng ISO 8601) |
expiryDate | string | Thời hạn hết hạn xử lý của chứng từ (định dạng ISO 8601) |
no | string | Mã chứng từ |
subject | string | Tiêu đề chứng từ |
hasVerified | boolean | Trạng thái xác thực chứng từ (true: Đã xác thực, false: Chưa xác thực) |
hasSeal | boolean | Chứng từ sẽ được chứng nhận bởi VNPT SEAL (true: Có, false: Không) |
requireVerifiedUserSigning | boolean | Yê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) |
status | object | Trạ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 |
contractStatus | object | Trạ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 |
description | string | Mô tả chi tiết về chứng từ |
department | object | Thông tin phòng ban/bộ phận:{"id": int, "name": string, "code": string} |
createdByUserId | int | ID người tạo chứng từ |
processRecipientCount | int | Tổng số người tham gia xử lý chứng từ |
waitingProcess | object | Thông tin chi tiết lượt xử lý đang chờ (xem chi tiết bên dưới) |
processInOrder | boolean | Cấu hình xử lý tuần tự (true: Theo thứ tự, false: Song song) |
isWaitToSignDraw | boolean | Trạng thái đang chờ ký nháy (true/false) |
isWaitToSignDigital | boolean | Trạng thái đang chờ ký số (true/false) |
isWaitToApprove | boolean | Trạng thái đang chờ phê duyệt (true/false) |
isWaitToFillData | boolean | Trạng thái đang chờ điền thông tin (true/false) |
isWaitToCoordinate | boolean | Trạng thái đang chờ điều phối (true/false) |
isWaitToESign | boolean | Trạng thái đang chờ ký điện tử (E-Sign) (true/false) |
isWaitToEkyc | boolean | Trạng thái đang chờ ký xác thực eKYC (true/false) |
isFillable | boolean | Cho phép điền dữ liệu vào form chứng từ (true/false) |
type | object | Loại chứng từ: {
"id": int,
"code": string,
"name": string,
"description": string,
"documentCount": int
} |
documentTemplate | object | Mẫu chứng từ sử dụng: {
"id": int,
"name": string,
"createdDate": string,
"fileName": string,
"downloadUrl": string,
"pdfDownloadUrl": string
} |
batchImport | object | Thông tin lô nhập tạo chứng từ này (xem chi tiết bên dưới) |
processes | array | Danh sách các lượt xử lý trong quy trình (Array[object]) (xem chi tiết bên dưới) |
histories | array | Lịch sử thao tác trên chứng từ (Array[object]) (xem chi tiết bên dưới) |
attachments | array | Danh sách tệp đính kèm đi kèm chứng từ (Array[object]) |
relatedDocuments | array | Danh sách chứng từ liên quan (Array[object]) |
messages | array | Danh sách tin nhắn/trao đổi trong chứng từ (Array[object]) |
file | object | Thông tin file chứng từ gốc: {"name": string, "size": int} |
downloadUrl | string | Đường dẫn tải xuống file chứng từ |
fillingItems | array | Danh sách trường thông tin điền động |
fixedPosition | boolean | Cấu hình cố định vị trí hiển thị chữ ký (true: Có, false: Không) |
isLaborContractDocument | boolean | Có 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:
| Key | Type | Description |
|---|---|---|
id | int | ID của lô nhập |
createdDate | string | Thời gian tạo lô |
uploadedByUserId | int | ID người tải lô lên |
uploadedByUser | object | Thông tin người tải lô lên (id, code, name, email,...) |
numberOfRecords | int | Tổng số lượng bản ghi trong lô |
name | string | Tên lô mẫu nhập |
status | object | Trạng thái của lô: {"value": int, "description": string} |
documents | array | Danh sách các chứng từ thuộc lô |
errors | array | Danh 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ử:
| Key | Type | Description |
|---|---|---|
id | string | ID định danh của lượt xử lý |
createdDate | string | Thời gian tạo lượt xử lý |
comId | int | ID công ty/đơn vị xử lý |
isOrder | boolean | Xác định có thứ tự xử lý hay không |
orderNo | int | Thứ tự xử lý trong quy trình |
pageSign | int | Trang đặt khung chữ ký |
position | string | Tọa độ vị trí đặt khung chữ ký |
displayType | object | Kiểu hiển thị chữ ký: { "value": int, "description": string } |
accessPermission | object | Quyề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 |
status | object | Trạ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ờ |
processedByUserId | int | ID của người dùng thực hiện xử lý |
documentId | string | ID chứng từ liên quan |
Chi tiết lịch sử thao tác (histories):
| Key | Type | Description |
|---|---|---|
createdDate | string | Thời gian thực hiện thao tác (định dạng ISO 8601) |
requestType | object | Nguồ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) |
ipAddress | string | Địa chỉ IP thực hiện |
user | object | Thô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"
} |
activity | object | Thao 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ừ |