This package has been deprecated

Author message:

The SignNow package has been upgraded to 1.2.0 and moved to https://www.npmjs.com/package/@signnow/api-client. The version 1.1.8 is no longer supported. If you have questions about the SignNow API, please visit https://help.signnow.com/docs or email api@signnow.com.

signnow

1.1.8 • Public • Published

SignNow

SignNow REST Service Wrapper

☝️ The SignNow package has been upgraded to 1.2.0 and moved to https://www.npmjs.com/package/@signnow/api-client.

The version 1.1.8 is no longer supported. If you have questions about the SignNow API, please visit https://help.signnow.com/docs or email api@signnow.com.

Updates

12/3/2015 - The eval server has been changed to api-eval.signnow.com. You will need to create a new account for api-eval.signnow.com. https://eval.signnow.com.

About SignNow

SignNow is a powerful web-based e-signature solution that streamlines the signing process and overall document flow for businesses of any size. SignNow offers SaaS as well as public and private cloud deployment options using the same underlying API. With SignNow you can easily sign, share and manage documents in compliance with international data laws and industry-specific regulations. SignNow enables you to collect signatures from partners, employees and customers from any device within minutes.

API Contact Information

If you have questions about the SignNow API, please visit https://help.signnow.com/docs or email api@signnow.com.

See additional contact information at the bottom.

Installation

$ npm install signnow

Examples

To run the examples you will need an API key. You can get one here https://www.signnow.com/api. For a full list of accepted parameters, refer to the SignNow REST Endpoints API guide: https://help.signnow.com/docs.

Every resource is accessed via your SignNow instance:

var signnow = require("signnow")({
    credentials: "ENCODED_CLIENT_CREDENTIALS",
    production: false //(false uses eval server)
});

Every resource returns two parameters. The first param contains any errors and the second contains the results.

User

Create a User

signnow.user.create({
    "first_name": "John",
    "last_name": "Wayne",
    "email":"john@domain.com",
    "password":"yourpwd"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Retrieve User Information

signnow.user.retrieve({token:"your auth token"}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
}
});

OAuth 2.0

Request Access Token

