npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

northern911-api

v1.0.0

Published

> A Node.js wrapper around Northern911 SOAP api. For more information about this API please read [Northern911 SOAP API Overview](https://addressinfo.northern911.com/soapapidocs/)

Downloads

7

Readme

northern911-api Build Status

A Node.js wrapper around Northern911 SOAP api. For more information about this API please read Northern911 SOAP API Overview

Install

$ npm install northern911-api --save

API

Northern911API(options)

constructor to initialize the module

vendorCode - vendor code given by Northern
password - password given by Northern
sandbox - (default: false) module will use Northern sandbox SOAP url if true

connect(callback)

function to establish connection with Northern SOAP API

callback - function(error) callback upon connection. All module functions have to be executed within

queryCustomer(phoneNumber, callback)

Returns current data for the requested record. https://addressinfo.northern911.com/soapapidocs/#Query

phoneNumber - Customer phone number.
callback - function(error, result, body). error contains error, result contains JSON result object and body contains full XML body result

getVendorDumpURL(callback)

Get a URL to download the entire vendor database as CSV. https://addressinfo.northern911.com/soapapidocs/#VendorDump

callback - function(error, result, body). error contains error, result contains JSON result object and body contains full XML body result

addOrUpdateCustomer(options, callback)

Add new or update existing client record. https://addressinfo.northern911.com/soapapidocs/#AddUpdate

options.phoneNumber - Customer phone number. Must be 10 digits
options.lastName - Last name or company name
options.firstName - First name
options.lastDateTimeModified - Last date modified
options.lastDateTimeModifiedUnixTime - Last date modified in Unix time
options.streetNumber - Street number
options.suiteApt - Suite or apartment number
options.streetName - Street name
options.city - City
options.provinceState - Two letter province or state code
options.postalCodeZip - Canadian postal code or USA zip code
options.otherAddressInfo - Other information
options.enhancedCapable - Yes or No. Must be 'Y' or 'N'.
callback - function(error, result, body). error contains error, result contains JSON result object and body contains full XML body result

verifyCustomer(options, callback)

This does not modify customer details and only verifies whether or not the data passed to AddorUpdateCustomer would succeed. https://addressinfo.northern911.com/soapapidocs/#Verify

options.phoneNumber - Customer phone number. Must be 10 digits
options.lastName - Last name or company name
options.firstName - First name
options.lastDateTimeModified - Last date modified
options.lastDateTimeModifiedUnixTime - Last date modified in Unix time
options.streetNumber - Street number
options.suiteApt - Suite or apartment number
options.streetName - Street name
options.city - City
options.provinceState - Two letter province or state code
options.postalCodeZip - Canadian postal code or USA zip code
options.otherAddressInfo - Other information
options.enhancedCapable - Yes or No. Must be 'Y' or 'N'.
callback - function(error, result, body). error contains error, result contains JSON result object and body contains full XML body result

deleteCustomer(phoneNumber, callback)

Delete an existing client record. https://addressinfo.northern911.com/soapapidocs/#Delete

phoneNumber - Customer phone number.
callback - function(error, result, body). error contains error, result contains JSON result object and body contains full XML body result

url

property which contains production or sandbox url this module will be connecting to

hash

property which contains current hash which will be sent to Northern for authorization for every request

Usage

var Northern911API = require('northern911-api');

var northern911API = new Northern911API({
  vendorCode: '',   // put your vendor code here
  password: '',     // put your vendor password here
  sandbox: true
});

northern911API.connect(function(error) {
  if (error) {
    return console.error(error);
  }

  northern911API.queryCustomer('6470001234', function(error, result, body) {
    console.log(body);
    console.log();
    console.log(result);

    if (error) {
      console.error(error);
    }
  });
});

For more examples check example.js

Example

node example.js

License

MIT license; see LICENSE.

(c) 2015 by Alexey Novak