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
Maintainers
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
Create a new Node.js project
Install the AV3 module
npm install dotsaddressvalidation3
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){...} );
- Call the
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