How to use the docusign-esign.Recipients function in docusign-esign

To help you get started, we’ve selected a few docusign-esign examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github docusign / docusign-node-client / test / Recipes / CoreRecipes.js View on Github external
var signHere = new docusign.SignHere();
      signHere.setDocumentId('1');
      signHere.setPageNumber('1');
      signHere.setRecipientId('1');
      signHere.setXPosition('100');
      signHere.setYPosition('100');

      // can have multiple tabs, so need to add to envelope as a single element list
      var signHereTabs = [];
      signHereTabs.push(signHere);
      var tabs = new docusign.Tabs();
      tabs.setSignHereTabs(signHereTabs);
      signer.setTabs(tabs);

      // add recipients (in this case a single signer) to the envelope
      envDef.setRecipients(new docusign.Recipients());
      envDef.getRecipients().setSigners([]);
      envDef.getRecipients().getSigners().push(signer);

      // send the envelope by setting |status| to "sent". To save as a draft set to "created"
      envDef.setStatus('sent');

      // use the |accountId| we retrieved through the Login API to create the Envelope
      var loginAccount = new docusign.LoginAccount();
      loginAccount = loginAccounts[0];
      var accountId = loginAccount.accountId;

      // instantiate a new EnvelopesApi object
      var envelopesApi = new docusign.EnvelopesApi();

      // call the createEnvelope() API
      envelopesApi.createEnvelope(accountId, envDef, null, function (error, envelopeSummary, response) {