我正在集成 Docusign,以便收件人可以看到他们的信封嵌入在我的网站上。我首先使用 api 创建信封,并尝试使用动态数据预填充数据字段。
据我所知,我用来创建信封的 json 没有任何问题。StackOverflow 上的其他解决方案都没有帮助解决这个问题。我的 json 看起来像这样(我发送到https://demo.docusign.net/restapi/v2/accounts/360734/envelopes):
{
"status": "sent",
"emailBlurb": "Please sign the document.",
"emailSubject": "Please sign your agreement",
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"clientUserId": "EMAIL",
"name": "NAME",
"email": "EMAIL",
"roleName": "Signer1",
"tabs": {
"textTabs": [
{
"tabLabel": "address",
"value": "ADDRESS "
},
{
"tabLabel": "multi_address",
"value": "ADDRESSES"
}
]
}
},
{
"name": "ANOTHER NAME",
"email": "ANOTHER EMAIL",
"roleName": "Random1"
}
]
}
我得到以下回复:
{
"envelopeId": "ENVELOPE_ID",
"uri": "/envelopes/ENVELOPE_ID",
"statusDateTime": "2013-10-25T01:20:55.6750772Z",
"status": "sent"
}
然后,我通过发布到https://demo.docusign.net/restapi/v2/accounts/360734/envelopes/ENVELOPE_ID/views/recipient获得向客户展示的链接
{
"authenticationMethod": "email",
"clientUserId": "EMAIL",
"email": "EMAIL",
"returnUrl": "MYURL",
"userName": "NAME"
}
我得到了这样的回应:
{
"url": "https://demo.docusign.net/Member/StartInSession.aspx?t=REDACTED"
}
这遵循此处看到的示例:https ://github.com/Ergin008/DocuSign-REST-API-Webinar-April2013/blob/master/example2.json
以这种方式创建信封后,标签似乎没有预填充。当我查看嵌入在我的网站上的信封时,什么都没有填满。我确定 tabLabels 是正确的。否则一切似乎都正常。我缺少某种设置吗?
更新 看起来它可能是一个错误!我改变的只是角色名称,它可以工作!
{
"status": "sent",
"emailBlurb": "Please sign the document.",
"emailSubject": "Please sign your agreement",
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"clientUserId": "EMAIL",
"name": "NAME",
"email": "EMAIL",
"roleName": "Signer1",
"tabs": {
"textTabs": [
{
"tabLabel": "address",
"value": "ADDRESS "
},
{
"tabLabel": "multi_address",
"value": "ADDRESSES"
}
]
}
},
{
"name": "ANOTHER NAME",
"email": "ANOTHER EMAIL",
"roleName": "Signer2"
}
]
}
而且人满为患!似乎如果我以除 Signer 以外的任何名称开始角色名称,它就不起作用。诡异的!
是的,在这种情况下,我将 Docusign 上的角色名称从 Random1 更改为 Signer2。例如,Signer3 也有效。