Reputation: 1878
I am using the DocuSign API to generate digital agreements. So far all has gone well, but I now have a requirement to optionally have the contract sent to a user for editing within DocuSign before it is sent to the signatories.
My existing API calls are fairly simple, just using a template for the document:
POST https://demo.docusign.net/restapi/v2/accounts/<account_id>/envelopes HTTP/1.1
{
"status": "sent",
"templateId": "<template_id>",
"templateRoles": [
{
"email": "[email protected]",
"name": "Person One",
"roleName": "Signatory1"
},
{
"email": "[email protected]",
"name": "Person Two",
"roleName": "Signatory2"
}
]
}
I need to have the same template sent to an editing user to adjust the envelope details before delivering to the signatories.
Anybody had any luck with a similar requirement?
Things I have tried:
compositeTemplates
to the above request with an inline template that has an editor. This unfortunately removes all of the fields from the document.compositeTemplates
with the template selected as a server template, and the recipients in an inline template. This does not correctly match up the recipient roles to the template roles.Upvotes: 1
Views: 107
Reputation: 7393
You can use the following composite template to add an Editor in addition to the template roles you have.
{
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "2",
"templateId": "<template_id>"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Person One",
"roleName": "Signatory1",
"recipientId": "1"
},
{
"email": "[email protected]",
"name": "Person Two",
"roleName": "Signatory2",
"recipientId": "2"
}
],
"editors": [
{
"name": "person three",
"email": "[email protected]",
"recipientId": "3",
"routingOrder": "0"
}
]
}
}
]
}
]
}
Upvotes: 1