跳到主要内容

查询模板信息列表

1. 接口描述

接口请求域名: essbasic.tencentcloudapi.com 。

通过此接口(DescribeTemplates)查询该第三方平台子客企业在电子签拥有的有效模板,不包括第三方平台模板

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称必选类型描述
ActionString公共参数,本接口取值:DescribeTemplates。
VersionString公共参数,本接口取值:2021-05-26。
RegionString公共参数,本接口不需要传递此参数。
AgentAgent应用相关信息。 此接口Agent.ProxyOrganizationOpenId、Agent. ProxyOperator.OpenId、Agent.AppId 和 Agent.ProxyAppId 均必填。
TemplateIdString模板唯一标识,查询单个模板时使用
ContentTypeInteger查询内容:0-模板列表及详情(默认),1-仅模板列表
LimitInteger查询个数,默认20,最大100;在查询列表的时候有效
OffsetInteger查询偏移位置,默认0;在查询列表的时候有效
QueryAllComponentsBoolean是否返回所有组件信息。默认false,只返回发起方控件;true,返回所有签署方控件
TemplateNameString模糊搜索模板名称,最大长度200
OperatorUserInfo操作者的信息
WithPreviewUrlBoolean是否获取模板预览链接
WithPdfUrlBoolean是否获取模板的PDF文件链接- 第三方应用集成需要开启白名单时才能使用。
ChannelTemplateIdString模板ID

3. 输出参数

参数名称类型描述
TemplatesArray of TemplateInfo模板详情
TotalCountInteger查询总数
LimitInteger查询数量
OffsetInteger查询起始偏移
RequestIdString唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 查询有效模板列表

查询有效模板列表

输入示例

POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTemplates
<公共请求参数>

{
"Agent": {
"ProxyAppId": "d2b****b66f954d7cc",
"ProxyOrganizationOpenId": "yDxAyUyK****cb7u0jQn0Zh7f7",
"ProxyOperator": {
"OpenId": "732aaef****541b89c49e0cc"
},
"AppId": "ed68bc6***********0214e4e"
},
"TemplateId": "templated_test_id",
"ContentType": 1,
"Offset": 0,
"Limit": 2
}

输出示例

{
"Response": {
"Templates": [
{
"ChannelAutoSave": 0,
"PdfUrl": "test",
"Description": "test",
"Recipients": [
{
"RecipientType": "test",
"Description": "test",
"RoutingOrder": 0,
"SignType": 0,
"RecipientId": "test",
"IsPromoter": true,
"RequireValidation": true,
"RoleName": "test",
"RequireSign": true
}
],
"TemplateName": "test",
"CreatedOn": 1234567890,
"Creator": "test",
"ChannelTemplateName": "test",
"SignComponents": [
{
"ComponentValue": "test",
"FileIndex": 0,
"OffsetX": 0.0,
"OffsetY": 0.0,
"ComponentType": "test",
"ComponentPosX": 1241.15,
"ComponentPosY": 125.12,
"GenerateMode": "test",
"KeywordIndexes": [
0
],
"ComponentDateFontSize": 0,
"RelativeLocation": "test",
"ComponentHeight": 12.142,
"ComponentDescription": "test",
"ComponentRequired": true,
"ComponentId": "test",
"ComponentRecipientId": "test",
"KeywordPage": 0,
"ComponentWidth": 1.1,
"ComponentName": "test",
"ChannelComponentId": "test",
"ComponentExtra": "test",
"ComponentPage": 1,
"KeywordOrder": "test",
"DocumentId": "test"
}
],
"TemplateType": 0,
"IsPromoter": true,
"PreviewUrl": "test",
"Components": [
{
"ComponentValue": "test",
"FileIndex": 0,
"OffsetX": 0.0,
"OffsetY": 0.0,
"ComponentType": "test",
"ComponentPosX": 1241.15,
"ComponentPosY": 125.12,
"GenerateMode": "test",
"KeywordIndexes": [
0
],
"ComponentDateFontSize": 0,
"RelativeLocation": "test",
"ComponentHeight": 12.142,
"ComponentDescription": "test",
"ComponentRequired": true,
"ComponentId": "test",
"ComponentRecipientId": "test",
"KeywordPage": 0,
"ComponentWidth": 1.1,
"ComponentName": "test",
"ChannelComponentId": "test",
"ComponentExtra": "test",
"ComponentPage": 1,
"KeywordOrder": "test",
"DocumentId": "test"
}
],
"TemplateId": "test",
"TemplateVersion": "test",
"ChannelTemplateId": "test"
}
],
"TotalCount": 1,
"Limit": 1,
"RequestId": "test",
"Offset": 1
}
}

