開發者中心

查詢信封模板詳情

GET /esignglobal/v1/envelopeTemplates/envelopeTemplateDetail

介面描述

查詢某個在頁面端預配置好的“信封模板”的詳盡屬性(包含檔案結構、參與人角色、所有預置的控件標識 Key )。

請求參數

參數名稱

類型

必填

說明

envelopeTemplateId

string

true

信封模板ID

queryComponents

boolean

false

是否需要查詢控件資訊,預設false

true-是

false-否

請求範例

 {
 	"envelopeTemplateId":"dc4be9641a3145bea97809018d7a9180",
 	"queryComponents":true
 }

回應參數

參數名稱

類型

說明

code

int

業務碼,0表示成功,非0表示異常。

message

string

業務資訊

請根據 code 來判斷錯誤情況,不應該依賴message 匹配,因為message 可能會調整。

data

object

業務數據

 

envelopeTemplateId

string

信封模板ID

 

envelopeTemplateName

string

流程模板名稱

 

envelopeTemplateStatus

int

流程模板可用狀態

1-啟用

0-停用

 

digitalSignature

boolean

開啟數字簽名

true-開啟

false-關閉

 

signFiles

array

文件資訊

 

 

documentId

string

文件ID

 

 

fileName

string

文件名稱

 

participants

array

參與方

 

 

participantId

string

參與方ID

 

 

participantSetMode

string

參與要求(參與人指定方式)

presetSigner-使用模板時指定(由使用模板的人自行指定)

dedicateSigner-固定成員(寫死到模板中不可更改)

sender-發起人

 

 

participantInfos

object

個人參與方

 

 

 

userEmail

string

簽署人郵箱

 

 

 

phoneNumber

object

電話號碼,預設為空

當需要進行簡訊通知時為必填參數,countryCode與number都需要傳入

 

 

 

 

countryCode

string

國家地區的國際碼,無需傳入“+”

 

 

 

 

number

string

無格式校驗,僅限制長度最大為13位

 

 

 

userName

string

個人姓名

 

 

 

deliveryMethod

string

通知方式

auto-傳入userEmail時發送郵件通知,傳入phoneNumber時發送簡訊通知

none-不發送訊息通知

email-發送郵件通知

sms-發送簡訊通知

WhatsApp-發送WhatsApp通知

 

 

 

customizeSettings

object

自訂配置

 

 

 

 

customizeMessage

string

專屬訊息

字元上限1000

 

 

 

 

notificationLanguage

string

通知語言,預設為英語

en-US 英語

zh-CN 簡體中文

zh-Hant 繁體中文

ja 日語

es-MX 西班牙語

pt-PT 葡萄牙語

th-TH 泰語

id-ID 印尼語

vi-VN 越南語

ms-MY 馬來語

fil-PH 菲律賓語

de-DE 德語

fr-FR 法語

ru-RU 俄語

it-IT 義大利語

ko-KR 韓語

 

 

signOrder

int

簽署順序

1-255 不同參與人可重複

 

 

willingnessAuthModes

string

簽署人可選意願方式,用英文逗號隔開

noAuth-不驗證

accessCode-使用簽署口令驗證

sms-SMS OTP 驗證

idVerification-身份證件驗證

emailAuth-郵箱OTP驗證

digitalId-電子身份驗證

whatsappAuth-whatsapp OTP驗證

 

 

 

accessCode

object

簽署口令設置,當authModes=accessCode時必填

 

 

 

 

accessCode

string

口令內容,不區分大小寫,可以包含字母數字,長度限制45

 

 

 

 

promptInfo

string

訪問口令提示信息,不可以包含訪問口令,長度限制30,當authModes=1時必填。

 

 

 

sms

object

SMS OTP校驗,當authModes=sms時必填

 

 

 

 

countryCode

string

國家地區的國際碼,無需傳入“+”

 

 

 

 

number

string

不做格式校驗,僅限制長度最大為13位

 

 

 

idVerification

object

身份證件驗證設置,當authModes=idVerification時必填

 

 

 

 

name

string

簽署人身份證件上的姓名全稱,最大長度100個字符

 

 

 

emailAuth

object

郵箱OTP校驗,當authModes=emailAuth時必填

 

 

 

 

authEmail

string

簽署人身份驗證郵箱地址

 

 

 

digitalId

array

電子身份驗證,當authModes=digitalId時必填

 

 

 

 

authApp

string

電子身份驗證使用的APP

singpass-使用Singpass進行身份認證

iamsmart-使用智方便進行認證

 

 

 

 

idNumber

string

簽署人待驗證的身份證件號碼

 

 

 

whatsappAuth

object

whatsapp OTP校驗,當authModes=whatsappAuth時必填

 

 

 

 

countryCode

string

國家地區的國際碼,無需傳入“+”

 

 

 

 

number

string

不做格式校驗,僅限制長度最大為13位

 

 

components

object

控件資訊

 

copiers

array

設定抄送方

 

 

copierId

string

參與方ID

 

 

editable

boolean

是否允許發起時修改

 

 

CCInfos

object

抄送方資訊

 

 

 

