查询模板详情
简要描述:查询模板详情,包括文件模板基本信息和输入项组件信息
接口地址:/v1/docTemplates/{templateId}
请求方式: GET
请求参数:
参数名 | 参数类型 | 必选 | 类型 | 说明 |
---|---|---|---|---|
templateId | path | 是 | string | 模板id |
请求示例
GET https://openapi.esign.cn/v1/docTemplates/{templateId}
响应参数
参数名 | 类型 | 说明 | |||
---|---|---|---|---|---|
templateId | string | 模板id | |||
templateName | string | 模板名称 | |||
downloadUrl | string | 模板文件下载地址 | |||
fileSize | long | 模板文件大小 | |||
createTime | long | 创建时间 | |||
updateTime | long | 更新时间 | |||
structComponents | array | 文件模板中的输入项组件列表 | |||
id | string | 输入项组件id,使用时可用id填充,为空时表示添加,不为空时表示修改 | |||
key | string | 模板下输入项组件唯一标识,使用模板时也可用根据key值填充 | |||
type | int | 输入项组件类型,1-文本,2-数字,3-日期,6-签约区 | |||
context | object | 输入项组件上下文信息,包含了名称,填充格式,样式以及坐标 | |||
label | string | 输入项组件显示名称 | |||
required | boolean | 是否必填,默认true | |||
limit | string | 输入项组件type=2,type=3时填充格式校验规则;数字格式如:#,#00.0# 日期格式如: yyyy-MM-dd | |||
style | object | 输入项组件样式 | |||
width | float | 输入项组件宽度 | |||
height | float | 输入项组件高度 | |||
font | int | 填充字体,默认1,1-宋体,2-新宋体,4-黑体,5-楷体 | |||
fontSize | float | 填充字体大小,默认12 | |||
textColor | string | 字体颜色,默认#000000黑色 | |||
pos | object | 输入项组件坐标 | |||
page | int | 页码 | |||
x | float | x轴坐标,左下角为原点 | |||
y | float | y轴坐标,左下角为原点 |
响应示例
{
"code": 0,
"message": "成功",
"data": {
"templateId": "78f86dfe01f64d0382a05fb3ff36a9be",
"fileSize": 324292,
"templateName": "个人借贷模板",
"templateType": 3,
"createTime": 1546508768000,
"updateTime": 1546508768000,
"structComponents": [
{
"id": "45dd9420690b460c9e5ed55b40d7d0f8",
"key":"key001",
"type": 1,
"context": {
"label": "身份证号码",
"limit": "yyyy-MM-dd",
"required": true,
"style": {
"font": 1,
"fontSize": 11,
"textColor": "#000000",
"width": 11.11,
"height": 11.11
},
"pos": {
"x": 11.11,
"y": 11.11,
"page": 1
}
}
}
]
}
}
错误码 | 错误信息 | 错误原因 |
---|---|---|