Skip to main content
Version: 2.3.0

Get a document template

Updated date: 23/06/2025
Updated by: VNPT eContract's team


Purpose

The function retrieves document template information using the template Id.

  • Request URL: /api/document-templates/{id}
  • HTTP method: GET
  • Authorize: Bearer token
  • Parameter:
KeyTypeDescription
idint[Required] Id of document template

Sample request

Id of document template: id = 1149
Request: /api/document-templates/1149

Sample response body

{
"data": {
"id": 1149,
"name": "Batch import sample template",
"createdDate": "2022-11-22T14:18:25.3990136",
"fillableFields": [
{
"key": "{{ngay}}",
"name": "ngay",
"description": "Ngày"
},
{
"key": "{{thang}}",
"name": "thang"
},
{
"key": "{{nam}}",
"name": "nam"
},
{
"key": "{{so_hd}}",
"name": "so_hd"
},
{
"key": "{{nld_hoten}}",
"name": "nld_hoten",
"description": "Họ và tên NLD"
},
{
"key": "{{nld_namsinh}}",
"name": "nld_namsinh"
},
{
"key": "{{nld_diachi}}",
"name": "nld_diachi"
},
{
"key": "{{nld_cccd}}",
"name": "nld_cccd"
},
{
"key": "{{muc_luong}}",
"name": "muc_luong"
}
],
"fileName": "dochub-template.docx",
"downloadUrl": "{HOST}/Api/Download?token=...",
"pdfDownloadUrl": "{HOST}/Api/Download?token=...",
"xlsxDownloadUrl": "{HOST}/Api/Download?token=..."
},
"success": true,
"code": 0,
"messages": []
}