userEmail

string

郵箱

 

 

 

userName

string

個人姓名

 

 

 

customizeSettings

object

自定義配置

 

 

 

 

notificationSettings

object

通知類自定義配置

 

 

 

 

notificationLanguage

string

通知語言,預設為英語

en-US 英語

zh-CN 繁體中文

zh-Hant 繁體中文

ja 日語

ES-MX 西班牙語

 

attachments

array

附件資訊

 

 

editable

boolean

是否允許發起時修改

 

 

fileKey

string

附件filekey

 

 

fileName

string

附件名稱

 

 

downloadUrl

string

文件底稿PDF檔案的下載連結,有效期60分鐘。

components

array

控制項列表

 

documentId

string

控制項所屬檔案key

 

componentId

string

控件id

 

componentKey

string

控件key(在設定文件範本時由用戶填寫的控件標識)

 

componentName

string

控件名稱

 

componentType

string

控件類型

1, 文本

2, 數字

3, 日期

6, 普通簽署區

8, 多行文本

9, 複選

10, 單選

11, 圖片

14, 下拉選擇控件

15, 勾選框控件

20,圖章區

21,審批區

22,簽署日期

23,郵箱

100,人民幣

 

componentDefaultValue

string

控件預設值

 

componentPosition

object

控件位置

 

 

componentPositionX

float

控件位置橫座標

 

 

componentPositionY

float

控件位置縱座標

 

 

componentPageNum

int

控件所在頁碼

 

componentSize

object

控件尺寸

 

 

componentWidth

int

控件寬度(矩形的左右邊距距離,單位為px)

 

 

componentHeight

int

控件高度(矩形的上下邊距距離,單位為px)

 

componentTextFormat

object

控件字元樣式

 

 

font

int

填充字型,預設1,

1-宋體,2-新宋體,4-黑體,5-楷體

 

 

fontSize

float

填充字體大小,預設12-小四

42-初號

36-小初

26-一號

24-小一

22-二號

19-小二

16-三號

15-小三

14-四號

12-小四

10.5-五號

9-小五

 

 

textColor

string

字體顏色,預設#000000黑色

 

 

bold

boolean

是否加粗,預設false

true-是

false-否

 

 

italic

boolean

是否斜體,預設false

true-是

false-否

 

 

horizontalAlignment

string

水平對齊,預設1-左對齊

LEFT-左對齊

CENTER-居中對齊

RIGHT-右對齊

 

 

verticalAlignment

string

垂直對齊,預設1-頂對齊(適用於多行文字)

TOP-頂對齊

MIDDLE-居中對齊

BOTTOM-底對齊

 

 

textLineSpacing

float

行間距,預設1.0 最多支援一位小數,最大值為2.0(適用於多行文字)

 

required

boolean

是否必填

true-必填

false-非必填

 

componentMaxLength

string

控件可填充長度上限(多少個中文字元)

 

componentSpecialAttribute

object

控件特有屬性

 

 

numberFormat

string

數字格式(數字控件)

整數:0

保留一位小數:0.0

保留兩位小數:0.00

 

 

dateFormat

string

日期格式(日期控件)

 

 

imageType

string

圖片類型(圖片控件)

IDCard_widthwise 身份證 橫向 鎖比例

IDCard_longitudinal 身份證 縱向 鎖比例

other 其他 不鎖比例

 

 

options

array

選項(下拉選擇控件、單選控件、多選控件)

 

 

 

optionOrder

int

選項順序

 

 

 

optionContent

string

選項內容

 

 

 

selected

boolean

是否預設選中

 

 

 

optionPositionX

float

子元素在父控制項邊框中的座標X

 

 

 

optionPositionY

float

子元素在父控制項邊框中的座標Y

 

 

 

optionWidth

float

子元素寬度

 

 

 

optionHeight

float

子元素高度

 

signField

object

普通簽章區屬性

 

 

fieldStyle

int32

簽章區樣式

1-單頁簽章區

2-騎縫簽章區

 

 

sizeRule

int

印章規格

1-以實際印章規格蓋章

2-自訂規格(根據簽署區寬高適配)

 

 

movable

boolean

true-簽署時可以移動

false-簽署時不可以移動

 

stampField

object

圖章區屬性

 

 

fieldStyle

int

簽章區樣式

1-單頁簽章區

2-騎縫簽章區

 

 

sizeRule

int

印章規格

1-以實際印章規格蓋章

2-自訂規格(根據簽署區寬高適配)

 

 

movable

boolean

true-簽署時可以移動

false-簽署時不可以移動

 

signDateField

object

簽署日期屬性

 

 

dateFormat

string

日期格式:

yyyy年MM月dd日

yyyy-MM-dd

yyyy/MM/dd

yyyy-MM-dd HH:mm:ss

 

approvalField

object

審批區屬性

 

 

allowedOptions

array

允許簽署人審批的選項,適用於fieldType為approval。預設為["approve", "decline"]

approve-同意

decline-拒絕

響應示例

