postcoder-contact-validation
v1.0.0
Published
Node package to simplify the use of the PostCoder Web API from Allies, which offers real time email address and mobile phone number validation.
Downloads
5
Readme
Postcoder contact validation
Simple node wrapper for email and mobile validation endpoints of the PostCoder Web API from Allies.
Find out more about the email validation API
Find out more about the mobile validation API
Sign up for a trial to get an API key
Note: This is a paid for API
For full developer documentation
Install
npm install postcoder-contact-validation
https://www.npmjs.com/package/postcoder-contact-validation
Basic email validation usage
var contactValidation = require("postcoder-contact-validation");
contactValidation.init("[YOUR API KEY HERE]");
contactValidation.validateEmail("[email protected]", function(result, error) {
if (error) {
console.log(error);
} else {
// returns an object with a Boolean property "valid" along with additional information
console.log(result);
}
});
Full list of response fields for email validation
Basic mobile validation usage
var contactValidation = require("postcoder-contact-validation");
contactValidation.init("[YOUR API KEY HERE]");
contactValidation.validateMobile("+447700900722", function(result, error) {
if (error) {
console.log(error);
} else {
// returns an object with a Boolean property "valid" along with additional information
console.log(result);
}
});
Full list of response fields for mobile validation
Check status of your API key
Returns an object with information about number of credits on your account and more
var address_lookup = require("postcoder-geocoding");
address_lookup.init("[YOUR API KEY HERE]");
address_lookup.checkStatus(function(result, error) {
if (error) {
console.log(error);
} else {
// returns an object with information about number of credits on your account and more
console.log(result);
}
});
Note about support
This is a community supported package, maintained by Stephen Keable