gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 22:13:55 24 4
gpt4 key购买 nike

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

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

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

请求 URL 如下所示:https://dev.docusign.net/restapi/v2/accounts/ {accountId}/信封
header 只是承载身份验证 token 和 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"
}






最佳答案

您可以使用 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"
}
]
}
}
]
}
]
}

有关复合模板(优点和缺点)的更多信息,我强烈建议 this blog post由伟大的 DocuSigner 撰写,Gil V.

关于json - Docusign API 使用模板和模板中的自定义字段未通过 HttpRequest 填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61804332/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com