Skip to main content
Version: 2.3.0

Get list of documents

Updated date: 18/08/2026
Updated by: VNPT eContract's team


Purpose​

Function to retrieve the document list of the user or documents shared by other users in the system.

  • Request URL: /api/documents
  • HTTP method: GET
  • Authorize: Bearer token
  • Parameter: Not required, but additional options can be added below to filter or search the list of documents.
KeyTypeDescription
statusintDocument status:
1: New document
2: Ready
3: In progress
4: Completed
5: Correcting
-4: Expired document
-3: Cancelled
-2: Deleted
-1: Rejected
contractStatusintContract status:
0: Not specified
1: Active
2: Nearly expired
-2: Not yet effective
-1: Expired
documentTemplateIdintId of document template
departmentIdintId of department
documentTypeIdintId of document type
recipientIdsArray[int]Array of recipient IDs
createdByUserIdintId of creator
batchImportIdintId batch import
createdFromstringCreate from date
createdTostringCreate to date
completedFromstringCompleted from date
completedTostringCompleted to date
customerCodestringCustomer code
waitToApprovebooleanWait to approve
waitToSignDigitalbooleanWait to digital sign
waitToSignDrawbooleanWait to sign draw
contractValueFromstringContract value from
contractValueTostringContract value to
searchstringSearch information by document code or document name
pageintPage number (default is 1)
pageSizeintPage size (default is 10 records)

Sample request​

Query param:
page: 1
pageSize:10
search: FA902
Request: /api/documents?page=1&pageSize=10&search=FA902

Sample response body​

{
"data": {
"items": [
{
"id": "fa07d61e-0fff-41a3-e618-08dad69d1b1b",
"createdDate": "2022-12-05T15:45:47.8532528",
"lastModifiedDate": "2022-12-05T15:46:07.5741114",
"no": "177667",
"subject": "Create document via API",
"hasVerified": false,
"hasSeal": false,
"requireVerifiedUserSigning": false,
"status": {
"value": 2,
"description": "Ready document"
},
"contractStatus": {
"value": 0,
"description": "Undefined"
},
"description": "Create sample document via API",
"department": {
"id": 33,
"name": "VNPT eContract Center",
"code": "DHB",
},
"createdByUserId": 1163,
"processRecipientCount": 2,
"waitingProcess": {
"id": "cfa4f1cd-7db3-477d-8de7-08dad69d1b3b",
"createdDate": "2022-12-05T15:45:47.8532366",
"comId": 164,
"isOrder": true,
"orderNo": 1,
"pageSign": 1,
"position": "28,672,208,762",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 1163,
"documentId": "fa07d61e-0fff-41a3-e618-08dad69d1b1b"
},
"processInOrder": true,
"isWaitToSignDraw": false,
"isWaitToSignDigital": false,
"isWaitToApprove": false,
"isWaitToFillData": false,
"isWaitToCoordinate": false,
"isWaitToESign": false,
"isWaitToEkyc": false,
"isFillable": false,
"type": {
"id": 46,
"code": "CKDS",
"name": "Sales discount",
"description": "Sales discount documents",
"documentCount": 1
},
"documentTemplate": {
"id": 1141,
"name": "Sales discount template",
"createdDate": "2022-11-18T16:07:18.1590328",
"fileName": "DocTemplate.docx",
"downloadUrl": "{HOST}/Api/Download?token=...",
"pdfDownloadUrl":"{HOST}/Api/Download?token...",
},
"batchImport": {
"id": 1232,
"createdDate": "2022-12-05T15:45:44.199619",
"uploadedByUserId": 1163,
"numberOfRecords": 2,
"name": "20221205.A5BO",
},
"processes": [
{
"id": "cfa4f1cd-7db3-477d-8de7-08dad69d1b3b",
"createdDate": "2022-12-05T15:45:47.8532366",
"comId": 164,
"isOrder": true,
"orderNo": 1,
"pageSign": 1,
"position": "28,672,208,762",
"displayType": {
"value": 0,
"description": "0"
},
"accessPermission": {
"value": 2,
"description": "Sign draw"
},
"status": {
"value": 1,
"description": "Waiting"
},
"processedByUserId": 1163,
"documentId": "fa07d61e-0fff-41a3-e618-08dad69d1b1b"
}
],
"histories": [
{
"createdDate": "2022-12-05T15:45:47.8532366",
"requestType": {
"value": 0,
"description": "Web"
},
"ipAddress": "::1",
"user": {
"id": 1163,
"code": "SYSADMIN",
"name": "System admin",
"email": "admin@dochub.vn",
"comId": 164,
"username": "admin@dochub.vn"
},
"activity": {
"value": 1,
"description": "Create document"
}
},
],
"attachments": [],
"relatedDocuments": [],
"messages": [],
"file": {
"name": "FA902.pdf",
"size": 186793
},
"downloadUrl": "{HOST}/Api/Download?token=...",
"isMarkStar": false,
"isLaborContractDocument": false
}
],
"totalCount": 1,
"pageCount": 1,
"page": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": 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 the list of documents and pagination information (see details below)

Details of data:​

KeyTypeDescription
itemsarrayList of documents (Array[object]) (see details below)
totalCountintTotal number of records found
pageCountintTotal number of pages
pageintCurrent page
pageSizeintNumber of records per page
hasNextPagebooleanWhether there is a next page (true: Yes, false: No)
hasPreviousPagebooleanWhether there is a previous page (true: Yes, false: No)

Details of items:​

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

KeyTypeDescription
idstringDocument ID (GUID format)
createdDatestringDocument creation time (ISO 8601 format)
lastModifiedDatestringLast modified time (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 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
}
batchImportobjectImport batch information (if any):
{
    "id": int, 
    "createdDate": string, 
    "uploadedByUserId": int, 
    "numberOfRecords": int, 
    "name": string
}
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
isLaborContractDocumentbooleanIndicates whether this is a labor contract document (true: Yes, false: No)

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