首页 > 解决方案 > 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"
}

但这并没有用我提供的数据填充任何字段。

我在这里想念什么?

标签: docusignapi

解决方案


我最近遇到了这个问题并联系了他们的支持团队。使用templateIdand的文档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):

在此处输入图像描述

你应该很高兴。


推荐阅读