创建信封时如何使用复合模板指定预填充字段。
我尝试将选项卡信息包含在inlineTemplate.recipients.signers[0].tabs
,但我收到一个错误System.String cannot be cast to API_REST.Models.v2.tabs
.
如果我将信息作为模板角色包含在templateRoles
,它被忽略。该文档提供了有关如何执行此操作的信息。似乎应该在内联模板中指定预填充数据。
我的其他悬而未决的问题包括recipientId
做。是什么clientUserId
用于?我们目前设置clientUserId
对所有签名者具有相同的值。我看到它在签名者请求签名时使用。由于某种原因,它对于每个签名者来说应该是唯一的吗?
它看起来也像一个单一的复合模板将服务器和内联模板叠加在一起。在单个复合模板中拥有多个服务器模板或多个内联模板的用例是什么?
是否计划改进文档以描述如何将复合模板用于各种目的?
签名者/模板角色:
{
"clientUserId": "clientUserId",
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "First Last",
"roleName": "role1",
"tabs": {
"textTabs": [
{
"locked": true,
"tabLabel": "\\*FieldName",
"value": "prefillValue"
}
]
}
}
请求示例:
{
"compositeTemplates": [
{
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"clientUserId": "clientUserId",
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "First Last",
"recipientId": 1,
"roleName": "role1",
"tabs": {
"textTabs": [{"tabLabel": "label", "value": "val"}]
}
}
]
},
"sequence": 1
}
],
"serverTemplates": [
{
"sequence": 1,
"templateId": "templateId1"
}
]
},
{
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"clientUserId": "clientUserId",
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "First Last",
"recipientId": 1,
"roleName": "role1",
"tabs": {
"textTabs": [{"tabLabel": "label", "value": "val"}]
}
}
]
},
"sequence": 2
}
],
"serverTemplates": [
{
"sequence": 2,
"templateId": "templateId2"
}
]
}
],
"emailSubject": "Email subject",
"status": "sent",
"templateId": null,
"templateRoles": null
}