示例2 返回所有component

返回所有component

输入示例

POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTemplates
<公共请求参数>

{
"QueryAllComponents": "true",
"Agent": {
"ProxyOperator": {
"OpenId": "test1xxxxx_test1"
},
"AppId": "7f3497fxxx35e0984a9657b0ec",
"ProxyOrganizationOpenId": "test1_clarxxxnization1",
"ProxyOrganizationId": "yDxHwUyKxxxBNLMLjthsmk"
},
"TemplateId": "yDR0JUUgygxxxxjESIpKDSkE9"
}

输出示例

{
"Response": {
"Templates": [
{
"TemplateId": "test",
"TemplateName": "test",
"Description": "test",
"Components": [
{
"ComponentId": "test",
"ComponentType": "test",
"ComponentName": "test",
"ComponentRequired": true,
"ComponentRecipientId": "test",
"FileIndex": 0,
"GenerateMode": "test",
"ComponentWidth": 0,
"ComponentHeight": 0,
"ComponentPage": 0,
"ComponentPosX": 0,
"ComponentPosY": 0,
"ComponentExtra": "test",
"ComponentValue": "test",
"ComponentDateFontSize": 0,
"DocumentId": "test",
"ComponentDescription": "test",
"OffsetX": 0,
"OffsetY": 0,
"ChannelComponentId": "test",
"KeywordOrder": "test",
"KeywordPage": 0,
"RelativeLocation": "test",
"KeywordIndexes": [
0
]
}
],
"Recipients": [
{
"RecipientId": "test",
"RecipientType": "test",
"Description": "test",
"RoleName": "test",
"RequireValidation": true,
"RequireSign": true,
"SignType": 0,
"RoutingOrder": 0,
"IsPromoter": true
}
],
"SignComponents": [
{
"ComponentId": "test",
"ComponentType": "test",
"ComponentName": "test",
"ComponentRequired": true,
"ComponentRecipientId": "test",
"FileIndex": 0,
"GenerateMode": "test",
"ComponentWidth": 0,
"ComponentHeight": 0,
"ComponentPage": 0,
"ComponentPosX": 0,
"ComponentPosY": 0,
"ComponentExtra": "test",
"ComponentValue": "test",
"ComponentDateFontSize": 0,
"DocumentId": "test",
"ComponentDescription": "test",
"OffsetX": 0,
"OffsetY": 0,
"ChannelComponentId": "test",
"KeywordOrder": "test",
"KeywordPage": 0,
"RelativeLocation": "test",
"KeywordIndexes": [
0
]
}
],
"TemplateType": 0,
"IsPromoter": true,
"Creator": "test",
"CreatedOn": 0,
"PreviewUrl": "test",
"PdfUrl": "test",
"ChannelTemplateId": "test",
"ChannelTemplateName": "test",
"ChannelAutoSave": 0,
"TemplateVersion": "test"
}
],
"TotalCount": 0,
"Limit": 1,
"Offset": 1,
"RequestId": "test"
}
}

示例3 模糊搜索模板名

模糊搜索模板名

输入示例

POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTemplates
<公共请求参数>

