我有一个文件,我发送给3个人只能查看。我正在使用REST api。它给了我一个错误“ENVELOPE_IS_INCOMPLETE”。这是一个不好的要求:
`Host: demo.docusign.net
X-DocuSign-Authentication: {"Username":"Kathleen.Harding-Lori@xxx.com","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-Forwarded-For: 63.118.233.100, 165.225.34.90
{
"recipients": {
"signers": [
{
"name": "Kathy Keaton",
"email": "KathyKeaton1@outlook.com",
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy xxx",
"email": "kathyxxx@hotmail.com",
"routingOrder": "2",
"roleName": "##Seller1"
},
{
"name": "Kathy Lloyd",
"email": "KathyLloyd1@outlook.com",
"routingOrder": "3",
"roleName": "##RealEstateAgent"
}
]
},
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "1796af9e-06b2-463e-9b34-45dcee11653c"
}
]
}
],
"status": "sent",
"emailSubject": "Please Sign the enclosed docs at your earliest convenience"
}
400 BadRequest
Content-Type: application/json; charset=utf-8
X-DocuSign-TraceToken: d3964cc9-2470-408a-bcc8-0b160fa3a32e
{
"errorCode": "ENVELOPE_IS_INCOMPLETE",
"message": "The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line."
}`
这里没有签名,只是查看。有一个文件,我有收件人和主题。知道我哪里可能出错吗?感谢。
答案 0 :(得分:1)
如果您在API请求中使用 compositeTemplates 结构,则需要在 inlineTemplates 对象中指定收件人,如下:
{
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "1796af9e-06b2-463e-9b34-45dcee11653c"
}
],
"inlineTemplates": [
{
"sequence" : 2,
"recipients": {
"signers":[
{
"name": "Kathy Keaton",
"email": "KathyKeaton1@outlook.com",
"routingOrder": "1",
"roleName": "##Buyer1",
"recipientId": "1"
},
{
"name": "Kathy xxx",
"email": "kathyxxx@hotmail.com",
"routingOrder": "2",
"roleName": "##Seller1",
"recipientId": "2"
},
{
"name": "Kathy Lloyd",
"email": "KathyLloyd1@outlook.com",
"routingOrder": "3",
"roleName": "##RealEstateAgent",
"recipientId": "3"
}
]
}
}]
}
],
"status": "sent",
"emailSubject": "Please Sign the enclosed docs at your earliest convenience"
}
另外值得一提的是,如果您只是需要为(单个)模板已经定义的角色指定收件人信息,那么更简单的方法是:
{
"templateId": "1796af9e-06b2-463e-9b34-45dcee11653c"
"templateRoles":[
{
"name": "Kathy Keaton",
"email": "KathyKeaton1@outlook.com",
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy xxx",
"email": "kathyxxx@hotmail.com",
"routingOrder": "2",
"roleName": "##Seller1"
},
{
"name": "Kathy Lloyd",
"email": "KathyLloyd1@outlook.com",
"routingOrder": "3",
"roleName": "##RealEstateAgent"
}
],
"status": "sent",
"emailSubject": "Please Sign the enclosed docs at your earliest convenience"
}
注意:上述两个Request实体都应该给你相同的结果。 compositeTemplates 结构(如第一个请求中所示)使您可以执行诸如创建使用多个模板的信封等操作 - 但如果您只是从单个创建信封模板,然后第二个请求显示了一种更简单的方法(即,不使用 compositeTemplates 结构)。