Integration of embedded DocuSign API signatures

I am working on a registration process that requires a new user to sign documents. I use DocuSign to embed a signature for this

I created a template with a pdf document in the docusign admin panel and added 1 test route: enter image description here

and in the backend, I make the following api calls:

  • STEP 1 - call login API (used to retrieve your baseUrl) - restapi / v2 / login_information
  • STEP 2 - Create an envelope from the template and Send - baseURL + "/ envelopes"
  • STEP 3 - Run the embedded signature view (aka view of the recipient) - baseURL + uri + "/ views / recipient"

and as parameters for email, the username if I send test@mail.com , test2 (for example, by route), then when I go to the recipient URL with the returned recipient, I see that the form already has a placeholder for Sign and Initials, since I added these tags for the user test2 in the admin panel, and the form looks like this: enter image description here

What is GREAT!

But if I send test3 and test3@mail.com as the parameters of the username and email, in this case I see this form: enter image description here

Here the user can put his mark and other elements where he wants ( which is REQUIRED )

I need this behavior for all the user names and emails of new users that will be registered (for example, all users will see that these tags are signed and begin) I can not add them to the admin panel for routing, because I do not know the email messages new users who come to the site.

Is there any way to do this?

RequestBody for STEP2 for @AndrewWilson request

"<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" + "<status>sent</status>" + "<emailSubject>DocuSign API - Embedded Signing example</emailSubject>" + "<templateId>" + TEMPLATE_ID + "</templateId>" + "<templateRoles>" + "<templateRole>" + "<email>" + recipientEmail + "</email>" + "<name>" + recipientName + "</name>" + "<roleName>test2</roleName>" + "<clientUserId>1</clientUserId>" "</templateRole>" + "</templateRoles>" + "</envelopeDefinition>"; 

recipientEmail, the recipient name will be dynamic, templateId constant for the document

0
source share
1 answer

Here is an example request that would populate your recipient information on a template that has the Name of Awesome Role role, while email and name are blank

 { "emailSubject": "Super Awesome DocuSign Integration", "templateId": "{templateId}", "status": "sent", "templateRoles": [ { "email": " person@email.com ", "name": "First Last", "roleName": "Awesome Role", "clientUserId": 123456 } ] } 

If you want to add additional tags dynamically, you should start using composite templates, this increases the complexity of the call, but here is an example of a call using the same template, but adding a signature tag to the recipient.

 { "emailSubject": "Super Awesome DocuSign Integration", "status": "sent", "templateId": "{templateId}", "templateRoles": [ { "email": " person@email.com ", "name": "First Last", "roleName": "Awesome Role", "clientUserId":123456 } ], "compositeTemplates": [ { "inlineTemplates": [ { "sequence": "1", "recipients": { "signers": [ { "email": " person@email.com ", "name": "First Last", "clientUserId":123456, "recipientId": "1", "defaultRecipient": "true", "tabs": { "signHereTabs": [ { "xPosition": "200", "yPosition": "200", "documentId": "1", "pageNumber": "1" } ] } } ] } } ] } ] } 

For more information on composite templates, see DocuSign REST API Guide

+3
source

All Articles