Get document by Id
Updated date: 18/08/2026
Updated by: VNPT eContract's team
Purpose
The function retrieves detailed information of a document based on its ID. In case you want to search for multiple documents, please refer to Get list of documents
- Request URL:
/api/documents/{id} - HTTP method:
GET - Authorize:
Bearer token - Parameter:
| Key | Type | Description |
|---|---|---|
id | string | [Required] Id of document |
Sample request
Id of document: id = "f877ee4c-eb23-4274-1eca-08dcd87b88c1"
Request: /api/documents/f877ee4c-eb23-4274-1eca-08dcd87b88c1
Sample 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": "Test document for the Electronic Document Management Service",
"hasVerified": false,
"hasVerify": false,
"hasSeal": false,
"requireVerifiedUserSigning": false,
"status": {
"value": 4,
"description": "Completed"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"department": {
"id": 2061,
"name": "Market Development Department",
"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": "Test document for services",
"description": "Test document",
"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": "Batch import 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 Thuy Chau,UID=id:10287\r\nĐồng ý ký nháy\r\n25/02/2025 9:28:20 SA +07:00",
"reason": "Agree with the content for signing",
"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 Thuy Chau",
"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": "Agree with document content",
"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": [
]
}
Response Body Description
| Key | Type | Description |
|---|---|---|
success | boolean | Response status (true: Success, false: Failure) |
code | int | Response code from the system |
messages | array | List of messages or errors returned by the system |
data | object | Object containing detailed information about the document (see details below) |
Details of data:
| Key | Type | Description |
|---|---|---|
id | string | Document ID (GUID format) |
createdDate | string | Document creation time (ISO 8601 format) |
lastModifiedDate | string | Last modified time (ISO 8601 format) |
expiryDate | string | Document processing expiration date (ISO 8601 format) |
no | string | Document code |
subject | string | Document subject |
hasVerified | boolean | Document verification status (true: Verified, false: Not verified) |
hasSeal | boolean | Indicates whether the document will be certified by VNPT SEAL (true: Yes, false: No) |
requireVerifiedUserSigning | boolean | Requires signers to have verified their identity (true: Required, false: Optional) |
status | object | Document status: {"value": int, "description": string}-4: Expired document -3: Canceled document -2: Deleted document -1: Rejected document 1: New document 2: Ready document 3: Processing document 4: Completed document 5: Correcting document 6: InQueue document 7: Auto Sign processing document |
contractStatus | object | Contract validity status: {"value": int, "description": string}0: Undefined 1: Contract Valid 2: Contract almost expired -2: Contract not valid yet -1: Contract expired |
description | string | Detailed description of the document |
department | object | Department information:{"id": int, "name": string, "code": string} |
createdByUserId | int | ID of the user who created the document |
processRecipientCount | int | Total number of participants involved in processing the document |
waitingProcess | object | Detailed information about the current pending process (see details below) |
processInOrder | boolean | Sequential processing configuration (true: In order, false: Parallel) |
isWaitToSignDraw | boolean | Whether the document is waiting for a drawn signature (true/false) |
isWaitToSignDigital | boolean | Whether the document is waiting for a digital signature (true/false) |
isWaitToApprove | boolean | Whether the document is waiting for approval (true/false) |
isWaitToFillData | boolean | Whether the document is waiting for data entry (true/false) |
isWaitToCoordinate | boolean | Whether the document is waiting for coordination (true/false) |
isWaitToESign | boolean | Whether the document is waiting for an electronic signature (E-Sign) (true/false) |
isWaitToEkyc | boolean | Whether the document is waiting for eKYC verification signing (true/false) |
isFillable | boolean | Whether data can be entered into the document form (true/false) |
type | object | Document type: {
"id": int,
"code": string,
"name": string,
"description": string,
"documentCount": int
} |
documentTemplate | object | Document template used: {
"id": int,
"name": string,
"createdDate": string,
"fileName": string,
"downloadUrl": string,
"pdfDownloadUrl": string
} |
batchImport | object | Information about the import batch used to create this document (see details below) |
processes | array | List of processing steps in the workflow (Array[object]) (see details below) |
histories | array | History of actions performed on the document (Array[object]) (see details below) |
attachments | array | List of attachments included with the document (Array[object]) |
relatedDocuments | array | List of related documents (Array[object]) |
messages | array | List of messages/conversations in the document (Array[object]) |
file | object | Original document file information: {"name": string, "size": int} |
downloadUrl | string | URL to download the document file |
fillingItems | array | List of dynamic data fields to be filled in |
fixedPosition | boolean | Configures whether the signature position is fixed (true: Yes, false: No) |
isLaborContractDocument | boolean | Indicates whether this is a labor contract document (true: Yes, false: No) |
Details of batchImport:
Information about the original upload batch containing this document:
| Key | Type | Description |
|---|---|---|
id | int | Import batch ID |
createdDate | string | Batch creation time |
uploadedByUserId | int | ID of the user who uploaded the batch |
uploadedByUser | object | Information about the user who uploaded the batch (id, code, name, email,...) |
numberOfRecords | int | Total number of records in the batch |
name | string | Import batch template name |
status | object | Batch status: {"value": int, "description": string} |
documents | array | List of documents belonging to the batch |
errors | array | List of error information during batch processing |
Details of processes:
The list contains process objects with the following properties for each element:
| Key | Type | Description |
|---|---|---|
id | string | Process ID |
createdDate | string | Process creation time |
comId | int | Processing company/organization ID |
isOrder | boolean | Whether the processing follows an order |
orderNo | int | Processing order in the workflow |
pageSign | int | Page where the signature box is placed |
position | string | Coordinates of the signature box position |
displayType | object | Signature display type: { "value": int, "description": string } |
accessPermission | object | Document processing permission: {"value": int, "description": string}1: View only 2: Sign draw 3: Approve 4: Sign digital 5: Fill data 6: Coordinate 7: E-Sign 8: eKYC sign |
status | object | Process status: { "value": int, "description": string }-1: Rejected 1: Waiting 2: Viewed 3: Signed 4: Approved 5: Filled 7: Coordinated 8: In Queue |
processedByUserId | int | ID of the user performing the processing |
documentId | string | Related document ID |
Details of histories:
| Key | Type | Description |
|---|---|---|
createdDate | string | Time when the action was performed (ISO 8601 format) |
requestType | object | Request source: {"value": int, "description": string} -1: Unspecified 0: Web 1: Api 3: Service 4: Mobile |
ipAddress | string | IP address from which the action was performed |
user | object | Information about the user who performed the action: {
"id": "User ID",
"code": "User code",
"name": "User name",
"email": "User email",
"comId": "Company ID",
"username": "Username"
} |
activity | object | Action performed: {"value": int, "description": string}-3: Cancel document -2: Delete document -1: Reject document 1: Create document 2: Update document 3: Invite recipient 4: View document 5: Sign document 6: Download document |