我在Web应用程序中嵌入了一组文档的签名。最终,文件将填写在线访谈期间提供的答案。信封中需要三到四个文件。这些文档是基于服务器的模板。在模板定义中,我将申请人角色(签名者)的名称和电子邮件字段留空,因为它们是许多申请人将使用的通用模板。
在测试场景中,我可以在信封中加载单个模板并将其带入整个过程,但是当我转换为复合模板时,我收到错误“errorCode”:“RECIPIENTS_NOT_PROVIDED”,“message”:“请求中未找到任何收件人。“从信封请求。我已将代码与许多示例进行了比较,但未能看到任何不同的内容。必须有一些我缺少的基本功能 - 这并不奇怪,因为这是我第一次尝试使用DocuSign API。有人可以赐教我吗?
失败的代码:
{
"accountId":"xxxxxxx",
"emailSubject":"WOTC Certification Documents - Test Dummy",
"emailBlurb":"Documentation to be submitted by Consultant",
"status":"sent",
"compositTemplates":{
"serverTemplates":[{
"sequence":"1",
"templateId":"ca18aba4-49bd-4c28-9dce-fbd2dd3fbb7b",
"recipients":{
"signers":{
"name":"Test Dummy",
"roleName":"Applicant",
"recipientId":"1",
"clientUserId":"Dummy1234",
"email":"dummy@mydomain.com"
}
}
},{
"sequence":"2",
"templateId":"5ed3d600-5a57-4fee-931f-53233858dc65",
"recipients":{
"signers":{
"name":"Test Dummy",
"roleName":"Applicant",
"clientUserId":"Dummy1234",
"email":"dummy@mydomain.com"
}
}
}]
}
}
谢谢。
答案 0 :(得分:2)
您已走上正轨,但我建议您对已发布的JSON进行以下更改:
此处再次显示您的JSON,修改后实施我上面列出的更改:
{
"accountId":"xxxxxxx",
"emailSubject":"WOTC Certification Documents - Test Dummy",
"emailBlurb":"Documentation to be submitted by Consultant",
"status":"sent",
"compositeTemplates":[
{
"serverTemplates":[
{
"sequence":"1",
"templateId":"ca18aba4-49bd-4c28-9dce-fbd2dd3fbb7b"
}],
"inlineTemplates":[
{
"sequence" : 2,
"recipients":{
"signers":[{
"name":"Test Dummy",
"roleName":"Applicant",
"recipientId":"1",
"clientUserId":"Dummy1234",
"email":"dummy@mydomain.com"
}]
}
}],
},
{
"serverTemplates":[
{
"sequence" : 3,
"templateId":"5ed3d600-5a57-4fee-931f-53233858dc65"
}],
"inlineTemplates":[
{
"sequence" : 4,
"recipients": {
"signers" : [{
"name":"Test Dummy",
"roleName":"Applicant",
"recipientId": "1",
"clientUserId":"Dummy1234",
"email":"dummy@mydomain.com"
}]
}
}]
}]
}