docusignapi - Docusign 不允许我将收件人添加到模板
问题描述
我在 UI 上创建了一个模板并上传了一个文档。然后,我从 UI 添加了一个收件人并映射了文档中的一些字段。
我想根据这个模板创建一个信封,并在发送签名之前填充一些字段。我们的想法是,我们有一个门户,用户可以在其中填写表格并将文档发送给他进行签名。
在这里查看文档。我应该像这样发送和填充它:
{
...
"templateId": "68a89cdc-xxxx-xxxx-xxxx-fa2ab60713e3",
"recipients": {
"signers": [
{
...
"name": "Example Name",
"email": "examplename@example.com",
"roleName": "Signer One",
}
]
...
},
...
}
然而,这给了我一个错误:
Status: 400 INVALID_REQUEST_PARAMETER: The request contained at least one invalid parameter. 'recipients' may not be specifed when 'templateId' is set. Use 'templateRoles'.
我继续templateRoles
按照建议使用:
{
"accountId": "301424",
"emailSubject": "API Example - Populating Data in Templates",
"templateId": "44D9E888-xxxx-xxxx-xxxx-7071BC87A0DA",
"templateRoles": [{
"email": "john.doe@email.com",
"name": "John Doe",
"roleName": "Customer",
"tabs": {
"textTabs": [{
"tabLabel": "CustomerAddress",
"value": "123 Main St. San Francisco, CA 94105"
},
{
"tabLabel": "CustomerSSN",
"value": "12-345-6789"
}]
}
}],
"status": "sent"
}
但这并没有用我提供的数据填充任何字段。
我在这里想念什么?
解决方案
我最近遇到了这个问题并联系了他们的支持团队。使用templateId
and的文档Recipients
基本上是错误的。它总是会失败。我想他们很快就会改变。
{
"accountId": "301424",
"emailSubject": "API Example - Populating Data in Templates",
"templateId": "44D9E888-xxxx-xxxx-xxxx-7071BC87A0DA",
"templateRoles": [{
"email": "john.doe@email.com",
"name": "John Doe",
"roleName": "Customer",
"tabs": {
"textTabs": [{
"tabLabel": "CustomerAddress",
"value": "123 Main St. San Francisco, CA 94105"
},
{
"tabLabel": "CustomerSSN",
"value": "12-345-6789"
}]
}
}],
"status": "sent"
}
我在 UI 上创建了一个模板并上传了一个文档。然后,我从 UI 添加了一个收件人并映射了文档中的一些字段。
显然,您可以提供一个空的收件人姓名和电子邮件,尽管 UI 在输入字段上显示一个红色星号,就好像暗示它是必需的一样。
您只需要定义角色字段就可以了。因此,在此示例中,在您的模板中(来自 UI):
你应该很高兴。
推荐阅读
- powerbi - DAX 根据每月的最大日期计算度量
- python - Pandas groupby 如何按条件返回布尔值?
- python - 如果一个日期帧中的字符串位于另一个数据帧的多列中,则返回 True(时间复杂度)
- django - 如果一个类的相关集包含任意项目,我如何获取该类的所有条目?
- javascript - 单击按钮时更改 TextView 操作
- bixby - Bixby:想在一个输入表单视图中显示两个表单元素文本输入
- html - 带有 fa 图标的锚标记内的非破坏性内容
- javascript - 使用多个过滤器值过滤对象
- angular - 如何按 Typescript 中的键值对对象列表进行排序
- mysql - 使用 mysql 中的派生列查找日期差异