猿问

Docusign API 使用模板和模板中的自定义字段未通过 HttpRequest 填充

我在我的开发沙箱中创建了一个模板。在该模板中,我创建了自定义字段并更改了数据标签以反映代码库中的内容。


从那里,我用一个信封做了一个httpRequest,引用了那个模板id,用 "tabs":{"textTabs":[{"tabLabel":"CurrentUnit","value":"Test Unit"}]} 作为对自定义字段的引用。CurrentUnit 是开发沙箱中我的模板的数据标签。在我的应用程序的 httpRequest 之后没有通过电子邮件发送模板,但是该字段没有被填充,我完全被难住了。有任何想法吗?


此外,如果我对 tab_definitions 执行 Get 请求,它会显示我创建的那些自定义字段。


请求 url 如下所示:https://dev.docusign.net/restapi/v2/accounts/ {accountId}/envelopes 标头只是 Bearer auth 令牌和 Content-Type


请求正文如下所示:


{   "accountId":"{accountId}",

    "emailSubject":"Test",

    "templateId":"{templateId}",

    "templateRoles":[

        {

            "roleName":"Signer",

            "name":"Liam",

            "email":"{my@email.com}",

            "tabs":{

                "textTabs":[{

                    "tabLabel":"currentUnit",

                    "value":"Test Unit"


                }]}}],

                "status":"sent"

            }


catspeake
浏览 119回答 1
1回答

大话西游666

您可以使用 DocuSign 复合模板并指定收件人自定义字段。templateRoles 不支持指定收件人自定义字段。这是一个对我有用的例子。我使用了来自 DocuSign UI 的模板,其中包含两个签名者收件人,每个收件人都分配了一个“在此处签名”选项卡。此外,第一个签名者有一个自定义文本标签。以编程方式更改下面的 initialValue。{    "emailSubject": "Test",    "status": "sent",    "compositeTemplates": [        {            "serverTemplates": [                {                    "sequence": "1",                    "templateId": "{Enter your template ID}"                }            ],            "inlineTemplates": [                {                    "sequence": "1",                    "recipients": {                        "signers": [                            {                                "email": "{Enter email}",                                "name": "jane doe",                                "recipientId": "2",                                "roleName": "{Enter Role}",                                "routingOrder": "1",                                "tabs": {                                    "textTabs": [                                        {                                            "tabLabel": "{theLabelName}",                                            "value": "{newValue}"                                        }                                    ]                                }                            },                            {                                "email": "{another Email}",                                "name": "john doe",                                "recipientId": "3",                                "roleName": "{another Role}",                                "routingOrder": "1"                            }                        ]                    }                }            ]        }    ]} 有关复合模板(优点和缺点)的更多信息,我强烈鼓励伟大的 DocuSigner Gil V 撰写这篇博文。
随时随地看视频慕课网APP

相关分类

Go
我要回答