{
  "code": "0",
  "data": {
    "envelopeTemplateName": "test",
    "signFiles": [
      {
        "fileDownloadUrl": "https://******",
        "fileName": "***.pdf",
        "documentId": "$eac****-d6f8-4b6b-bafe-******$3328404894"
      }
    ],
    "attachments": [],
    "digitalSignature": false,
    "envelopeTemplateStatus": 1,
    "independentComponents": [],
    "envelopeCategoryId": null,
    "envelopeTemplateId": "dc4be9641a3145bea97809018d7a9180",
    "participants": [
      {
        "participantFlag": "",
        "idVerification": null,
        "components": [
          {
            "componentType": "10",
            "componentId": "556b60f7bd324428908b41f3bbec8c54",
            "componentMaxLength": null,
            "signField": null,
            "componentPosition": {
              "componentPositionY": 485.42538,
              "componentPositionX": 35.96627,
              "componentPageNum": "1"
            },
            "componentSpecialAttribute": {
              "options": [
                {
                  "optionContent": "***",
                  "optionHeight": 32.923893,
                  "optionOrder": 0,
                  "optionPositionY": 85.0,
                  "optionPositionX": 10.0,
                  "optionWidth": 124.0,
                  "selected": false
                },
                {
                  "optionContent": "选项二",
                  "optionHeight": 15.0,
                  "optionOrder": 1,
                  "optionPositionY": 60.0,
                  "optionPositionX": 10.0,
                  "optionWidth": 124.0,
                  "selected": false
                },
                {
                  "optionContent": "选项三",
                  "optionHeight": 15.0,
                  "optionOrder": 2,
                  "optionPositionY": 35.0,
                  "optionPositionX": 10.0,
                  "optionWidth": 124.0,
                  "selected": false
                },
                {
                  "optionContent": "选项四",
                  "optionHeight": 15.0,
                  "optionOrder": 3,
                  "optionPositionY": 10.0,
                  "optionPositionX": 10.0,
                  "optionWidth": 124.0,
                  "selected": false
                }
              ],
              "numberFormat": "{}",
              "dateFormat": null,
              "imageType": null
            },
            "componentDefaultValue": null,
            "componentSize": {
              "componentHeight": 128,
              "componentWidth": 144
            },
            "signDateField": null,
            "required": true,
            "stampField": null,
            "documentId": "d559142672c742c3b02c3b5c663aa146",
            "componentName": "单选1",
            "componentKey": null,
            "approvalField": null,
            "componentTextFormat": {
              "textLineSpacing": null,
              "horizontalAlignment": "LEFT",
              "fontSize": 12.0,
              "bold": false,
              "textColor": "#000",
              "italic": false,
              "verticalAlignment": "TOP",
              "font": 1
            }
          },
        ],
        "digitalId": null,
        "participantInfos": {
          "userEmail": "***",
          "phoneNumber": null,
          "userName": "****",
          "deliveryMethod": "email",
          "customizeSettings": {
            "customizeMessage": null,
            "notificationSettings": {
              "notificationLanguage": null
            }
          }
        },
        "willingnessAuthModes": "noAuth",
        "signOrder": 1,
        "participantId": "42750b92c7a***05134dd5342",
        "accessCode": null,
        "sms": null,
        "participantSetMode": "presetSigner",
        "emailAuth": null
      },
      {
        "participantFlag": "***",
        "idVerification": null,
        "components": [
          {
            "componentType": "20",
            "componentId": "7c401b43cdc94b61a7813aa58ac82bbf",
            "componentMaxLength": null,
            "signField": null,
            "componentPosition": {
              "componentPositionY": 327.15793,
              "componentPositionX": 109.17395,
              "componentPageNum": "2"
            },
            "componentSpecialAttribute": {
              "options": null,
              "numberFormat": "{}",
              "dateFormat": null,
              "imageType": null
            },
            "componentDefaultValue": null,
            "componentSize": {
              "componentHeight": 150,
              "componentWidth": 150
            },
            "signDateField": null,
            "required": true,
            "stampField": {
              "movable": false,
              "sizeRule": 1,
              "fieldStyle": 1
            },
            "documentId": "d559142672c742c3b02c3b5c663aa146",
            "componentName": "图章区",
            "componentKey": null,
            "approvalField": null,
            "componentTextFormat": {
              "textLineSpacing": null,
              "horizontalAlignment": "LEFT",
              "fontSize": 12.0,
              "bold": false,
              "textColor": "#000",
              "italic": false,
              "verticalAlignment": "TOP",
              "font": 1
            }
          }
        ],
        "digitalId": null,
        "participantInfos": {
          "userEmail": "***",
          "phoneNumber": null,
          "userName": "***",
          "deliveryMethod": "email",
          "customizeSettings": {
            "customizeMessage": null,
            "notificationSettings": {
              "notificationLanguage": null
            }
          }
        },
        "willingnessAuthModes": "noAuth",
        "signOrder": 1,
        "participantId": "b055dfce00c5******40cdabb23822ea4",
        "accessCode": null,
        "sms": null,
        "participantSetMode": "dedicateSigner",
        "emailAuth": null
      }
    ],
    "copiers": []
  },
  "message": "SUCCESS"
}