docusign-api
Promise based DocuSign API for NodeJS.
Installation
npm install docusign-api
Usage
var DocuSign = var config = email: '#EMAIL' password: '#PASSWORD' key: '#INTEGRATOR KEY'; // Then we instantiate a client with DocuSign auth tokens var docuSign = config;
DocuSign api
You must have a valid DocuSign auth token (password and integrator key) for the following:
Login to DocuSign (GET /login_information)
var docuSign = config; docuSign ;
Create an Envelope to request a signature (POST /envelopes)
var docuSign = config; var envelopeRequest = emailSubject: 'API Call that uses a Template' templateId: 'xxxxx-xxx-xxxx-xxxx-xxxxxxxxxx' templateRoles: roleName: 'Role' name: 'Sally Doe' email: 'sally.doe@email.com' status: 'sent'; docuSign ;
Get Recipient View for embedded signing (POST /#{envelopeId}/views/recipient)
var docuSign = config; var envelopeId = 'xxxx-xxx-xxxx'; var recipientRequest = returnUrl: 'http://www.docusign.com/devcenter' authenticationMethod: 'email' userName: 'Sally Doe' email: 'sally.doe@email.com'; docuSign ;
Testing
Unit Tests
npm test
Integration Tests
Integration tests will test the API end to end against a real DocuSign API endpoint. You will first
need to rename config.dev.json.stub
to config.dev.json
and update with your DocuSign auth settings.
To run integration tests:
grunt integration
License
Copyright (c) 2015 Hady Osman
Licensed under the MIT license.