1.0.10 • Published 2 years ago

dotsaddressvalidation3 v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

ParameterTypeValue
BusinessNameStringName of business associated with this address. Used to append Suite data.
Address1StringAddress line of the address to validate. For example, "123 Main Street".
Address2StringThis 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.
CityStringThe 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.
StateStringThe 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.
PostalCodeStringThe 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.
LicenseKeyStringYour license key to use the service.
EnvironmentString"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

ParameterTypeValue
AddressStringAddress line of the address to validate. For example, "123 Main Street".
CityStringThe 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.
StateStringThe 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.
PostalCodeStringThe 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.
LicenseKeyStringYour license key to use the service.
EnvironmentString"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

ParameterTypeValue
Address1StringAddress line of the address to validate. For example, "123 Main Street".
Address2StringThis 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.
Address3StringAny address information that should belong in Address1 or Address2 lines.
Address4StringAny address information that should belong in Address1 or Address2 lines.
Address5StringAny address information that should belong in Address1 or Address2 lines.
Address6StringAny address information that should belong in Address1 or Address2 lines.
CityStringThe 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.
StateStringThe 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.
PostalCodeStringThe 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.
LicenseKeyStringYour license key to use the service.
EnvironmentString"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