用PDF文件创建签署流程
1. 接口描述
接口请求域名: essbasic.tencentcloudapi.com 。
接口(ChannelCreateFlowByFiles)用PDF文件创建签署流程。
适用场景:适用非制式的合同文件签署,开发者有每个签署流程的PDF,可以通过该接口传入完整的PDF文件及流程信息生成待签署的合同流程。
注:
- 此接口静默签(企业自动签)能力为白名单功能,使用前请联系对接的客户经理沟通。
- 此接口需要依赖文件上传接口生成pdf资源编号(FileIds)进行使用。整体的逻辑如下图
可以作为发起方和签署方的角色列表
场景编号 | 发起方 | 签署方 | 补充 |
---|---|---|---|
场景一 | 子企业A的员工 | 子企业A的员工 | 子企业是通过CreateConsoleLoginUrl生成子客登录链接注册的企业 |
场景二 | 子企业A的员工 | 子企业B(不指定经办人走领取逻辑) | 领取的逻辑可以参考文档动态签署方 |
场景三 | 子企业A的员工 | 子企业B的员工 | - |
场景四 | 子企业A的员工 | 个人 | 就是自然人,不是企业员工 |
场景五 | 子企业A的员工 | SaaS平台企业员工 | SaaS平台企业是通过https://qian.tencent.cn/console/company-register链接注册的企业 |
注:
1. 发起合同时候, 作为发起方的第三方子企业A员工的企业和员工必须经过实名, 而作为签署方的第三方子企业A员工/个人/自然人/SaaS平台企业员工/第三方子企业B员工企业中的企业和个人/员工可以未实名
2. 不同类型的签署方传参不同, 可以参考开发者中心的FlowApproverInfo结构体说明
3. 合同发起后就会扣减合同的额度, 只有撤销没有参与方签署过或只有自动签署签署过的合同,才会返还合同额度。(过期,拒签,签署完成,解除完成等状态不会返还额度)
4. 静默(自动)签署不支持合同签署方存在填写功能
1. 【上传文件代码】编写示例
1. 【用PDF文件创建签署流程】编写示例
默认接口请求频率限制:20次/秒。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:ChannelCreateFlowByFiles。 |
Version | 是 | String | 公共参数,本接口取值:2021-05-26。 |
Region | 否 | String | 公共参数,此参数为可选参数。 |
Agent | 否 | Agent | 关于渠道应用的相关信息,包括渠道应用标识、第三方平台子客企业标识及第三方平台子客企业中的员工标识等内容,您可以参阅开发者中心所提供的 Agent 结构体以获取详细定义。 此接口下面信息必填。
|
FlowName | 否 | String | 合同流程的名称(可自定义此名称),长度不能超过200,只能由中文、字母、数字和下划线组成。 示例值:张三的入职合同 |
FlowDescription | 否 | String | 合同流程描述信息(可自定义此描述),最大长度1000个字符。 示例值:张三2023年入职市场部的合同 |
FlowApprovers.N | 否 | Array of FlowApproverInfo | 合同流程的参与方列表, 最多可支持50个参与方,可在列表中指定企业B端签署方和个人C端签署方的联系和认证方式等信息,不同类型的签署方传参方式可以参考文档 签署方入参指引。 如果合同流程是有序签署,Approvers列表中参与人的顺序就是默认的签署顺序, 请确保列表中参与人的顺序符合实际签署顺序。 |
FileIds.N | 否 | Array of String | 本合同流程需包含的PDF文件资源编号列表,通过UploadFiles接口获取PDF文件资源编号。 注: 目前,此接口仅支持单个文件发起。 示例值:["yDRSRUUgygj6rqi6UuO4zjEBDACwAjgT"] |
Components.N | 否 | Array of Component | 模板或者合同中的填写控件列表,列表中可支持下列多种填写控件,控件的详细定义参考开发者中心的Component结构体
|
Deadline | 否 | Integer | 合同流程的签署截止时间,格式为Unix标准时间戳(秒),如果未设置签署截止时间,则默认为合同流程创建后的365天时截止。 如果在签署截止时间前未完成签署,则合同状态会变为已过期,导致合同作废。 示例值:1691574041 |
Unordered | 否 | Boolean | 合同流程的签署顺序类型:
注: 有序签署时以传入FlowApprovers数组的顺序作为签署顺序 示例值:false |
FlowType | 否 | String | 合同流程的类别分类(可自定义名称,如销售合同/入职合同等),最大长度为255个字符,仅限中文、字母、数字和下划线组成。 示例值:入职合同 |
CustomShowMap | 否 | String | 您可以自定义腾讯电子签小程序合同列表页展示的合同内容模板,模板中支持以下变量:
其中,N表示签署方的编号,从1开始,不能超过签署人的数量。 例如,如果是腾讯公司张三发给李四名称为“租房合同”的合同,您可以将此字段设置为: 合同名称:{合同名称};发起方: {发起方企业}({发起方姓名});签署方:{签署方1姓名} ,则小程序中列表页展示此合同为以下样子合同名称:租房合同 发起方:腾讯公司(张三) 签署方:李四 示例值:合同名称:{合同名称} {发起方企业} {发起方姓名};国家:中国;发起方:{发起方企业};签署方1: {签署方1企业};签署 |
CustomerData | 否 | String | 调用方自定义的个性化字段(可自定义此名称),并以base64方式编码,支持的最大数据大小为 1000长度。 在合同状态变更的回调信息等场景中,该字段的信息将原封不动地透传给贵方。回调的相关说明可参考开发者中心的回调通知模块。 示例值:eyJpZCI6ImNvbWVmIiwibmFtZSI6IuWRseWRseWPqyJ9 |
NeedSignReview | 否 | Boolean | 发起方企业的签署人进行签署操作前,是否需要企业内部走审批流程,取值如下:
企业可以通过ChannelCreateFlowSignReview审批接口通知腾讯电子签平台企业内部审批结果
注: 此功能可用于与企业内部的审批流程进行关联,支持手动、静默签署合同 |
ApproverVerifyType | 否 | String | 签署人校验方式 VerifyCheck: 人脸识别(默认) MobileCheck:手机号验证,用户手机号和参与方手机号(ApproverMobile)相同即可查看合同内容(当手写签名方式为OCR_ESIGN时,该校验方式无效,因为这种签名方式依赖实名认证) 参数说明:可选人脸识别或手机号验证两种方式,若选择后者,未实名个人签署方在签署合同时,无需经过实名认证和意愿确认两次人脸识别,该能力仅适用于个人签署方。 |
SignBeanTag | 否 | Integer | 签署方签署控件(印章/签名等)的生成方式:
注: 发起后添加控件功能不支持添加签批控件 示例值:0 |
CcInfos.N | 否 | Array of CcInfo | 合同流程的抄送人列表,最多可支持50个抄送人,抄送人可查看合同内容及签署进度,但无需参与合同签署。 注 1. 抄送人名单中可以包括自然人以及本企业的员工(本企业员工必须已经完成认证并加入企业)。 2. 请确保抄送人列表中的成员不与任何签署人重复。 |
CcNotifyType | 否 | Integer | 可以设置以下时间节点来给抄送人发送短信通知来查看合同内容:
|
AutoSignScene | 否 | String | 个人自动签名的使用场景包括以下, 个人自动签署(即ApproverType设置成个人自动签署时)业务此值必传:
注: 个人自动签名场景是白名单功能,使用前请与对接的客户经理联系沟通。 示例值:E_PRESCRIPTION_AUTO_SIGN |
FlowDisplayType | 否 | Integer | 在短信通知、填写、签署流程中,若标题、按钮、合同详情等地方存在“合同”字样时,可根据此配置指定文案,可选文案如下:
示例值:1 |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
FlowId | String | 合同流程ID,为32位字符串。 建议开发者妥善保存此流程ID,以便于顺利进行后续操作。 点击查看FlowId在控制台上的位置 注意:此字段可能返回 null,表示取不到有效值。 示例值:yDwFmUUckpstqfvzUE1h3jo1f3cqjkGm |
Approvers | Array of ApproverItem | 签署方信息,如角色ID、角色名称等 注意:此字段可能返回 null,表示取不到有效值。 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 使用文件创建B2B2C的合同 - 同时使用关键字和绝对定位
- 包含个人/自然人签署 张三
- 包含第三方子企业李四的示例企业员工李四
- 包含平台企业王五示例企业的员工王五 (NotChannelOrganization设置为true)
- 王五的签署区是通过关键字甲方签章位置生成印章区域
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
},
"ProxyAppId": ""
},
"FlowName": "购买50吨西红柿的合同(15:53:35)",
"FlowApprovers": [
{
"Name": "张三",
"Mobile": "18888888888",
"ApproverType": "PERSON",
"SignComponents": [
{
"ComponentType": "SIGN_SIGNATURE",
"FileIndex": 0,
"ComponentWidth": 112,
"ComponentHeight": 40,
"ComponentPage": 1,
"ComponentPosX": 146.15625,
"ComponentPosY": 472.78125,
"ComponentValue": ""
}
]
},
{
"Name": "李四",
"Mobile": "17333333333",
"OrganizationName": "李四的示例企业",
"OpenId": "lisi",
"OrganizationOpenId": "org_lisi",
"ApproverType": "ORGANIZATION",
"SignComponents": [
{
"ComponentType": "SIGN_SEAL",
"FileIndex": 0,
"ComponentWidth": 112,
"ComponentHeight": 40,
"ComponentPage": 1,
"ComponentPosX": 146.15625,
"ComponentPosY": 472.78125,
"ComponentValue": ""
}
]
},
{
"Name": "王五",
"Mobile": "13333333333",
"OrganizationName": "王五示例企业",
"NotChannelOrganization": true,
"ApproverType": "ORGANIZATION",
"SignComponents": [
{
"ComponentType": "SIGN_SEAL",
"FileIndex": 0,
"ComponentWidth": 112,
"ComponentHeight": 40,
"ComponentPage": 1,
"ComponentPosX": 146.15625,
"ComponentPosY": 472.78125,
"ComponentValue": ""
},
{
"ComponentId": "甲方签章位置",
"ComponentType": "SIGN_SEAL",
"GenerateMode": "KEYWORD",
"ComponentWidth": 112,
"ComponentHeight": 40
}
]
}
],
"FileIds": [
"yDSLoUUckpob08ffUxVoXTnu6fPhgjmx"
],
"Unordered": true
}
输出示例
{
"Response": {
"FlowId": "yDSLoUUckpob829aUxvfkKfCKWvrOGyb",
"Approvers": [
{
"SignId": "yDSLoUUckpob829wUxvfkKfCOwpAOD9N",
"RecipientId": "yDSLoUUckpob829yUxvfkKfssEItYFKp",
"ApproverRoleName": ""
},
{
"SignId": "yDSLoUUckpob829tUxvfkKfuX06FFWEw",
"RecipientId": "yDSLoUUckpob829vUxvfkKf83OAYth3A",
"ApproverRoleName": ""
},
{
"SignId": "yDSLoUUckpob829kUxvfkKfuiREpXebq",
"RecipientId": "yDSLoUUckpob829oUxvfkKfwRMwMrwrM",
"ApproverRoleName": ""
}
],
"RequestId": "6545213e-4554-4839-a69d-6ef75344c749"
}
}
示例2 使用文件创建单自然人签署的合同
发起只有个人/自然人签署 张三来签署的合同
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "110101200610116558"
},
"ProxyAppId": ""
},
"FlowName": "西瓜采购协议(16:18:47)",
"FlowApprovers": [
{
"Name": "张三",
"Mobile": "18888888888",
"ApproverType": "PERSON",
"SignComponents": [
{
"ComponentType": "SIGN_SIGNATURE",
"FileIndex": 0,
"ComponentWidth": 112,
"ComponentHeight": 40,
"ComponentPage": 1,
"ComponentPosX": 146.15625,
"ComponentPosY": 472.78125,
"ComponentValue": ""
}
]
}
],
"FileIds": [
"yDSLoUUckpob089cUxVoXTn9T1cRb8W7"
],
"Unordered": true
}
输出示例
{
"Response": {
"FlowId": "yDSLoUUckpobjhymUyKMWsdBQKTeh0lS",
"Approvers": [
{
"SignId": "yDSLoUUckpobjhy9UyKMWsdSJ1PF1kag",
"RecipientId": "yDSLoUUckpobjhyfUyKMWsdxqy3zpae2",
"ApproverRoleName": ""
}
],
"RequestId": "c98e62a4-8577-4d78-87d6-16519fcd17e7"
}
}
示例3 创建一个B2C合同,签署人和发起方都有填写控件
1.通过PDF文件发起合同 2.指定B端签署方为企业【典子谦示例企业】,经办人OpenId 是 n9527 3.指定C端签署方为个人【张三】 4.发起方填写控件为通过外层 参数 Components 传递,需要在发起时通过 ComponentValue 指定值 5.签署方填写控件通过Approvers.Components传递,在发起时不能通过 ComponentValue 指定值,需要签署人在合同成功发起后自己填写 6.更多签署方填写控件示例 可参考文档 指定签署方填写控件
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"ProxyOperator": {
"OpenId": "n9527"
},
"ProxyOrganizationOpenId": "org_dianziqian",
"AppId": "yDCVsUUckpw2nwxkUxRytJLxpswCHW2m"
},
"FlowName": "B2C-签署方有填写控件",
"Components": [
{
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 205,
"ComponentPosY": 90,
"ComponentValue": "(落霞与孤鹜齐飞,秋水共长天一色)这是发起方填写的文本",
"ComponentType": "TEXT",
"ComponentWidth": 339
}
],
"FlowApprovers": [
{
"OrganizationName": "典子谦示例企业",
"OrganizationOpenId": "org_dianziqian",
"OpenId": "n9527",
"ApproverType": "ORGANIZATION",
"SignComponents": [
{
"ComponentHeight": 119,
"ComponentPage": 7,
"ComponentPosX": 143.59375,
"ComponentPosY": 169.0625,
"ComponentType": "SIGN_SEAL",
"ComponentWidth": 119
}
],
"Components": [
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"BUSI-CREDIT-CODE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 205,
"ComponentPosY": 114,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 339
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"BUSI-CREDIT-CODE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 234,
"ComponentPosY": 142,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 302
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"BUSI-LEGAL-NAME\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 191.09,
"ComponentPosY": 172,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 335
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"LOCATION\"}",
"ComponentHeight": 21,
"ComponentPage": 1,
"ComponentPosX": 155,
"ComponentPosY": 205,
"ComponentRequired": false,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 366
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-NAME\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 107,
"ComponentPosY": 236,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 339
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-MOBILE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 121,
"ComponentPosY": 265,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 327
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 35.09,
"ComponentPosY": 293,
"ComponentRequired": false,
"ComponentType": "DISTRICT",
"ComponentWidth": 306
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\"}",
"ComponentHeight": 44,
"ComponentPage": 1,
"ComponentPosX": 44,
"ComponentPosY": 652,
"ComponentRequired": false,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 505
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"DIGIT\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 191,
"ComponentPosY": 716,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 35
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"ManualFill\":true}",
"ComponentHeight": 20,
"ComponentPage": 2,
"ComponentPosX": 145,
"ComponentPosY": 68,
"ComponentRequired": false,
"ComponentType": "DATE",
"ComponentWidth": 116
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"DIGIT\"}",
"ComponentHeight": 20,
"ComponentPage": 2,
"ComponentPosX": 194.09,
"ComponentPosY": 92.09000000000003,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 326
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"ManualFill\":true}",
"ComponentHeight": 20,
"ComponentPage": 2,
"ComponentPosX": 130.09375,
"ComponentPosY": 555.09375,
"ComponentRequired": false,
"ComponentType": "DATE",
"ComponentWidth": 116
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"LOCATION\"}",
"ComponentHeight": 27,
"ComponentPage": 2,
"ComponentPosX": 134.09,
"ComponentPosY": 628.09,
"ComponentRequired": false,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 398
},
{
"ComponentExtra": "{\"Values\":[\"选项1\",\"当面交货\",\"送货上门\",\"寄放到公证处\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}",
"ComponentHeight": 20,
"ComponentPage": 2,
"ComponentPosX": 141.09,
"ComponentPosY": 656.09,
"ComponentRequired": false,
"ComponentType": "SELECTOR",
"ComponentWidth": 216
},
{
"ComponentExtra": "{}",
"ComponentHeight": 16,
"ComponentPage": 7,
"ComponentPosX": 83.09375,
"ComponentPosY": 96.5625,
"ComponentType": "CHECK_BOX",
"ComponentWidth": 16
}
]
},
{
"Name": "张三",
"Mobile": "18700000000",
"ApproverType": "PERSON",
"SignComponents": [
{
"ComponentHeight": 43,
"ComponentPage": 7,
"ComponentPosX": 433.59375,
"ComponentPosY": 196.0625,
"ComponentType": "SIGN_SIGNATURE",
"ComponentWidth": 119
}
],
"Components": [
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-NAME\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 199,
"ComponentPosY": 323,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 309
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-IDCARD\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 124.09,
"ComponentPosY": 352,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 327
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"LOCATION\"}",
"ComponentHeight": 24,
"ComponentPage": 1,
"ComponentPosX": 155,
"ComponentPosY": 386,
"ComponentRequired": false,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 390
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 114.09,
"ComponentPosY": 416,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 299
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-MOBILE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 115.09,
"ComponentPosY": 445,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 367
},
{
"ComponentExtra": "{\"SubType\":\"EDUCATION\"}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_30",
"ComponentName": "学历",
"ComponentPage": 1,
"ComponentPosX": 8.09375,
"ComponentPosY": 473,
"ComponentRequired": false,
"ComponentType": "SELECTOR",
"ComponentWidth": 84
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"EMAIL\"}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_28",
"ComponentName": "邮箱",
"ComponentPage": 1,
"ComponentPosX": 117.09375,
"ComponentPosY": 474,
"ComponentRequired": false,
"ComponentType": "TEXT",
"ComponentWidth": 292
},
{
"ComponentExtra": "{\"SubType\":\"GENDER\"}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_29",
"ComponentName": "性别",
"ComponentPage": 1,
"ComponentPosX": 424.09375,
"ComponentPosY": 472,
"ComponentRequired": false,
"ComponentType": "SELECTOR",
"ComponentWidth": 84
}
]
}
],
"FileIds": [
"yDCWqUUckpvebypnU4f5ELvs3AdsTJp7"
]
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCVsUUckpwri4vqU9JHnkyzivgo9ZYK",
"SignId": "yDCVsUUckpwri2vjU0JHnkcdalTQjZVo"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCVsUUckpwri6v8U9JHnkE9wfDGvwZL",
"SignId": "yDCVsUUckpwri3vhU9JHnkSxBnzV59Vo"
}
],
"FlowId": "yDCVsUUckpwri2vsU9JHnkuZc5pjfOMs",
"RequestId": "s1709794795446614457"
}
}
示例4 创建含有动态签署人流程,签署方不指定具体的签署人
创建一个B2C流程,两方签署方不指定具体的签署人
注:
1.签署人相关信息为空,如:姓名、手机号码等
2.FillType需传值为1,表示为动态签署人(不确定具体的签署人),需后续进行补充。
3.需保留对应的角色编号,即RecipientId,后续补充具体的签署人时需指定对应的RecipientId
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"ProxyOperator": {
"OpenId": "zhangsan"
},
"ProxyOrganizationOpenId": "ess_open_organization_1",
"AppId": "yDwFoUUckps**********yhWGhIR2RkhOjw2"
},
"Unordered": true,
"FlowName": "发起动态签署人合同示例",
"FlowApprovers": [
{
"Name": "",
"Mobile": "",
"ApproverType": "PERSON",
"ApproverRoleName": "个人签署方",
"ApproverOption": {
"FillType": 1
},
"SignComponents": [
{
"ComponentPosY": 260,
"ComponentWidth": 100,
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE",
"ComponentPage": 1,
"ComponentPosX": 260,
"ComponentHeight": 100
}
]
},
{
"ApproverType": "ORGANIZATION",
"ApproverRoleName": "企业签署方",
"ApproverOption": {
"FillType": 1
},
"SignComponents": [
{
"ComponentPosY": 260,
"ComponentWidth": 100,
"FileIndex": 0,
"ComponentType": "SIGN_SEAL",
"ComponentPage": 1,
"ComponentPosX": 260,
"ComponentHeight": 100
}
]
}
],
"FileIds": [
"yDwFhUUckpsxas68UuZf2EREDkOykmDp"
]
}
输出示例
{
"Response": {
"FlowId": "2fb48c3945****65aaedf6",
"Approvers": [
{
"SignId": "yDw7hUUckpkm57vuUxeFIKavjSsJtcaN",
"RecipientId": "yDw7hUUckpkm57v4UxeFIKaS5kF2iWh8",
"ApproverRoleName": "个人签署方"
},
{
"SignId": "yDw7hUUckpkm57v7UxeFIKa8kitjb9XB",
"RecipientId": "yDw7hUUckpkm57vxUxeFIKaCJX9krcZN",
"ApproverRoleName": "企业签署方"
}
],
"RequestId": "s1234345677xxxx"
}
}
示例5 处方单场景
1.处方单场景的"典子谦"医生需要自动签(典子谦参与人的ApproverType设置成PERSON_AUTO_SIGN, 并且AutoSignScene设置成E_PRESCRIPTION_AUTO_SIGN表明是处方单场景) 2.处方单的患者张三需要手工签署(张三参与人的ApproverType设置成PERSON) 3.双方签署方的签署控件都是通过关键字生成(典子谦签署区GenerateMode设置成KEYWORD并且ComponentId设置成关键字"处方医生", 张三签署区GenerateMode设置成KEYWORD并且ComponentId设置成关键字"患者签名" ) 4.不给合同签署方发送短信 (NotifyType设置成NONE)
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"FlowName": "文件发起-处方单",
"FlowApprovers": [
{
"ApproverType": "PERSON_AUTO_SIGN",
"Name": "典子谦",
"Mobile": "13200000000",
"NotifyType": "NONE",
"SignComponents": [
{
"GenerateMode": "KEYWORD",
"ComponentId": "处方医生",
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE",
"ComponentWidth": 100,
"ComponentHeight": 100,
"OffsetX": 100.5,
"OffsetY": 200.5
},
{
"GenerateMode": "KEYWORD",
"ComponentId": "DATE",
"FileIndex": 0,
"ComponentType": "SIGN_DATE",
"ComponentWidth": 100,
"ComponentHeight": 100,
"OffsetX": 100.5,
"OffsetY": 200.5
}
]
},
{
"ApproverType": "PERSON",
"Name": "张三",
"Mobile": "18888888888",
"NotifyType": "NONE",
"SignComponents": [
{
"GenerateMode": "KEYWORD",
"ComponentId": "患者签名",
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE",
"ComponentWidth": 100,
"ComponentHeight": 100,
"OffsetX": 100.5,
"OffsetY": 200.5
},
{
"GenerateMode": "KEYWORD",
"ComponentId": "DATE1",
"FileIndex": 0,
"ComponentType": "SIGN_DATE",
"ComponentWidth": 100,
"ComponentHeight": 100,
"OffsetX": 100.5,
"OffsetY": 200.5
}
]
}
],
"AutoSignScene": "E_PRESCRIPTION_AUTO_SIGN",
"FileIds": [
"yDRSRUUgygj6qnwfUuO4zjEwc193c2hH"
],
"Unordered": true
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiixbUyngyQvxNVFfGhPt",
"SignId": "yDCm3UUckpuhiixaUyngyQvCEn8PpCcq"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiixyUyngyQvEiHySXVJ0",
"SignId": "yDCm3UUckpuhiixwUyngyQvCtQdTNFcF"
}
],
"FlowId": "yDCm3UUckpuhiixuUyngyQvBQysQq7t7",
"RequestId": "s1726221157105242252"
}
}
示例6 创建一份签署方拖拽签署区域的合同
1.签署方包括本方子客企业(需要传递 OrganzationOpenId,和 OpenId)、他方SaaS企业(需要传递 NotChannelOrganization = true)和个人(Approvers中有三个ApproverInfo元素)。 2.所有签署方企业都不包允许有签署控件。 3.设置当前流程为可拖拽(SignBeanTag)。 4.本合同为无序签署(Unordered传递为true)。
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"Unordered": true,
"FlowName": "签署时拖拽签署控件合同",
"SignBeanTag": 1,
"FlowType": "示例合同",
"FlowApprovers": [
{
"ApproverType": "ORGANIZATION",
"OrganizationOpenId": "org_dianziqian",
"OrganizationName": "典子谦示例企业",
"Name": "典子谦",
"Mobile": "13200000000",
"OpenId": "n9527",
"NotifyType": "NONE",
"PreReadTime": 10
},
{
"ApproverType": "ORGANIZATION",
"NotChannelOrganization": true,
"OrganizationName": "张三示例企业",
"Name": "张三",
"Mobile": "18888888888",
"NotifyType": "NONE",
"PreReadTime": 10
},
{
"ApproverType": "PERSON",
"NotifyType": "NONE",
"Name": "李四",
"Mobile": "15100000000",
"PreReadTime": 10
}
],
"FileIds": [
"yDR4yUUgyg1qqlj7UuO4zjES3G9Shoxk"
]
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiivxUyngyQvCtRL9F1iX",
"SignId": "yDCm3UUckpuhiiv7UyngyQvweoRnofAx"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiiv4UyngyQvw4w7nChfk",
"SignId": "yDCm3UUckpuhiivuUyngyQvCexPDjr49"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiivbUyngyQvxPc40bmBS",
"SignId": "yDCm3UUckpuhiivaUyngyQvTjdVbIqsr"
}
],
"FlowId": "yDCm3UUckpuhiiv9UyngyQvE2eRmVW3M",
"RequestId": "s1726285140721667651"
}
}
示例7 通过文件发起B2C合同-控件使用绝对定位方式
1.通过PDF文件发起合同 2.指定B端签署方为企业【典子谦示例企业】,经办人为【典子谦】 3.通过绝对对位方式指定【典子谦示例企业】的签署控件为印章控件,控件位置为该文件的第1页,横坐标160,纵坐标260的位置,控件高宽为119x119(公章大小) 4.指定C端签署方为个人【李四】,联系电话为【15100000000】 5.通过绝对对位方式指定【李四】的签署控件为手写签名控件,控件位置为该文件的第1页,横坐标60,纵坐标260的位置,控件高宽为119x43(推荐的手写签名大小) 6.通过绝对定位方式在合同文件的第1页,横坐标360,纵坐标360的位置放置一个单行文本控件,并写入内容【我是一个单行文本】 7.完成合同发起
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"FlowName": "通过文件发起合同",
"FlowDescription": "通过文件发起合同",
"Unordered": false,
"FlowType": "示例合同",
"Deadline": 1830268800,
"FlowApprovers": [
{
"ApproverType": "ORGANIZATION",
"OrganizationOpenId": "org_dianziqian",
"OrganizationName": "典子谦示例企业",
"OpenId": "n9527",
"Name": "典子谦",
"Mobile": "13200000000",
"SignComponents": [
{
"ComponentPage": 1,
"ComponentPosX": 160,
"ComponentPosY": 260,
"ComponentHeight": 119,
"ComponentWidth": 119,
"FileIndex": 0,
"ComponentType": "SIGN_SEAL",
"ComponentValue": ""
}
]
},
{
"ApproverType": "PERSON",
"NotifyType": "NONE",
"Name": "李四",
"Mobile": "15100000000",
"PreReadTime": 10,
"SignComponents": [
{
"ComponentPage": 1,
"ComponentPosX": 60,
"ComponentPosY": 260,
"ComponentWidth": 119,
"ComponentHeight": 43,
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE"
}
]
}
],
"FileIds": [
"yDwqYUUckp39gkfxUu14JJPxaTyM1ltq"
],
"Components": [
{
"ComponentPage": 1,
"ComponentPosX": 360,
"ComponentPosY": 360,
"ComponentWidth": 100,
"ComponentHeight": 100,
"ComponentType": "TEXT",
"ComponentValue": "我是一个单行文本",
"FileIndex": 0
}
]
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiiwrUyngyQvEAAG8aSuj",
"SignId": "yDCm3UUckpuhiiwlUyngyQvEVt11WQd6"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiiw5UyngyQvvbypsA2N5",
"SignId": "yDCm3UUckpuhiiw0UyngyQvxIu5Rvq2L"
}
],
"FlowId": "yDCm3UUckpuhiiw2UyngyQv8OPSX8qYD",
"RequestId": "s1726284341125380532"
}
}
示例8 通过文件发起B2C合同-控件使用关键字定位方式
1.通过PDF文件发起合同 2.指定B端签署方为企业【典子谦示例企业】,经办人为【典子谦】 3.通过绝对对位方式指定【典子谦示例企业】的签署控件为印章控件,控件类型为【KEYWORD】关键字类型,并设置关键字为【签名】,关键字查找顺序为【Positive-正序】关键字位置模式为【Middle-居中】,控件高宽为119x119(公章大小) 4.指定C端签署方为个人【李四】,联系电话为【15100000000】 5.通过绝对对位方式指定【李四】的签署控件为手写签名控件,控件位置为该文件的第1页,横坐标60,纵坐标260的位置,控件高宽为119x43(推荐的手写签名大小) 6.通过绝对定位方式在合同文件的第1页,横坐标360,纵坐标360的位置放置一个单行文本控件,并写入内容【我是一个单行文本】 7.完成合同发起
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"FlowName": "通过文件发起合同-关键字定位",
"FlowDescription": "通过文件发起合同",
"Unordered": false,
"FlowType": "示例合同",
"Deadline": 1830268800,
"FlowApprovers": [
{
"ApproverType": "ORGANIZATION",
"OrganizationOpenId": "org_dianziqian",
"OrganizationName": "典子谦示例企业",
"OpenId": "n9527",
"Name": "典子谦",
"Mobile": "13200000000",
"SignComponents": [
{
"ComponentPage": 1,
"ComponentPosX": 0,
"ComponentPosY": 0,
"ComponentWidth": 119,
"ComponentHeight": 119,
"FileIndex": 0,
"ComponentType": "SIGN_SEAL",
"GenerateMode": "KEYWORD",
"ComponentId": "签名",
"KeywordOrder": "Positive",
"RelativeLocation": "Middle"
}
]
},
{
"ApproverType": "PERSON",
"NotifyType": "NONE",
"Name": "李四",
"Mobile": "15100000000",
"PreReadTime": 10,
"SignComponents": [
{
"ComponentPage": 1,
"ComponentPosX": 60,
"ComponentPosY": 260,
"ComponentWidth": 119,
"ComponentHeight": 43,
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE"
}
]
}
],
"FileIds": [
"yDwqYUUckp39gkfxUu14JJPxaTyM1ltq"
],
"Components": [
{
"ComponentPage": 1,
"ComponentPosX": 360,
"ComponentPosY": 360,
"ComponentWidth": 100,
"ComponentHeight": 100,
"ComponentType": "TEXT",
"ComponentValue": "我是一个单行文本",
"FileIndex": 0
}
]
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiivjUyngyQvwaZ4Hg4MJ",
"SignId": "yDCm3UUckpuhiiv8UyngyQvy5NE74xeK"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiivhUyngyQvuSNWvTWW3",
"SignId": "yDCm3UUckpuhiiv2UyngyQvwKnI8ePPG"
}
],
"FlowId": "yDCm3UUckpuhiivqUyngyQvB0ZL8Vhvu",
"RequestId": "s1726285565082734481"
}
}
示例9 创建只有个人C端签署, 签署人需要人脸校验认证的合同流程
1.只有一个个人C端参与人 (Approvers只有一个ApproverInfo元素) 2.签署区的指定通过绝对定位表达 (SignComponents中Component元素指定具体ComponentHeight/ComponentWidth/ComponentPosX/ComponentPosY/ComponentPage的方式) 3.C端参与人只有一个签名签署控件(SignComponents只有一个Component元素, 且这个元素的ComponentType是SIGN_SIGNATURE) 4.C端签署人需要人脸校验来签署合同 (ApproverSignTypes属性设置成[1]表示只能通过人脸识别校验来签署合同)
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "110101200610116558"
}
},
"FlowName": "西瓜采购协议(16:18:47)",
"FlowApprovers": [
{
"Name": "张三",
"Mobile": "18888888888",
"ApproverType": "PERSON",
"ApproverSignTypes": [
1
],
"SignComponents": [
{
"ComponentType": "SIGN_SIGNATURE",
"FileIndex": 0,
"ComponentWidth": 112,
"ComponentHeight": 40,
"ComponentPage": 1,
"ComponentPosX": 146.15625,
"ComponentPosY": 472.78125,
"ComponentValue": ""
}
]
}
],
"FileIds": [
"yDSLoUUckpob089cUxVoXTn9T1cRb8W7"
],
"Unordered": true,
"Components": [
{
"ComponentPage": 1,
"ComponentPosX": 360,
"ComponentPosY": 360,
"ComponentWidth": 100,
"ComponentHeight": 100,
"ComponentType": "TEXT",
"ComponentValue": "我是一个单行文本",
"FileIndex": 0
}
]
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhii1vUyngyQvwQVL5QVup",
"SignId": "yDCm3UUckpuhii1tUyngyQvupb93iMFu"
}
],
"FlowId": "yDCm3UUckpuhii1aUyngyQvu5Rn80ewb",
"RequestId": "s1726295273067158522"
}
}
示例10 文件发起B2C合同,发起方设置合同水印(自定义水印内容)
1.通过PDF文件发起合同 2.指定B端签署方为企业【典子谦示例企业】,经办人为【典子谦】 3.指定C端签署方为个人【张三】 4.水印控件通过外层 参数 Components 传递,ComponentType 设置为 WATERMARK,设置"ComponentExtra": "{\"Font\":\"黑体\",\"FontSize\":20,\"Opacity\":0.1,\"Density\":2,\"SubType\":\"CUSTOM_WATERMARK\"}",ComponentValue 为自定义水印的内容
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"FlowName": "文件发起B2C-自定义水印内容",
"Components": [
{
"ComponentType": "WATERMARK",
"ComponentName": "合同水印",
"ComponentExtra": "{\"Font\":\"黑体\",\"FontSize\":20,\"Opacity\":0.1,\"Density\":2,\"SubType\":\"CUSTOM_WATERMARK\"}",
"ComponentValue": "自定义水印内容",
"ComponentPage": 0,
"ComponentWidth": 0,
"ComponentHeight": 0,
"ComponentPosX": 0,
"ComponentPosY": 0,
"FileIndex": 0
}
],
"FlowApprovers": [
{
"ApproverType": "ORGANIZATION",
"OrganizationOpenId": "org_dianziqian",
"OrganizationName": "典子谦示例企业",
"OpenId": "n9527",
"Name": "典子谦",
"Mobile": "13200000000",
"NotifyType": "NONE",
"SignComponents": [
{
"ComponentHeight": 119,
"ComponentPage": 7,
"ComponentPosX": 143.59375,
"ComponentPosY": 169.0625,
"ComponentType": "SIGN_SEAL",
"ComponentWidth": 119,
"FileIndex": 0
}
],
"Components": [
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"BUSI-CREDIT-CODE\",\"FontColor\":\"0,82,217\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 205,
"ComponentPosY": 114,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 339,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"BUSI-CREDIT-CODE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 234,
"ComponentPosY": 142,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 302,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"BUSI-LEGAL-NAME\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 191.09,
"ComponentPosY": 172,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 335,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"LOCATION\"}",
"ComponentHeight": 21,
"ComponentPage": 1,
"ComponentPosX": 155,
"ComponentPosY": 205,
"ComponentRequired": true,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 366,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-NAME\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 107,
"ComponentPosY": 236,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 339,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-MOBILE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 121,
"ComponentPosY": 265,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 327,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 35.09,
"ComponentPosY": 293,
"ComponentRequired": true,
"ComponentType": "DISTRICT",
"ComponentWidth": 306,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\"}",
"ComponentHeight": 44,
"ComponentPage": 1,
"ComponentPosX": 44,
"ComponentPosY": 652,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 505,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"ManualFill\":true}",
"ComponentHeight": 20,
"ComponentPage": 2,
"ComponentPosX": 145,
"ComponentPosY": 68,
"ComponentRequired": true,
"ComponentType": "DATE",
"ComponentWidth": 116,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"ManualFill\":true}",
"ComponentHeight": 20,
"ComponentPage": 2,
"ComponentPosX": 130.09375,
"ComponentPosY": 555.09375,
"ComponentType": "DATE",
"ComponentWidth": 116,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"LOCATION\"}",
"ComponentHeight": 27,
"ComponentPage": 2,
"ComponentPosX": 134.09,
"ComponentPosY": 628.09,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 398,
"FileIndex": 0
},
{
"ComponentExtra": "{}",
"ComponentHeight": 16,
"ComponentPage": 7,
"ComponentPosX": 83.09375,
"ComponentPosY": 96.5625,
"ComponentType": "CHECK_BOX",
"ComponentWidth": 16,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FillMethod\":0,\"NotMakeImageCenter\":true}",
"ComponentHeight": 119,
"ComponentPage": 7,
"ComponentPosX": 13,
"ComponentPosY": 394,
"ComponentType": "FILL_IMAGE",
"ComponentWidth": 119,
"FileIndex": 0
},
{
"ComponentExtra": "{\"LimitCount\":3,\"AttachmentType\":\"IMG\"}",
"ComponentHeight": 42,
"ComponentPage": 7,
"ComponentPosX": 12,
"ComponentPosY": 537,
"ComponentRequired": true,
"ComponentType": "ATTACHMENT",
"ComponentWidth": 240,
"FileIndex": 0
}
]
},
{
"ApproverType": "PERSON",
"Name": "张三",
"Mobile": "18888888888",
"NotifyType": "NONE",
"SignComponents": [
{
"ComponentHeight": 43,
"ComponentPage": 7,
"ComponentPosX": 433.59375,
"ComponentPosY": 196.0625,
"ComponentType": "SIGN_SIGNATURE",
"ComponentWidth": 119,
"FileIndex": 0
}
],
"Components": [
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-NAME\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 199,
"ComponentPosY": 323,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 309,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"LOCATION\"}",
"ComponentHeight": 24,
"ComponentPage": 1,
"ComponentPosX": 155,
"ComponentPosY": 386,
"ComponentRequired": true,
"ComponentType": "MULTI_LINE_TEXT",
"ComponentWidth": 390,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 114.09,
"ComponentPosY": 416,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 299,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"RecipientInfoType\":\"PERSONAL-MOBILE\"}",
"ComponentHeight": 20,
"ComponentPage": 1,
"ComponentPosX": 115.09,
"ComponentPosY": 445,
"ComponentRequired": true,
"ComponentType": "TEXT",
"ComponentWidth": 367,
"FileIndex": 0
},
{
"ComponentExtra": "{\"SubType\":\"EDUCATION\"}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_30",
"ComponentName": "学历",
"ComponentPage": 1,
"ComponentPosX": 8.09375,
"ComponentPosY": 473,
"ComponentRequired": true,
"ComponentType": "SELECTOR",
"ComponentWidth": 84,
"FileIndex": 0
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"SubType\":\"EMAIL\"}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_28",
"ComponentName": "邮箱",
"ComponentPage": 1,
"ComponentPosX": 117.09375,
"ComponentPosY": 474,
"ComponentType": "TEXT",
"ComponentWidth": 292,
"FileIndex": 0
},
{
"ComponentExtra": "{\"SubType\":\"GENDER\"}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_29",
"ComponentName": "性别",
"ComponentPage": 1,
"ComponentPosX": 424.09375,
"ComponentPosY": 472,
"ComponentRequired": true,
"ComponentType": "SELECTOR",
"ComponentWidth": 84,
"FileIndex": 0
}
]
}
],
"FileIds": [
"yDCWqUUckpve5id3U4f5EL77tlNh6zTZ"
]
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiir7UyngyQv8jrtNLw6f",
"SignId": "yDCm3UUckpuhiir4UyngyQv1cGEVXL3w"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiiruUyngyQvdLX3DRJK7",
"SignId": "yDCm3UUckpuhiirbUyngyQvpaOBqrvlD"
}
],
"FlowId": "yDCm3UUckpuhiirxUyngyQv1srq0CaC8",
"RequestId": "s1726295754261345096"
}
}
示例11 文件发起 签署方含有签批控件
1.通过PDF文件发起合同 2.指定B端签署方为企业【典子谦示例企业】,经办人为【典子谦】 3.指定C端签署方为个人【张三】 4.B 端签署人 有两个签署控件, 分别是签名控件和签批控件(SIGN_VIRTUAL_COMBINATION),其中签批控件包含四个子控件, 在 Component 中的 "ComponentExtra": "{\"Children\":[\"ComponentId_29\",\"ComponentId_27\",\"ComponentId_28\",\"ComponentId_30\"]}" 体现 , 包括 审批意见(SIGN_SELECTOR),个人签名(SIGN_SIGNATURE),签署日期(SIGN_DATE),批注附言(SIGN_MULTI_LINE_TEXT) 5.C 端签署人 有一个签批控件(SIGN_VIRTUAL_COMBINATION),其中签批控件包含三个子控件, 在 Component 中的 "ComponentExtra": "{\"Children\":[\"ComponentId_19\",\"ComponentId_17\",\"ComponentId_18\"]}" 体现 , 包括 审批意见(SIGN_SELECTOR),个人签名(SIGN_SIGNATURE),签署日期(SIGN_DATE)
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"FlowName": "文件发起-签批",
"FlowApprovers": [
{
"ApproverType": "ORGANIZATION",
"OrganizationOpenId": "org_dianziqian",
"OpenId": "n9527",
"Name": "典子谦",
"Mobile": "13200000000",
"OrganizationName": "典子谦示例企业",
"SignComponents": [
{
"ComponentId": "ComponentId_1",
"ComponentPosY": 260,
"ComponentWidth": 100,
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE",
"ComponentPage": 1,
"ComponentPosX": 160,
"ComponentHeight": 100
},
{
"ComponentId": "ComponentId_2",
"ComponentPosY": 360,
"ComponentWidth": 100,
"FileIndex": 0,
"ComponentType": "SIGN_DATE",
"ComponentPage": 1,
"ComponentPosX": 160,
"ComponentHeight": 50
},
{
"ComponentExtra": "{\"Children\":[\"ComponentId_29\",\"ComponentId_27\",\"ComponentId_28\",\"ComponentId_30\"]}",
"ComponentHeight": 211,
"ComponentId": "ComponentId_26",
"ComponentName": "签批1",
"ComponentPage": 1,
"ComponentPosX": 180,
"ComponentPosY": 478,
"ComponentType": "SIGN_VIRTUAL_COMBINATION",
"ComponentWidth": 210,
"ComponentRequired": false
},
{
"ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_29",
"ComponentName": "审批意见",
"ComponentPage": 1,
"ComponentPosX": 180,
"ComponentPosY": 567,
"ComponentRequired": true,
"ComponentType": "SIGN_SELECTOR",
"ComponentWidth": 210
},
{
"ComponentExtra": "{\"Date\":true,\"isAfterCut\":true}",
"ComponentHeight": 43,
"ComponentId": "ComponentId_27",
"ComponentName": "个人签名/印章",
"ComponentPage": 1,
"ComponentPosX": 185,
"ComponentPosY": 478,
"ComponentRequired": true,
"ComponentType": "SIGN_SIGNATURE",
"ComponentWidth": 119
},
{
"ComponentExtra": "{\"Format\":\"yyyy年m月d日\",\"Gaps\":\"2,2\",\"FontSize\":12,\"FontAlign\":\"Center\",\"Font\":\"黑体\",\"isAfterCut\":true}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_28",
"ComponentName": "签署日期",
"ComponentPage": 1,
"ComponentPosX": 185,
"ComponentPosY": 541,
"ComponentRequired": true,
"ComponentType": "SIGN_DATE",
"ComponentWidth": 119
},
{
"ComponentExtra": "{\"FontSize\":12,\"FontAlign\":\"Left\",\"VerticalAlign\":\"Top\",\"Font\":\"黑体\"}",
"ComponentHeight": 54,
"ComponentId": "ComponentId_30",
"ComponentName": "批注附言",
"ComponentPage": 1,
"ComponentPosX": 180,
"ComponentPosY": 635,
"ComponentRequired": true,
"ComponentType": "SIGN_MULTI_LINE_TEXT",
"ComponentWidth": 210
}
]
},
{
"ApproverType": "PERSON",
"Name": "张三",
"Mobile": "18888888888",
"SignComponents": [
{
"ComponentPosY": 260,
"ComponentWidth": 100,
"FileIndex": 0,
"ComponentType": "SIGN_SIGNATURE",
"ComponentPage": 1,
"ComponentPosX": 160,
"ComponentHeight": 100
},
{
"ComponentExtra": "{\"Children\":[\"ComponentId_19\",\"ComponentId_17\",\"ComponentId_18\"]}",
"ComponentHeight": 211,
"ComponentId": "ComponentId_16",
"ComponentName": "签批1",
"ComponentPage": 1,
"ComponentPosX": 280,
"ComponentPosY": 478,
"ComponentType": "SIGN_VIRTUAL_COMBINATION",
"ComponentWidth": 210
},
{
"ComponentExtra": "{\"Values\":[\"审批通过\",\"审批不通过\"],\"FontSize\":12,\"FontAlign\":\"Left\",\"Font\":\"黑体\",\"MultiSelect\":false}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_19",
"ComponentName": "审批意见",
"ComponentPage": 1,
"ComponentPosX": 280,
"ComponentPosY": 567,
"ComponentRequired": true,
"ComponentType": "SIGN_SELECTOR",
"ComponentWidth": 210
},
{
"ComponentExtra": "{\"Format\":\"yyyy年m月d日\",\"Gaps\":\"2,2\",\"FontSize\":12,\"FontAlign\":\"Center\",\"Font\":\"黑体\",\"isAfterCut\":true}",
"ComponentHeight": 20,
"ComponentId": "ComponentId_18",
"ComponentName": "签署日期",
"ComponentPage": 1,
"ComponentPosX": 285,
"ComponentPosY": 541,
"ComponentRequired": true,
"ComponentType": "SIGN_DATE",
"ComponentWidth": 119
},
{
"ComponentExtra": "{\"Date\":true,\"isAfterCut\":true}",
"ComponentHeight": 43,
"ComponentId": "ComponentId_17",
"ComponentName": "个人签名/印章",
"ComponentPage": 1,
"ComponentPosX": 285,
"ComponentPosY": 478,
"ComponentRequired": true,
"ComponentType": "SIGN_SIGNATURE",
"ComponentWidth": 119
}
]
}
],
"FileIds": [
"yDCWqUUckpve5id3U4f5EL77tlNh6zTZ"
],
"Unordered": true
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiiwrUyngyQvEAAG8aSuj",
"SignId": "yDCm3UUckpuhiiwlUyngyQvEVt11WQd6"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCm3UUckpuhiiw5UyngyQvvbypsA2N5",
"SignId": "yDCm3UUckpuhiiw0UyngyQvxIu5Rvq2L"
}
],
"FlowId": "yDCm3UUckpuhiiw2UyngyQv8OPSX8qYD",
"RequestId": "s1726284341125380532"
}
}
示例12 文件发起 使用关键字定位 签署方含有签批控件
注意: 关键字定位的签批控件,子控件的位置,大小是固定的,不能自定义。 1.通过PDF文件发起合同 2.使用的是关键字定位 3.指定B端签署方为企业【典子谦示例企业】,经办人为【典子谦】 4.指定C端签署方为个人【张三】 5.B 端签署人 有两个签署控件, 分别是签名控件和签批控件(SIGN_VIRTUAL_COMBINATION),其中签批控件包含四个子控件, 在 Component 中的 "ComponentExtra": "{\"ChildrenTypes\":[\"SIGN_SIGNATURE\",\"SIGN_DATE\",\"SIGN_SELECTOR\",\"SIGN_MULTI_LINE_TEXT\"]}" 体现 , 包括 审批意见(SIGN_SELECTOR),个人签名(SIGN_SIGNATURE),签署日期(SIGN_DATE),批注附言(SIGN_MULTI_LINE_TEXT), 但是关键字跟绝对定位的区别在于 关键字方式只用传递SIGN_VIRTUAL_COMBINATION 一个签署控件即可 6.C 端签署人 有一个签批控件(SIGN_VIRTUAL_COMBINATION),其中签批控件包含三个子控件, 在 Component 中的 "ComponentExtra": "{\"ChildrenTypes\":[\"SIGN_SIGNATURE\",\"SIGN_DATE\",\"SIGN_SELECTOR\",\"SIGN_MULTI_LINE_TEXT\"]}" 体现 , 包括 审批意见(SIGN_SELECTOR),个人签名(SIGN_SIGNATURE),签署日期(SIGN_DATE), 但是关键字跟绝对定位的区别在于 关键字方式只用传递SIGN_VIRTUAL_COMBINATION 一个签署控件即可
输入示例
POST / HTTP/1.1
Host: essbasic.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ChannelCreateFlowByFiles
<公共请求参数>
{
"Agent": {
"AppId": "yDwhxUUckp3gl8j5UuFX33LSNozpRsbi",
"ProxyOrganizationOpenId": "org_dianziqian",
"ProxyOperator": {
"OpenId": "n9527"
}
},
"FlowName": "文件发起-签批",
"FlowApprovers": [
{
"ApproverType": "ORGANIZATION",
"OrganizationOpenId": "org_dianziqian",
"OpenId": "n9527",
"Name": "典子谦",
"Mobile": "13200000000",
"OrganizationName": "典子谦示例企业",
"SignComponents": [
{
"FileIndex": 0,
"GenerateMode": "KEYWORD",
"OffsetX": 0,
"OffsetY": 0,
"RelativeLocation": "Right",
"ComponentId": "Test1",
"ComponentExtra": "{\"ChildrenTypes\":[\"SIGN_SIGNATURE\",\"SIGN_DATE\",\"SIGN_SELECTOR\",\"SIGN_MULTI_LINE_TEXT\"]}",
"ComponentHeight": 234,
"ComponentName": "签批1",
"ComponentPage": 1,
"ComponentType": "SIGN_VIRTUAL_COMBINATION",
"ComponentWidth": 210,
"ComponentRequired": false
}
]
},
{
"ApproverType": "PERSON",
"Name": "张三",
"Mobile": "18888888888",
"SignComponents": [
{
"FileIndex": 0,
"GenerateMode": "KEYWORD",
"OffsetX": 0,
"OffsetY": 0,
"RelativeLocation": "Right",
"ComponentId": "Test2",
"ComponentExtra": "{\"ChildrenTypes\":[\"SIGN_SIGNATURE\",\"SIGN_DATE\",\"SIGN_SELECTOR\",\"SIGN_MULTI_LINE_TEXT\"]}",
"ComponentHeight": 234,
"ComponentName": "签批1",
"ComponentPage": 1,
"ComponentType": "SIGN_VIRTUAL_COMBINATION",
"ComponentWidth": 210,
"ComponentRequired": false
}
]
}
],
"FileIds": [
"yDCWqUUckpve5id3U4f5EL77tlNh6zTZ"
],
"Unordered": true
}
输出示例
{
"Response": {
"Approvers": [
{
"ApproverRoleName": "",
"RecipientId": "yDCdoUUckp7ltep9Uyq2ikIypsCCIqXS",
"SignId": "yDCdoUUckp7ltepxUyq2ikIE79iVjD2I"
},
{
"ApproverRoleName": "",
"RecipientId": "yDCdoUUckp7ltep7Uyq2ikIuzVkVXNut",
"SignId": "yDCdoUUckp7ltep4Uyq2ikI1baBbI9zJ"
}
],
"FlowId": "yDCdoUUckp7ltepfUyq2ikI8VC2s92zT",
"RequestId": "s1732015258075060878"
}
}
5. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
FailedOperation | 操作失败。 |
FailedOperation.AgeNotAchieveNormalLegal | 签署人未达到合法年龄。 |
InternalError | 内部错误。 |
InternalError.Db | 数据库错误。 |
InternalError.DbConnection | 数据库连接出错。 |
InternalError.Decryption | 解密错误。 |
InternalError.DependsDb | 数据库异常。 |
InternalError.Encryption | 加密错误。 |
InternalError.GenerateId | 生成唯一ID错误。 |
InternalError.Pdf | Pdf合成错误。 |
InternalError.System | 系统错误。 |
InternalError.ThirdParty | 第三方错误。 |
InvalidParameter | 参数错误。 |
InvalidParameter.Application | 应用号不存在。 |
InvalidParameter.ApproverType | 参数错误,不合法的签署人类型,请修改后重试。 |
InvalidParameter.ApproverVerifyType | ApproverVerifyType参数值非法 |
InvalidParameter.BizApproverAlreadyExists | 重复添加签署人。 |
InvalidParameter.CardType | 证件类型错误。 |
InvalidParameter.ComponentValue | 参数错误,控件内容无效。 |
InvalidParameter.CustomShowMap | 参数错误,无效的自定义页卡模板,仅支持{合同名称}{发起方姓名}{发起方企业}{签署方N姓名}{签署方N企业},请修改后重试。 |
InvalidParameter.CustomerData | 参数错误,UserData长度非法,请修改后重试。 |
InvalidParameter.DataNotFound | 数据不存在。 |
InvalidParameter.FlowApproverInfos | 参数错误,不合法的备选签署人数量,请检查后重试。 |
InvalidParameter.FlowApprovers | 参数错误,参与者数量不能为空且不能超过数量限制,请修改后重试。 |
InvalidParameter.FlowCallbackUrl | 参数错误,不合法的签署流程回调链接,请修改后重试。 |
InvalidParameter.FlowDeadLine | 参数错误,不合法的签署流程截止日期,请修改后重试。 |
InvalidParameter.FlowDescription | 参数错误,不合法的签署流程描述,请修改后重试。 |
InvalidParameter.FlowFileIds | 参数错误,目前仅支持单个文件发起,请修改后重试。 |
InvalidParameter.FlowName | 参数错误,不合法的签署流程名称,请修改后重试。 |
InvalidParameter.FlowType | 参数错误,不合法的FlowType,请修改后重试。 |
InvalidParameter.Mobile | 手机号码不正确。 |
InvalidParameter.Name | 姓名不符合要求。 |
InvalidParameter.NonsupportMobile | 不支持的手机号。 |
InvalidParameter.OrganizationName | 企业名称不合法。 |
InvalidParameter.ParamError | 参数错误。 |
InvalidParameter.SignComponentType | 参数错误,不合法的签署控件类型,请修改后重试。 |
InvalidParameter.SignComponents | 类型不支持。 |
InvalidParameter.Unordered | 参数错误,不合法的签署顺序,请检查后重试。 |
InvalidParameter.UnsupportedComponentType | 参数错误,不支持的控件类型,请检查后重试。 |
InvalidParameterValue | 参数取值错误。 |
LimitExceeded | 超过配额限制。 |
MissingParameter | 缺少参数错误。 |
MissingParameter.MissComponentName | 缺少控件名称参数,请检查后重试。 |
MissingParameter.SealId | 印章ID为空。 |
MissingParameter.SignComponents | 签署人缺少签署控件。 |
OperationDenied | 操作被拒绝。 |
OperationDenied.ByFilesServerSignForbid | 文件发起静默签未开通白名单。 |
OperationDenied.ErrNoResourceAccess | 无资源访问权限。 |
OperationDenied.InvalidApproverAge | 签署人未达到合法年龄。 |
OperationDenied.NoApproverMobileCheckPermission | 企业暂未开通手机号验证身份的服务,请在企业中心开通再使用 |
OperationDenied.NoIdentityVerify | 未通过个人实名。 |
OperationDenied.NoQuota | 流程配额不足。 |
OperationDenied.OverseaAbilityNotOpen | 当前企业员工没有开通境外签署能力。 |
OperationDenied.PersonNoOpenServerSign | 该用户已关闭或者未开启自动签服务 |
OperationDenied.RequiredComponentNotFill | 必填控件未填 |
OperationDenied.UserNotInOrganization | 用户不归属于当前企业,无法操作,请检查后重试。 |
ResourceNotFound | 资源不存在。 |
ResourceNotFound.Application | 应用号不存在。 |
ResourceNotFound.Resource | 资源不存在。 |
ResourceNotFound.Seal | 印章不存在,请检查后重试。 |
ResourceNotFound.User | 用户信息不存在。 |
ResourceUnavailable | 资源不可用。 |
UnauthorizedOperation.NoPermissionFeature | 请升级到对应版本后即可使用该接口。 |