signnow.oauth2.requestToken({
    "username": "account username",
    "password": "account password"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Verify an Access Token

signnow.oauth2.verify({
    token: "your auth token"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Document

Retrieve a List of the User’s Documents

signnow.document.list({token:"your auth token"}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Retrieve a Document Resource

signnow.document.view({
    token: "your auth token",
    id: "document id"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Download a Collapsed Document

signnow.document.download({
    token: "your auth token",
    id: "document id"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Upload Document

signnow.document.create({
    token: "your auth token",
    filepath: ""
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Upload File & Extract Fields

signnow.document.fieldextract({
    token: "your auth token",
    filepath: ""
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Update Document (add fields)

var fieldsObj = {
    "texts":[
        {
            "size":8,
            "x":61,
            "y":72,
            "page_number":0,
            "font":"Arial",
            "data":"sample text",
            "line_height":9.075
        }
    ]
}
 
signnow.document.update({
    token: "your auth token",
  id: "document id",
    fields: fieldsObj
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Create Invite to Sign a Document

signnow.document.invite({
    token: "your login token",
    id: "document id",
  data:{
       from: "email address",
        to: "email address"
  }
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Cancel an Invite to a Document

signnow.document.cancelInvite({
    token: "your login token",
    id: "document id"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Create a One-time Use Download URL

signnow.document.share({
    token: "your login token",
    id: "document id"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Merges Existing Documents

signnow.document.merge({
    token: "your login token",
    name: "the merged doc",
  document_ids: [
    "84a18d12bf7473ea3dd0e4dd1cdcded6ba6281aa",
    "a71d963c49f33176e90c5827069c422616b1500c"
  ]
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Get Document History

signnow.document.history({
    token: "your login token",
    id: "document id"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Enumerations

Add Enumeration Field to a Document

signnow.enumerations.addField({
    token: "your login token",
    document_id: "document id",
    "x": 150,
  "y": 200,
  "width": 200,
  "height": 50,
  "page_number": 0,
  "role": "buyer",
  "required": true,
  "label": "Clothing Brand"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Add Enumeration Options to the Field

signnow.enumerations.addOptions({
    token: "your login token",
  "enumeration_options": [
    {
      "enumeration_id":"8a3501896160b12d4ef7507a81b2f0998b8137b1",
      "data":"Active"
    },
    {
      "enumeration_id":"8a3501896160b12d4ef7507a81b2f0998b8137b1",
      "data":"Old Navy"
    },
    {
      "enumeration_id":"8a3501896160b12d4ef7507a81b2f0998b8137b1",
      "data":"Volcom"
    }
  ]
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Template

Create a Template

signnow.template.create({
    token: "your login token",
    document_id: "document id",
    document_name: "my template"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Duplicate a Template

signnow.template.duplicate({
    token: "your login token",
    id: "document id",
    name: "my template"
}, function(err, res){
    if(!err){
        console.log("RESULTS:" + res);
    }else{
        console.log("ERROR:" + err);
    }
});

Folder

Returns a list of folders

signnow.folder.list({
    "token": "your login token"
}, function(err, res){
  if(!err){
    console.log("RESULTS:" + res);
  }else{
    console.log("ERROR:" + err);
  }
});

Returns a list of documents inside a folder

Filters Values
signing-status waiting-for-me, waiting-for-others, signed, pending
document-updated new Date()
document-created new Date()
Sort Values
document-name asc/desc
updated asc/desc
created asc/desc
signnow.folder.documents({
    "token": "your login token",
    "id": "folder id",
    "filter": [
      {"signing-status": "pending"}
    ],
    "sort": {"document-name":"asc"}
}, function(err, res){
  if(!err){
    console.log("RESULTS:" + res);
  }else{
    console.log("ERROR:" + err);
  }
});

Webhook

Returns a list of Webhooks

signnow.webhook.list({
    "token": "your login token"
}, function(err, res){
  if(!err){
    console.log("RESULTS:" + res);
  }else{
    console.log("ERROR:" + err);
  }
});

Create a Webhook

Events Description
document.create Webhook is triggered when a document is uploaded to users account in SignNow
document.update Webhook is triggered when a document is updated (fields added, text added, signature added, etc.)
document.delete Webhook is triggered when a document is deleted from
invite.create Webhook is triggered when an invitation to a SignNow document is created.
invite.update Webhook is triggered when an invite to SignNow document is updated. Ex. A signer has signed the document.
signnow.webhook.create({
    "token": "your login token",
    "event": "document.create",
    "callback_url": "http://www.domain.com/path"
}, function(err, res){
  if(!err){
    console.log("RESULTS:" + res);
  }else{
    console.log("ERROR:" + err);
  }
});

Unit Tests

To run the unit test you will need to install "Mocha" and "Chai". You also need to create a "test.settings.js" in the root of the SignNow module. The file will need to contain the following:

(function(){
  "use strict";
  /**
   * Test Settings
   */
 
  exports.settings = {
    credentials: "[ENCODED CLIENT CREDENTIALS]",
    token: "[ACCESS TOKEN]",
    username: "[SIGNNOW USERNAME]",
    password: "[SIGNNOW PASSWORD]",
    documentid: "[EXISTING DOCUMENT ID]",
    templateid: "[EXISTING TEMPLATE ID]",
    folderid: "[EXISTING FOLDER ID]",
    email: "[FROM EMAIL FOR INVITE]",
    testemail: "[TO EMAIL FOR INVITE]"
  };
 
})();

Additional Contact Information

SUPPORT

To contact SignNow support, please email support@signnow.com.

SALES

For pricing information, please call (800) 831-2050 or email sales@signnow.com.

Package Sidebar

Install

npm i signnow

Weekly Downloads

13

Version

1.1.8

License

none

Unpacked Size

79 kB

Total Files

22

Last publish

Collaborators

  • mfitchett
  • russellswift