Skip to main content
Version: 2.3.0

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:
KeyTypeDescription
idstring[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​

KeyTypeDescription
successbooleanResponse status (true: Success, false: Failure)
codeintResponse code from the system
messagesarrayList of messages or errors returned by the system
dataobjectObject containing detailed information about the document (see details below)

Details of data:​

KeyTypeDescription
idstringDocument ID (GUID format)
createdDatestringDocument creation time (ISO 8601 format)
lastModifiedDatestringLast modified time (ISO 8601 format)
expiryDatestringDocument processing expiration date (ISO 8601 format)
nostringDocument code
subjectstringDocument subject
hasVerifiedbooleanDocument verification status (true: Verified, false: Not verified)
hasSealbooleanIndicates whether the document will be certified by VNPT SEAL (true: Yes, false: No)
requireVerifiedUserSigningbooleanRequires signers to have verified their identity (true: Required, false: Optional)
statusobjectDocument 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
contractStatusobjectContract validity status: {"value": int, "description": string}
0: Undefined
1: Contract Valid
2: Contract almost expired
-2: Contract not valid yet
-1: Contract expired
descriptionstringDetailed description of the document
departmentobjectDepartment information:
{"id": int, "name": string, "code": string}
createdByUserIdintID of the user who created the document
processRecipientCountintTotal number of participants involved in processing the document
waitingProcessobjectDetailed information about the current pending process (see details below)
processInOrderbooleanSequential processing configuration (true: In order, false: Parallel)
isWaitToSignDrawbooleanWhether the document is waiting for a drawn signature (true/false)
isWaitToSignDigitalbooleanWhether the document is waiting for a digital signature (true/false)
isWaitToApprovebooleanWhether the document is waiting for approval (true/false)
isWaitToFillDatabooleanWhether the document is waiting for data entry (true/false)
isWaitToCoordinatebooleanWhether the document is waiting for coordination (true/false)
isWaitToESignbooleanWhether the document is waiting for an electronic signature (E-Sign) (true/false)
isWaitToEkycbooleanWhether the document is waiting for eKYC verification signing (true/false)
isFillablebooleanWhether data can be entered into the document form (true/false)
typeobjectDocument type:
{
    "id": int,
    "code": string, 
    "name": string,
    "description": string, 
    "documentCount": int
}
documentTemplateobjectDocument template used:
{
    "id": int, 
    "name": string, 
    "createdDate": string, 
    "fileName": string, 
    "downloadUrl": string, 
    "pdfDownloadUrl": string
}
batchImportobjectInformation about the import batch used to create this document (see details below)
processesarrayList of processing steps in the workflow (Array[object]) (see details below)
historiesarrayHistory of actions performed on the document (Array[object]) (see details below)
attachmentsarrayList of attachments included with the document (Array[object])
relatedDocumentsarrayList of related documents (Array[object])
messagesarrayList of messages/conversations in the document (Array[object])
fileobjectOriginal document file information: {"name": string, "size": int}
downloadUrlstringURL to download the document file
fillingItemsarrayList of dynamic data fields to be filled in
fixedPositionbooleanConfigures whether the signature position is fixed (true: Yes, false: No)
isLaborContractDocumentbooleanIndicates whether this is a labor contract document (true: Yes, false: No)

Details of batchImport:​

Information about the original upload batch containing this document:

KeyTypeDescription
idintImport batch ID
createdDatestringBatch creation time
uploadedByUserIdintID of the user who uploaded the batch
uploadedByUserobjectInformation about the user who uploaded the batch (id, code, name, email,...)
numberOfRecordsintTotal number of records in the batch
namestringImport batch template name
statusobjectBatch status: {"value": int, "description": string}
documentsarrayList of documents belonging to the batch
errorsarrayList of error information during batch processing

Details of processes:​

The list contains process objects with the following properties for each element:

KeyTypeDescription
idstringProcess ID
createdDatestringProcess creation time
comIdintProcessing company/organization ID
isOrderbooleanWhether the processing follows an order
orderNointProcessing order in the workflow
pageSignintPage where the signature box is placed
positionstringCoordinates of the signature box position
displayTypeobjectSignature display type:
{ "value": int, "description": string }
accessPermissionobjectDocument 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
statusobjectProcess status:
{ "value": int, "description": string }
-1: Rejected
1: Waiting
2: Viewed
3: Signed
4: Approved
5: Filled
7: Coordinated
8: In Queue
processedByUserIdintID of the user performing the processing
documentIdstringRelated document ID

Details of histories:​

KeyTypeDescription
createdDatestringTime when the action was performed (ISO 8601 format)
requestTypeobjectRequest source: {"value": int, "description": string}
-1: Unspecified
0: Web
1: Api
3: Service
4: Mobile
ipAddressstringIP address from which the action was performed
userobjectInformation about the user who performed the action:
{
    "id": "User ID",
    "code": "User code",
    "name": "User name",
    "email": "User email",
    "comId": "Company ID",
    "username": "Username"
}
activityobjectAction 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