Skip to main content
Version: 2.3.0

Get list of document templates

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


Purpose​

The function retrieves information about a list of document templates that the user has created or document templates shared by other users.

  • Request URL: /api/document-templates
  • HTTP method: GET
  • Authorize: Bearer token
  • Parameter: Not required, but additional options can be added below to filter or search the list of document templates.
KeyTypeDescription
searchstringSearch information by document template name
pageintPage number (default is 1)
pagesizeintPage size (default is 10 records)

Sample request​

Query param:
page: 1
pageSize: 20
search: FILE MẪU IMPORT LÔ
Request: /api/document-templates?page=1&pageSize=10&search=FILE MẪU IMPORT LÔ

Sample response body​

{
"data": {
"items": [
{
"id": 1149,
"name": "FILE MẪU IMPORT LÔ",
"createdDate": "2022-11-22T14:18:25.3990136",
"fileName": "HĐ Dịch vụ Cấp nước Dochub.docx",
"createdByUser": {
"id": 2341,
"comId": 164,
"code": "phannhan",
"name": "Phan Nhan",
"phone": "091938XXXX",
"email": "example@email.com",
"username": "example@email.com",
},
"downloadUrl": "{HOST}/Api/Download?token=...",
"pdfDownloadUrl": "{HOST}/Api/Download?token=...",
"isDisabled": false,
"isLaborContractTemplate": 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 document templates and pagination information (see details below)

Details of data:​

KeyTypeDescription
itemsarrayList of document templates (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 template objects with the following properties for each element:

KeyTypeDescription
idintDocument template ID
namestringDocument template name
createdDatestringDocument template creation time (ISO 8601 format)
fileNamestringTemplate file name
createdByUserobjectDetailed information about the user who created the document template:
{
    "id": "Creator ID",
    "comId": "Company ID",
    "code": "Creator code",
    "name": "Creator name",
    "phone": "Creator phone number",
    "email": "Creator email",
    "username": "Creator username"
}
downloadUrlstringURL to download the original file
pdfDownloadUrlstringURL to download the file in PDF format
isDisabledbooleanTemplate disabled status (true: Disabled, false: Active)
isLaborContractTemplatebooleanWhether this is a labor contract template (true: Yes, false: No)