docusign模板自定义字段未填充

时间:2014-08-14 19:00:01

标签: docusignapi

我正在尝试将我添加到模板中的自定义字段填充为我在xml请求文档中发送的值。我很肯定这是一个明显的错误,但我只是没有看到它。我也看到这个问题在其他时间问了一些没有回答。这是我的要求。我可以签署文件,但不填写非标准字段。

<envelopeDefinition xmlns="http://www.docusign.com/restapi">
    <status>sent</status>
    <emailSubject>Disclosuresave - Clue Authorization Form</emailSubject>
    <templateId>x</templateId>
    <templateRoles>
        <templateRole>
            <email>test@test.test</email>
            <name>test name</name>
            <roleName>Recipient</roleName>
            <clientUserId>####</clientUserId>
            <CustomFields>
                <CustomField>
                    <Name>Address</Name>
                    <Show>True</Show>
                    <Required>False</Required>
                    <Value>123 Ash St</Value>
                </CustomField>
                <CustomField>
                    <Name>City</Name>
                    <Show>True</Show>
                    <Required>False</Required>
                    <Value>Beverly Hills</Value>
                </CustomField>
            </CustomFields>
        </templateRole>
    </templateRoles>
</envelopeDefinition>

1 个答案:

答案 0 :(得分:1)

如果您要填写的字段是您放置在模板中的文档上的数据字段,那么这些字段不是“自定义字段” - 它们是“标签”。如果这是您的方案,那么请求的标签部分应如下所示:

<tabs>
    <textTabs>
        <text>
            <name>Address</name>
            <value>123 Ash St</value>
        </text>
        <text>
            <name>City</name>
            <value>Beverly Hills</value>
        </text>
    </textTabs>
</tabs>

另外,请注意元素名称区分大小写(即“名称”不是“名称”,“值”不是“值”等) - 和,名称的值元素也区分大小写。例如,如果模板将标签标签定义为 City ,但您的API请求设置了名称 = city ,那么API请求将不会填充信封中的那个字段(因为城市!= 城市)。

为了供将来参考,此在线资源包含有关JSON和XML中所有REST API操作的请求/响应格式的详细信息:https://www.docusign.net/restapi/help