SmartyStreets.verifyAddress()

Verify one or more addresses using the SmartyStreets API

Read the docs here: https://smartystreets.com/docs/address

Usage

Hover over inputs/exits for more info.

var SmartyStreets = require('machinepack-smartystreets');


// Verify one or more addresses using the SmartyStreets API

SmartyStreets.verifyAddress({

authId: 'ffffffff-1111-37f9-aaa2-abcdefghijkl',

authToken: 'ljadfolaj2lkjasdiosadfhlksdalkdasjfsdlkfjklsjf8yoihaksdfh/USDF',

street: '123 Main Street',

input_id: 'address-123',

street2: 'North',

secondary: 'Suite 2A',

city: 'Doylestown',

state: 'PA or Pennsylvania',

zipcode: '18901',

lastline: 'Doylestown, PA 18901',

addressee: 'Jane Doe',

urbanization: 'San Juan',

candidates: '1, 5, or 10 (max value)',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

authId required

Your SmartyStreet Auth ID

'ffffffff-1111-37f9-aaa2-abcdefghijkl'
authToken required

Your SmartyStreet Auth Token

'ljadfolaj2lkjasdiosadfhlksdalkdasjfsdlkfjklsjf8yoihaksdfh/USDF'
street required

The street line of the address, or an entire address

'123 Main Street'
input_id

A unique identifier for this address used in your application; this field will be copied into the output.

'address-123'
street2

Any extra address information

'North'
secondary

Apartment, suite, or office number

'Suite 2A'
city

The city name

'Doylestown'
state

The state name or abbreviation

'PA or Pennsylvania'
zipcode

The ZIP Code

'18901'
lastline

City, state, and ZIP Code combined

'Doylestown, PA 18901'
addressee

The name of the recipient, firm, or company at this address

'Jane Doe'
urbanization

Only used in Puerto Rico

'San Juan'
candidates

The maximum number of valid addresses returned when the input is ambiguous

'1, 5, or 10 (max value)'

Exits

error

An unexpected error occurred.

success

OK.