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

dotsaddressvalidation3

v1.0.10

Published

Service Objects' USPS CASS Certified™ address validation service matches and corrects mailing addresses using the latest USPS and proprietary data sets available, ensuring your mailing records are always accurate and up-to-date.

Downloads

6

Readme

Service Objects - Address Validation 3

DOTS Address Validation 3 US ("AV3") is designed to take an unstandardized address, validate it against the latest USPS data, and return standardized, deliverable addresses. The service provides corrected information such as the correct street location and zip plus four code, along with parsed address tokens, such as the PMB box number, pre- and post-directionals, county and state codes, and much more.

AV3 can provide instant address verification and correction to websites or enhancement to contact lists. However, the output from AV3 must be considered carefully before the existence or non-existence of an address is decided.

Table of Contents

Getting Started

  1. Create a new Node.js project  

  2. Install the AV3 module

    npm install dotsaddressvalidation3
  3. Load in the module to your project

    var AddressValidation3 = require(dotsaddressvalidation3);
    • Call the getBestMatches() method
    AddressValidation3.getBestMatches(
        BusinessName,
        Address, 
        Address2, 
        City, State, 
        PostalCode, 
        LicenseKey, 
        Environment, 
        function(err, response){...}
    );

    Or

    • Call the getSecondaryNumbers() method
    AddressValidation3.getSecondaryNumbers(
        Address, 
        City, 
        State, 
        PostalCode, 
        LicenseKey, 
        Environment, 
        function(err, response){...}
    );

    Or

    • Call the findAddressLines() method
    AddressValidation3.findAddressLines(
        Address1, 
        Address2, 
        Address3, 
        Address4, 
        Address5, 
        Address6, 
        City, 
        State, 
        PostalCode, 
        LicenseKey, 
        Environment, 
        function(err, response){...}
    );

GetBestMatches

Inputs

| Parameter | Type | Value | | ------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | BusinessName | String | Name of business associated with this address. Used to append Suite data. | | Address1 | String | Address line of the address to validate. For example, "123 Main Street". | | Address2 | String | This line is for address information that does not contribute to DPV coding an address. For example "C/O John Smith" does not help validate the address, but is still useful in delivery. | | City | String | The city of the address to validate. For example, "New York". The city isn't required, but if one is not provided, the Zip code is required. | | State | String | The state of the address to validate. For example, "NY". This does not need to be contracted, Full state names will work as well. The state isn't required, but if one is not provided, the Zip code is required. | | PostalCode | String | The zip code of the address to validate. A zip code isn't required, but if one is not provided, the City and State are required. | | LicenseKey | String | Your license key to use the service. | | Environment | String | "trial" OR "production" |

Response

{
	"Addresses":[{
		"Address1":"String content",
		"Address2":"String content",
		"City":"String content",
		"State":"String content",
		"Zip":"String content",
		"IsResidential":"String content",
		"DPV":"String content",
		"DPVDesc":"String content",
		"DPVNotes":"String content",
		"DPVNotesDesc":"String content",
		"Corrections":"String content",
		"CorrectionsDesc":"String content",
		"BarcodeDigits":"String content",
		"CarrierRoute":"String content",
		"CongressCode":"String content",
		"CountyCode":"String content",
		"CountyName":"String content",
		"FragmentHouse":"String content",
		"FragmentPreDir":"String content",
		"FragmentStreet":"String content",
		"FragmentSuffix":"String content",
		"FragmentPostDir":"String content",
		"FragmentUnit":"String content",
		"Fragment":"String content",
		"FragmentPMBPrefix":"String content",
		"FragmentPMBNumber":"String content"
	}],
	"Error":{
		"Type":"String content",
		"TypeCode":"String content",
		"Desc":"String content",
		"DescCode":"String content"
	},
	"IsCASS":true
}

GetSecondaryNumbers

Inputs

| Parameter | Type | Value | | ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Address | String | Address line of the address to validate. For example, "123 Main Street". | | City | String | The city of the address to validate. For example, "New York". The city isn't required, but if one is not provided, the Zip code is required. | | State | String | The state of the address to validate. For example, "NY". This does not need to be contracted, Full state names will work as well. The state isn't required, but if one is not provided, the Zip code is required. | | PostalCode | String | The zip code of the address to validate. A zip code isn't required, but if one is not provided, the City and State are required. | | LicenseKey | String | Your license key to use the service. | | Environment | String | "trial" OR "production" |

Response

{
	"Address1":"String content",
	"Error":{
		"Type":"String content",
		"TypeCode":"String content",
		"Desc":"String content",
		"DescCode":"String content"
	},
	"City":"String content",
	"State":"String content",
	"Zip":"String content",
	"SecondaryNumbers":["String content"],
	"TotalCount":2147483647
}

FindAddressLines

Inputs

| Parameter | Type | Value | | ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Address1 | String | Address line of the address to validate. For example, "123 Main Street". | | Address2 | String | This line is for address information that does not contribute to DPV coding an address. For example "C/O John Smith" does not help validate the address, but is still useful in delivery. | | Address3 | String | Any address information that should belong in Address1 or Address2 lines. | | Address4 | String | Any address information that should belong in Address1 or Address2 lines. | | Address5 | String | Any address information that should belong in Address1 or Address2 lines. | | Address6 | String | Any address information that should belong in Address1 or Address2 lines. | | City | String | The city of the address to validate. For example, "New York". The city isn't required, but if one is not provided, the Zip code is required. | | State | String | The state of the address to validate. For example, "NY". This does not need to be contracted, Full state names will work as well. The state isn't required, but if one is not provided, the Zip code is required. | | PostalCode | String | The zip code of the address to validate. A zip code isn't required, but if one is not provided, the City and State are required. | | LicenseKey | String | Your license key to use the service. | | Environment | String | "trial" OR "production" |

Response

{
	"Error":{
		"Type":"String content",
		"TypeCode":"String content",
		"Desc":"String content",
		"DescCode":"String content"
	},
	"BestAddress1":"String content",
	"BestAddress2":"String content",
	"City":"String content",
	"State":"String content",
	"PostalCode":"String content"
}

Features

For trial keys, set the Environment variable to "trial". Once you purchase a production license key, swap the Environment variable to "production" and change out your LicenseKey to your new license key.

The module automatically handles failover logic when using the production environment. This helps to ensure your web service requests are made sucessfully regardless of any network interuptions.

Developer Guide

For a deeper dive into our API, visit our developer guides.

Developer Guide

License Key

If you’re ready to put it to the test, sign up for a free API trial key and get 500 free transactions.

Request a Trial Key