Docusign REST API - 复合模板错误

时间:2017-06-26 16:40:19

标签: docusigncompositetmplts

我正在尝试使用复合模板创建信封。我为每个签名者创建了一个带有角色的服务器模板。我想在创建时指定角色数据,附加本地端文档,然后覆盖服务器模板以进行路由。我可以通过身份验证,找到teplate ID,直到创建信封。请参阅下面的JSON帖子:

--MYBoundary

Content-Type: application/json
Content-Disposition: form-data; 
{
"emailBlurb":"Test Email Body",
"emailSubject":"Test Email Subject",
"status":"created",
"compositeTemplates": [
{
"compositeTemplateId": "1",
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers" : [
{
"email": "email@mail.usf.edu",
"name": "Boss",
"recipientId": "1",
"roleName": "GM"
},
{
"email": "email@mail.usf.edu",
"name": "Name Here",
"recipientId": "3",
"roleName": "PX"
},
{
"email": "email@mail.usf.edu",
"name": "Diff Name",
"recipientId": "2",
"roleName": "OO"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "LV_EOTF-Non-Mod_Commitment_Letter.DOCX"
},
"serverTemplates": [
{
"sequence": "2",
"templateId": "TempID"
}
]
}
]
}
--MYBoundary

Content-Disposition: form-data; name="file"; filename="LV_EOTF-Non-Mod_Commitment_Letter.DOCX"; documentid=1; compositeTemplateId=1
Content-Type: application/octet-stream

<Doc bytes here>
--MYBoundary--

我收到错误回复:

    {  "errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. Template definition must include an 'envelopeTemplateDefinition' section."
}

我搜索了我能找到的所有线程,并尝试过模拟它们。它只是不起作用。任何帮助都将非常感激。

1 个答案:

答案 0 :(得分:-3)

请您在下面的链接中查看我提供的示例。

Several editable PDF

该示例显示了如何使用servertemplate和inlinetemplate创建信封。