Postal Address Verification API
VerifyAddressAdvanced
VerifyAddressAdvanced
is an advanced version of the VerifyAddress
method. It provides additional information or multiple matches if available.
Endpoint
POST:https://pav3.esendex.us/PavService.svc/VerifyAddressAdvanced
Syntax
VerifyAddressAdvanced(Request)
Request Parameters
Parameter Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
Request | Request object. | PavRequest | True | |
LicenseKey | Your license key. | String | True | 00000000-0000-0000-0000-000000000000 |
Response
Returns: PavResponse
object
Code Samples
You can use any programming language you want with our API, as long as it can make a REST or SOAP call. Here are examples for some of the most common platforms.
C#
// https://pav3.esendex.us/PavService.svc?wsdl was added as a Service Reference and given the name WSDL
using System;
using WSDL;
var config = PavServiceClient.EndpointConfiguration.pavws_secure;
var client = new PavServiceClient(config);
var request = new PavRequest
{
LicenseKey = "YOUR_LICENSE_KEY",
FirmOrRecipient = "Esendex",
PrimaryAddressLine = "505 Independence Parkway",
SecondaryAddressLine = "Suite 300",
CityName = "Chesapeake",
State = "VA",
ZipCode = "23320",
ReturnCaseSensitive = true,
ReturnCensusInfo = true,
ReturnCityAbbreviation = true,
ReturnGeoLocation = true,
ReturnLegislativeInfo = true,
ReturnMailingIndustryInfo = true,
ReturnResidentialIndicator = true,
ReturnStreetAbbreviated = true
};
var response = await client.VerifyAddressAdvancedAsync(request);
var returnCodeDescription = response.ReturnCode switch
{
1 => "Invalid input",
2 => "Invalid license key",
10 => "Input address is not found",
100 => "Input address is DPV-confirmed for all components",
101 => "Input address is found, but not DPV-confirmed",
102 => "Input address primary number is DPV-confirmed, secondary number is present but not DPV-confirmed",
103 => "Input address primary number is DPV-confirmed, secondary number is missing",
200 => "Canadian address on input, verified on city level only",
_ => "Unknown return code"
};
Console.WriteLine($"Return Code: {response.ReturnCode} - {returnCodeDescription}");
Console.WriteLine(
response.FirmOrRecipient + "\n" +
response.PrimaryDeliveryLine + "\n" +
response.CityName + ", " +
response.StateAbbreviation + " " +
response.ZipCode + "\n" +
response.Country);
Console.ReadLine();
JavaScript
const body = JSON.stringify({
'FirmOrRecipient': 'Esendex',
'PrimaryAddressLine': '505 Independence Parkway',
'SecondaryAddressLine': 'Suite 300',
'CityName': 'Chesapeake',
'State': 'VA',
'ZipCode': '23320',
'LicenseKey': '00000000-0000-0000-0000-000000000000',
'ReturnCaseSensitive': true,
'ReturnCensusInfo': true,
'ReturnCityAbbreviation': true,
'ReturnGeoLocation': true,
'ReturnLegislativeInfo': true,
'ReturnMailingIndustryInfo': true,
'ReturnResidentialIndicator': true,
'ReturnStreetAbbreviated': true
});
const url = 'https://pav3.esendex.us/PavService.svc/VerifyAddressAdvanced';
const options = {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body,
method: 'POST'
};
const response = await fetch(url, options);
const json = await response.json();
console.log(json);
JSON Response
{
"CensusInfo": {
"CMSA": "545",
"CensusBlockNumber": "1029",
"CensusTractNumber": "0209.06",
"FIPS": "51550",
"MA": "572",
"MSA": "47260",
"PMSA": ""
},
"CityName": "Chesapeake",
"Country": "USA",
"County": "CHESAPEAKE CITY",
"CountyNum": "550",
"FinanceNumber": "511750",
"FirmOrRecipient": "ESENDEX",
"GeoLocationInfo": {
"AreaCode": "757",
"AvgLatitude": "36.761033",
"AvgLongitude": "-76.256341",
"FromLatitude": "36.716751",
"FromLongitude": "-76.300819",
"HasDaylightSavings": "true",
"TimeZone": "EST",
"ToLatitude": "36.810799",
"ToLongitude": "-76.098457"
},
"IntelligentMailBarcodeKey": "qYrQyEIHfPxDYUBTTnxyiQ==",
"LegislativeInfo": {
"CongressionalDistrictNumber": "03",
"StateLegislativeLower": "078",
"StateLegislativeUpper": "005"
},
"MailingIndustryInfo": {
"CSKey": "X26324",
"CarrierRoute": "C064",
"CheckDigit": "7",
"DefaultFlag": "false",
"DeliveryPoint": "75",
"DpvConfirmationIndicator": "Y",
"DpvCrmaIndicator": "N",
"DpvFootnote1": "AA",
"DpvFootnote2": "BB",
"DpvFootnote3": "",
"DpvFootnote4": "",
"DpvFootnote5": "",
"DpvNoStatIndicator": "N",
"DpvVacantIndicator": "N",
"ELOTAscDesc": "A",
"ELOTSequenceNumber": "0182",
"EwsFlag": "false",
"LACSFlag": "",
"LACSIndicator": "",
"LACSReturnCode": "",
"RecordTypeCode": "H",
"SuiteLinkReturnCode": ""
},
"MultipleMatches": [],
"PMBDesignator": "",
"PMBNumber": "",
"PostDirectional": "",
"PostnetBarcode": "f233205178757f",
"PreDirectional": "",
"PreferredCityName": "Chesapeake",
"Primary": "505",
"PrimaryDeliveryLine": "505 Independence Pkwy Ste 300",
"PrimaryEO": "O",
"PrimaryHigh": "505",
"PrimaryLow": "505",
"ResidentialDeliveryIndicator": "N",
"ReturnCode": "100",
"Secondary": "300",
"SecondaryAbbreviation": "STE",
"SecondaryDeliveryLine": "",
"SecondaryEO": "E",
"SecondaryHigh": "300",
"SecondaryLow": "300",
"StateAbbreviation": "VA",
"StreetName": "INDEPENDENCE",
"Suffix": "PKWY",
"Urbanization": "",
"ZipCode": "23320-5178"
}
PHP with cURL
<?php
// Request parameters in JSON format
$json = '{
"CityName":"Chesapeake"
,"FirmOrRecipient":""
,"LicenseKey":"(Your Key)"
,"PrimaryAddressLine":"2125 Smith Ave"
,"SecondaryAddressLine":""
,"State":"VA"
,"Urbanization":""
,"ZipCode":"23320"
}';
// Method
$url = 'https://pav3.esendex.us/PavService.svc/VerifyAddressAdvanced';
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, $url);
curl_setopt($cURL, CURLOPT_POST, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $json);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));
// If you want your results in XML format, use the following line for your HTTP headers and comment out the HTTP headers code line above.
// curl_setopt($cURL, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($cURL);
curl_close($cURL);
print_r($result);
?>
Python
import httpx
headers = {"Accept": "application/json"}
url = "https://pav3.esendex.us/PavService.svc/VerifyAddressAdvanced"
request = {
"FirmOrRecipient": "Esendex",
"PrimaryAddressLine": "505 Independence Parkway",
"SecondaryAddressLine": "Suite 300",
"CityName": "Chesapeake",
"State": "VA",
"ZipCode": "23320",
"LicenseKey": "00000000-0000-0000-0000-000000000000",
"ReturnCaseSensitive": True,
"ReturnCensusInfo": True,
"ReturnCityAbbreviation": True,
"ReturnGeoLocation": True,
"ReturnLegislativeInfo": True,
"ReturnMailingIndustryInfo": True,
"ReturnResidentialIndicator": True,
"ReturnStreetAbbreviated": True
}
with httpx.Client(headers=headers) as client:
response = client.post(url=url, json=request)
response.raise_for_status()
print(response.json())
Ruby
require 'json'
require 'net/http'
headers = { Accept: 'application/json', 'Content-Type': 'application/json' }
uri = URI('https://pav3.esendex.us/PavService.svc/VerifyAddressAdvanced')
data = {
'FirmOrRecipient': 'Esendex',
'PrimaryAddressLine': '505 Independence Parkway',
'SecondaryAddressLine': 'Suite 300',
'CityName': 'Chesapeake',
'State': 'VA',
'ZipCode': '23320',
'LicenseKey': '00000000-0000-0000-0000-000000000000',
'ReturnCaseSensitive': true,
'ReturnCensusInfo': true,
'ReturnCityAbbreviation': true,
'ReturnGeoLocation': true,
'ReturnLegislativeInfo': true,
'ReturnMailingIndustryInfo': true,
'ReturnResidentialIndicator': true,
'ReturnStreetAbbreviated': true
}.to_json
response = Net::HTTP.post(uri, data, headers)
raise response.message if response.is_a?(Net::HTTPClientError) || response.is_a?(Net::HTTPServerError)
puts JSON.parse(response.body)
XML Response
<PavResponse xmlns="pav3.esendex.us" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CensusInfo>
<CMSA>545</CMSA>
<CensusBlockNumber>1029</CensusBlockNumber>
<CensusTractNumber>0209.06</CensusTractNumber>
<FIPS>51550</FIPS>
<MA>572</MA>
<MSA>47260</MSA>
<PMSA/>
</CensusInfo>
<CityName>Chesapeake</CityName>
<Country>USA</Country>
<County>CHESAPEAKE CITY</County>
<CountyNum>550</CountyNum>
<FinanceNumber>511750</FinanceNumber>
<FirmOrRecipient>ESENDEX</FirmOrRecipient>
<GeoLocationInfo>
<AreaCode>757</AreaCode>
<AvgLatitude>36.761033</AvgLatitude>
<AvgLongitude>-76.256341</AvgLongitude>
<FromLatitude>36.716751</FromLatitude>
<FromLongitude>-76.300819</FromLongitude>
<HasDaylightSavings>true</HasDaylightSavings>
<TimeZone>EST </TimeZone>
<ToLatitude>36.810799</ToLatitude>
<ToLongitude>-76.098457</ToLongitude>
</GeoLocationInfo>
<IntelligentMailBarcodeKey>qYrQyEIHfPxDYUBTTnxyiQ==</IntelligentMailBarcodeKey>
<LegislativeInfo>
<CongressionalDistrictNumber>03</CongressionalDistrictNumber>
<StateLegislativeLower>078</StateLegislativeLower>
<StateLegislativeUpper>005</StateLegislativeUpper>
</LegislativeInfo>
<MailingIndustryInfo>
<CSKey>X26324</CSKey>
<CarrierRoute>C064</CarrierRoute>
<CheckDigit>7</CheckDigit>
<DefaultFlag>false</DefaultFlag>
<DeliveryPoint>75</DeliveryPoint>
<DpvConfirmationIndicator>Y</DpvConfirmationIndicator>
<DpvCrmaIndicator>N</DpvCrmaIndicator>
<DpvFootnote1>AA</DpvFootnote1>
<DpvFootnote2>BB</DpvFootnote2>
<DpvFootnote3/>
<DpvFootnote4/>
<DpvFootnote5/>
<DpvNoStatIndicator>N</DpvNoStatIndicator>
<DpvVacantIndicator>N</DpvVacantIndicator>
<ELOTAscDesc>A</ELOTAscDesc>
<ELOTSequenceNumber>0182</ELOTSequenceNumber>
<EwsFlag>false</EwsFlag>
<LACSFlag/>
<LACSIndicator/>
<LACSReturnCode/>
<RecordTypeCode>H</RecordTypeCode>
<SuiteLinkReturnCode/>
</MailingIndustryInfo>
<MultipleMatches i:nil="true"/>
<PMBDesignator/>
<PMBNumber/>
<PostDirectional/>
<PostnetBarcode>f233205178757f</PostnetBarcode>
<PreDirectional/>
<PreferredCityName>Chesapeake</PreferredCityName>
<Primary>505</Primary>
<PrimaryDeliveryLine>505 Independence Pkwy Ste 300</PrimaryDeliveryLine>
<PrimaryEO>O</PrimaryEO>
<PrimaryHigh>505</PrimaryHigh>
<PrimaryLow>505</PrimaryLow>
<ResidentialDeliveryIndicator>N</ResidentialDeliveryIndicator>
<ReturnCode>100</ReturnCode>
<Secondary>300</Secondary>
<SecondaryAbbreviation>STE</SecondaryAbbreviation>
<SecondaryDeliveryLine/>
<SecondaryEO>E</SecondaryEO>
<SecondaryHigh>300</SecondaryHigh>
<SecondaryLow>300</SecondaryLow>
<StateAbbreviation>VA</StateAbbreviation>
<StreetName>INDEPENDENCE</StreetName>
<Suffix>PKWY</Suffix>
<Urbanization/>
<ZipCode>23320-5178</ZipCode>
</PavResponse>
Let’s start sending, together.