{
"TemplateName": "顺序签署",
"QueryAllComponents": "true",
"Agent": {
"ProxyOperator": {
"OpenId": "test1xxxa_test1"
},
"AppId": "7f3497f015xxxxe0984a9657b0ec",
"ProxyOrganizationOpenId": "test1_claraxxxanization1",
"ProxyOrganizationId": "yDxHwUyKQxxx4zjEBNLMLjthsmk"
},
"Limit": "2"
}

输出示例

{
"Response": {
"Templates": [
{
"TemplateId": "test",
"TemplateName": "test",
"Description": "test",
"Components": [
{
"ComponentId": "test",
"ComponentType": "test",
"ComponentName": "test",
"ComponentRequired": true,
"ComponentRecipientId": "test",
"FileIndex": 0,
"GenerateMode": "test",
"ComponentWidth": 0,
"ComponentHeight": 0,
"ComponentPage": 0,
"ComponentPosX": 0,
"ComponentPosY": 0,
"ComponentExtra": "test",
"ComponentValue": "test",
"ComponentDateFontSize": 0,
"DocumentId": "test",
"ComponentDescription": "test",
"OffsetX": 0,
"OffsetY": 0,
"ChannelComponentId": "test",
"KeywordOrder": "test",
"KeywordPage": 0,
"RelativeLocation": "test",
"KeywordIndexes": [
0
]
}
],
"Recipients": [
{
"RecipientId": "test",
"RecipientType": "test",
"Description": "test",
"RoleName": "test",
"RequireValidation": true,
"RequireSign": true,
"SignType": 0,
"RoutingOrder": 0,
"IsPromoter": true
}
],
"SignComponents": [
{
"ComponentId": "test",
"ComponentType": "test",
"ComponentName": "test",
"ComponentRequired": true,
"ComponentRecipientId": "test",
"FileIndex": 0,
"GenerateMode": "test",
"ComponentWidth": 0,
"ComponentHeight": 0,
"ComponentPage": 0,
"ComponentPosX": 0,
"ComponentPosY": 0,
"ComponentExtra": "test",
"ComponentValue": "test",
"ComponentDateFontSize": 0,
"DocumentId": "test",
"ComponentDescription": "test",
"OffsetX": 0,
"OffsetY": 0,
"ChannelComponentId": "test",
"KeywordOrder": "test",
"KeywordPage": 0,
"RelativeLocation": "test",
"KeywordIndexes": [
0
]
}
],
"TemplateType": 0,
"IsPromoter": true,
"Creator": "test",
"CreatedOn": 0,
"PreviewUrl": "test",
"PdfUrl": "test",
"ChannelTemplateId": "test",
"ChannelTemplateName": "test",
"ChannelAutoSave": 0,
"TemplateVersion": "test"
}
],
"TotalCount": 0,
"Limit": 1,
"Offset": 1,
"RequestId": "test"
}
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码描述
FailedOperation操作失败。
InternalError内部错误。
InternalError.Api其他API错误。
InternalError.Db数据库错误。
InternalError.DbRead数据库读取失败。
InternalError.DependsApi依赖的其他api出错。
InternalError.System系统错误。
InvalidParameter参数错误。
InvalidParameter.Application应用号不存在。
InvalidParameter.ContentType查询内容参数有误。
InvalidParameter.DataNotFound数据不存在。
InvalidParameter.ParamError参数错误。
InvalidParameterValue参数取值错误。
MissingParameter缺少参数错误。
OperationDenied操作被拒绝。
OperationDenied.NoIdentityVerify未通过个人实名。
OperationDenied.UserNotInOrganization用户不归属于当前企业,无法操作,请检查后重试。
ResourceNotFound资源不存在。
ResourceNotFound.Application应用号不存在。
ResourceNotFound.Resource资源不存在。
ResourceNotFound.Template模板不存在。
ResourceNotFound.User用户信息不存在。
UnauthorizedOperation未授权操作。
UnauthorizedOperation.NoPermissionFeature请升级到对应版本后即可使用该接口。