dotsaddressvalidationinternational
v1.0.9
Published
The DOTS Address Validation International API service verifies and corrects global mailing addresses to the unique requirements of each country’s postal address formats and cultural idiosyncrasies.
Downloads
6
Maintainers
Readme
Service Objects - Address Validation International
Our real-time International Address Validation (AVI) API service verifies and corrects global mailing addresses to the unique requirements of each country’s postal address formats and cultural idiosyncrasies. With continual updates from country-specific postal authorities, our data is always up-to-date with genuine and accurate addresses.
Table of Contents
Getting Started
Create a new Node.js project
Install the AVI module
npm install dotsaddressvalidationinternational
Load in the module to your project
var AddressValidationInternational = require(dotsaddressvalidationinternational);
Call the
getAddressInfo()
methodAddressValidationInternational.getAddressInfo( Address1, Address2, Address3, Address4, Address5, Locality, AdministrativeArea, PostalCode, Country, OutputLanguage, LicenseKey, Environment, function(err, response){...} );
GetAddressInfo
Inputs
| Parameter | Type | Required | Value | | ------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Address1 | String | Yes | Address Line 1 of the International Address | | Address2 | String | No | Address Line 2 of the International Address | | Address3 | String | No | Address Line 3 of the International Address | | Address4 | String | No | Address Line 4 of the International Address | | Address5 | String | No | Address Line 5 of the International Address | | Locality | String | Yes* | The name of the distinct population cluster, such as a City, Town or other type of Municipality. | | AdministrativeArea | String | Yes* | The name of the administrative division. Commonly the primary division of a country, such as a State, Region, Province, County, Territory or Prefecture. | | PostalCode | String | Yes** | The postal code of the international address. It is recommended that the postal code be formatted to contain a strong resemblance to the proper country specific format, and that you do not precede the postal code with a country or region code. For example, use '09170' instead of 'FR-9170'. | | Country | String | Yes | The preferred name of the country or the ISO 3166-1 Alpha-2 Country Code or the Alpha-3 Country Code. Alternate country names and spellings are supported, but the use of the common English spelled name or ISO2 country code is recommended. For a list of all supported countries please see the Country Support Table. | | OutputLanguage | String | Yes | Specifies service language settings and behavior (ENGLISH, BOTH, LOCAL, LOCAL_ROMAN) | | LicenseKey | String | Yes | Your license key to use the service. | | Environment | String | Yes | "trial" OR "production" |
* Required if a postal code is not provided.
** Required if a locality and an administrative area are not provided.
Response
{
"AddressInfo":{
"Status":"String content",
"ResolutionLevel":"String content",
"Address1":"String content",
"Address2":"String content",
"Address3":"String content",
"Address4":"String content",
"Address5":"String content",
"Address6":"String content",
"Address7":"String content",
"Address8":"String content",
"Locality":"String content",
"AdministrativeArea":"String content",
"PostalCode":"String content",
"Country":"String content",
"CountryISO2":"String content",
"CountryISO3":"String content",
"InformationComponents":[{
"Name":"String content",
"Value":"String content"
}]
},
"Error":{
"Type":"String content",
"TypeCode":"String content",
"Desc":"String content",
"DescCode":"String content"
},
"Debug":"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