创建信封时如何使用复合模板指定预填充字段。
我尝试在 中包含选项卡信息inlineTemplate.recipients.signers[0].tabs
,但出现错误System.String cannot be cast to API_REST.Models.v2.tabs
。
如果我将信息作为模板角色包含在 中templateRoles
,则会被忽略。该文档提供了有关如何执行此操作的信息。似乎应该在内联模板中指定预填充数据。
我的其他未解决的问题包括做recipientId
什么。是干什么clientUserId
用的?我们目前clientUserId
为所有签名者设置相同的值。我看到它在签名者请求签名时使用。由于某种原因,它应该对每个签名者都是唯一的吗?
它也看起来像一个单一的复合模板将服务器和内联模板叠加在一起。在单个复合模板中包含多个服务器模板或多个内联模板的用例是什么?
是否有计划改进文档以描述如何将复合模板用于各种目的?
签名者/模板角色:
{
"clientUserId": "clientUserId",
"email": "first+last@email.com",
"name": "First Last",
"roleName": "role1",
"tabs": {
"textTabs": [
{
"locked": true,
"tabLabel": "\\*FieldName",
"value": "prefillValue"
}
]
}
}
示例请求:
{
"compositeTemplates": [
{
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"clientUserId": "clientUserId",
"email": "first+last@email.com",
"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": "first+last@better.com",
"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
}