I have a server template that has two documents, two recipients and two custom tabs placed on top of the first page of the first document.
My business requirements is to add a supplement document at the end of the documents provided by the server template. How do you accomplish that? I have literally tried every possible JSON combination. Here is my latest failed attempt:
<code>{
"emailSubject": "Electronic Signature Request",
"emailBlurb": "Hi! an electronic signature request has been sent your way!",
"status": "created",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "hello-39ba-40a1-975d-world"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Signer One",
"roleName": "Contact",
"tabs": {}
},
{
"email": "[email protected]",
"name": "Signer Two",
"roleName": "Signer 2",
"tabs": {}
},
{
"email": "[email protected]",
"name": "Amy Anderson",
"roleName": "Signer 3",
"recipientId": 3,
"tabs": {
"textTabs": [
{
"tabLabel": "Doc Version",
"value": "July FDD",
"customTabId": "foo-foo-406d-814f-cc145e24634e"
},
{
"tabLabel": "Recipient label",
"value": "Anderson",
"customTabId": "foo-foo-43c9-9759-28b1158dcb42"
}
]
}
}
]
}
}
]
},
{
"document": {
"documentId": 1,
"name": "supplement-doc.pdf",
"documentBase64": "JVBERi0..."
}
}
]
}
</code>
<code>{
"emailSubject": "Electronic Signature Request",
"emailBlurb": "Hi! an electronic signature request has been sent your way!",
"status": "created",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "hello-39ba-40a1-975d-world"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Signer One",
"roleName": "Contact",
"tabs": {}
},
{
"email": "[email protected]",
"name": "Signer Two",
"roleName": "Signer 2",
"tabs": {}
},
{
"email": "[email protected]",
"name": "Amy Anderson",
"roleName": "Signer 3",
"recipientId": 3,
"tabs": {
"textTabs": [
{
"tabLabel": "Doc Version",
"value": "July FDD",
"customTabId": "foo-foo-406d-814f-cc145e24634e"
},
{
"tabLabel": "Recipient label",
"value": "Anderson",
"customTabId": "foo-foo-43c9-9759-28b1158dcb42"
}
]
}
}
]
}
}
]
},
{
"document": {
"documentId": 1,
"name": "supplement-doc.pdf",
"documentBase64": "JVBERi0..."
}
}
]
}
</code>
{
"emailSubject": "Electronic Signature Request",
"emailBlurb": "Hi! an electronic signature request has been sent your way!",
"status": "created",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "hello-39ba-40a1-975d-world"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Signer One",
"roleName": "Contact",
"tabs": {}
},
{
"email": "[email protected]",
"name": "Signer Two",
"roleName": "Signer 2",
"tabs": {}
},
{
"email": "[email protected]",
"name": "Amy Anderson",
"roleName": "Signer 3",
"recipientId": 3,
"tabs": {
"textTabs": [
{
"tabLabel": "Doc Version",
"value": "July FDD",
"customTabId": "foo-foo-406d-814f-cc145e24634e"
},
{
"tabLabel": "Recipient label",
"value": "Anderson",
"customTabId": "foo-foo-43c9-9759-28b1158dcb42"
}
]
}
}
]
}
}
]
},
{
"document": {
"documentId": 1,
"name": "supplement-doc.pdf",
"documentBase64": "JVBERi0..."
}
}
]
}
The error thrown is:
<code>{
"errorCode": "TAB_REFERS_TO_MISSING_DOCUMENT",
"message": "The DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 66891084 which is not present."
}
</code>
<code>{
"errorCode": "TAB_REFERS_TO_MISSING_DOCUMENT",
"message": "The DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 66891084 which is not present."
}
</code>
{
"errorCode": "TAB_REFERS_TO_MISSING_DOCUMENT",
"message": "The DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 66891084 which is not present."
}
If I remove the last “document” composite template item, the the error is:
<code>{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. 'recipientId' not set for recipient."
}
</code>
<code>{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. 'recipientId' not set for recipient."
}
</code>
{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. 'recipientId' not set for recipient."
}
There are errors everywhere… After two days I am literally pulling out my hair…