Get Template Details

GET /esignglobal/v1/templates/templateDetail

Interface Description

Get field information in the template.

Retrieve all field information configured in the template using TemplateId . Developers can create documents with these fields by calling the Generate Document By Template API.  

Request Parameters

Parameter

Type

Required

Description

templateId

string

true

Template ID

Request Example

GET https:// … …/esignglobal/v1/templates/templateDetail?templateId=d288b477-ed3c-4fe6-801c-80d8ec5fe9cf

Responses

Parameter

Type

Description

templateId

string

Template ID

templateName

string

Template Name

templateType

int

Template Type:

0-PDF

1-WORD

createTime

string

Time of template creation (in Unix timestamp format, unit: milliseconds)

updateTime

string

Time of template update (Unix timestamp format, unit: milliseconds)

templateStatus

int

Template Status:

0-Not Enabled

1-Enabled

fields

array

Field Information in Templates

 

fieldId

string

Field ID (Automatically generated by the eSignGlobal system when setting the template.)

 

fieldKey

string

Field Key (User-customized when setting the template.)

 

fieldName

string

Field Name

 

required

boolean

Required Field:

True-required

False-not required

 

fieldType

int

Type of Field:

1-Single line of text

2-Number

3-Date

8-Multiple lines of text

9-Multiple Choice

10-Single Choice

11-Image

14-Drop-down

15-Check box

 

fieldPosition

object

Field Location Information

(Only available in PDF templates.)

 

 

posX

float

X-axis coordinate

 

 

posY

float

Y-axis coordinate

 

 

posNo

int

The page number of the field.

 

 

movable

boolean

Allow position adjustment during signing, default:false

false-Signatories cannot adjust the position of their own signing fields.

true-Signatories can adjust the position of their own signing fields.

 

fieldSpecialAttributes

object

Field-specific properties

 

 

dateFormat

string

Date Format (applicable for Date)

 

 

imageType

string

Image Type (applicable for Image)

 

 

options

array

Options (applicable for Drop-down, Multiple Choice, Single Choice)

 

 

 

optionContent

string

Option Content

 

 

 

optionOrder

int

Option Order

 

 

 

selected

boolean

Whether the option is selected by default

 

 

numberFormat

string

Number Format (applicable for Number):

  • 0: Integer (no decimal places)
  • 0.0: One decimal place
  • 0.00: Two decimal places

 

 

tableContent 

array

Table Column Content (applicable for Dynamic Table), format:
[row{"column1":"value1","column2":"value2"}]

Supplementary Notes:

  1. row: Represents a row in the dynamic table. The number of rows is determined by the template configuration.
  2. Number of Rows: Indicates the total rows added to the dynamic table field.
  3. column1: Represents the key of the cell in the current row.
    value1: Represents the value of the cell in the current row. If no fixed value is set, it defaults to an empty string. Otherwise, it displays the preset fixed value.

For more information, please refer to the explanation of tableContent.

 

 

fieldMaxLength

string

Maximum Fillable Length (Unit: Chinese Characters)

[Note] 1 Chinese character represent 2 English characters.

 

 

fieldSize

object

Field Size

 

 

fieldWidth

float

Field width (Unit: px)

 

 

 

fieldHeight

float

Field Height (Unit: px)

Response Example

{
    "code": "0",
    "data ": {
        "createTime": 1693910774808,
        "fields": [
            {
                "fieldId": "7e4bbdb838f64a31b0a4bdea18d1613c",
                "fieldKey": "",
                "fieldName": "身份证号 ",
                "fieldPosition": null,
                "fieldSize": {
                    "fieldHeight": "",
                    "fieldWidth": ""
                },
                "fieldSpecialAttribute": {
                    "dateFormat": "yyyy/MM/dd ",
                    "fieldMaxLength": "",
                    "imageType": "",
                    "numberFormat": "",
                    "options": [

                    ],
                    "tableContent": [

                    ]
                },
                "fieldType": 3,
                "required": false
            }
        ],
        "templateId": "d288b477-ed3c-4fe6-801c-80d8ec5fe9cf",
        "templateName": "test123456 ",
        "templateStatus": 0,
        "updateTime": 1693911131351
    },
    "message": "成功 "
}

 

Interface Description
Request Parameters
Request Example
Responses
Response Example