Postal Address Verification API

METHODS

GetCityNamesForZipCode

The GetCityNamesForZipCode method returns all possible city names for a given ZIP Code.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetCityNamesForZipCode?ZipCode={ZIPCODE}&LicenseKey={LICENSEKEY}

Syntax

GetCityNamesForZipCode(ZipCode, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
ZipCodeZIP Code.StringTrue02861
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: CityNamesResponse object

GetCongressionalDistrictByZip

The GetCongressionalDistrictByZip method returns the Congressional District data for a given ZIP Code.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetCongressionalDistrictByZip?ZipCode={ZIPCODE}&LicenseKey={LICENSEKEY}

Syntax

GetCongressionalDistrictByZip(ZipCode, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
ZipCodeZIP Code.StringTrue23320
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: CongressionalDistrictResponse object

GetIntelligentMailBarcode

The GetIntelligentMailBarcode method returns Intelligent Mail Barcode data using the key obtained from the VerifyAddressAdvanced method.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetIntelligentMailBarcode?BarcodeIdentifier={BARCODEIDENTIFIER}&ServiceTypeIdentifier={SERVICETYPEIDENTIFIER}&MailerIdentifier={MAILERIDENTIFIER}&SerialNumber={SERIALNUMBER}&IntelligentMailBarcodeKey={INTELLIGENTMAILBARCODEKEY}&LicenseKey={LICENSEKEY}

Syntax

GetIntelligentMailBarcode(BarcodeIdentifier, ServiceTypeIdentifier, MailerIdentifier, SerialNumber, IntelligentMailBarcodeKey, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
BarcodeIdentifierBarcode identifier. (Consult USPS.com for more info.)StringTrue
ServiceTypeIdentifierService type identifier (STID). (Consult USPS.com for more info.)StringTrue
MailerIdentifierMailer identifier (assigned by USPS).StringTrue
SerialNumberSerial number. (Consult USPS.com for more info.)StringTrue
IntelligentMailBarcodeKeyBarcode key returned from calling VerifyAddressAdvanced method.StringTrue
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: IntelligentBarcodeResponse object

GetUrbanizationListForZipCode

The GetUrbanizationListForZipCode method returns all possible urbanization names for a given ZIP Code. (Urbanization names are used for addresses in Puerto Rico only.)

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetUrbanizationListForZipCode?ZipCode={ZIPCODE}&LicenseKey={LICENSEKEY}

Syntax

GetUrbanizationListForZipCode(ZipCode, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
ZipCodeZIP Code.StringTrue00956
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: UrbanizationResponse object

GetZipCodesForCityAndState

The GetZipCodesForCityAndState method returns all possible ZIP Codes for a given city/state combination.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetZipCodesForCityAndState?City={CITY}&State={STATE}&LicenseKey={LICENSEKEY}

Syntax

GetZipCodesForCityAndState(City, State, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
CityCity name.StringTrueChesapeake
StateTwo-letter state name abbreviation.StringTrueVA
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: ZipCodesResponse object

GetZipCodesForFips

The GetZipCodesForFips method returns all ZIP Codes within a given FIPS (Federal Information Processing Standard) code.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetZipCodesForFips?Fips={FIPS}&LicenseKey={LICENSEKEY}

Syntax

GetZipCodesForFips(Fips, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
FipsFIPS code that represents the area or county of interest.StringTrue51550
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: ZipCodesResponse object

GetZipCodesWithinDistance

The GetZipCodesWithinDistance method returns all ZIP Codes within a radius around a given latitude/longitude geolocation.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/GetZipCodesWithinDistance?Latitude={LATITUDE}&Longitude={LONGITUDE}&Radius={RADIUS}&LicenseKey={LICENSEKEY}

Syntax

GetZipCodesWithinDistance(Latitude, Longitude, Radius, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
LatitudeLatitude coordinate from -179.2311 to 179.8597.StringTrue36.763075
LongitudeLongitude coordinate from 17.8315 to 71.4411.StringTrue-76.258473
RadiusRadius in miles. (The maximum is 50.)StringTrue2.1
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: ZipCodesResponse object

VerifyAddress

Use the VerifyAddress method to verify and correct a given address. This method provides a single “best” match. Use VerifyAddressAdvanced to get all possible matches.

Endpoint

GET:
https://pav3.esendex.us/PavService.svc/VerifyAddress?FirmOrRecipient={FIRMORRECIPIENT}&PrimaryAddressLine={PRIMARYADDRESSLINE}&SecondaryAddressLine={SECONDARYADDRESSLINE}&Urbanization={URBANIZATION}&CityName={CITYNAME}&State={STATE}&ZipCode={ZIPCODE}&LicenseKey={LICENSEKEY}

Syntax

VerifyAddress(FirmOrRecipient, PrimaryAddressLine, SecondaryAddressLine, Urbanization, CityName, State, ZipCode, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
FirmOrRecipientFirm name or recipient.StringFalseEsendex
PrimaryAddressLineFirst line of the address.StringTrue505 Independence Parkway
SecondaryAddressLineSecond line of the address.StringFalseSuite 300
UrbanizationUrbanization name (used in Puerto Rico only).StringFalseBOSQUE DE LAS FLORES
CityNameCity name.StringTrueChesapeake
StateThe state or 2-character state abbreviation.StringTrueVA
ZipCode5-digit ZIP Code.StringFalse23320
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: Address object

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 NameDescriptionData TypeRequiredSample Value
RequestRequest object.PavRequestTrue
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: PavResponse object

TYPES

Address

This response is returned by the VerifyAddress method.

Type Properties

Property NameDescriptionData TypeSample
CityNameThe preferred city name for the address.StringChesapeake
CountryThe address country.StringUSA
CountyThe name of the county or parish in which the 5-digit ZIP Code resides.StringCHESAPEAKE CITY
FirmNameOrRecipientThe building or firm recipient name when available.StringESENDEX
PrimaryAddressLineThe corrected primary delivery address.String505 Independence Pkwy Ste 300
ReturnCodeReturn status of the method call.ValueDescription1Invalid input2Invalid license key10Input address is not found100Input address is DPV-confirmed for all components101Input address is found, but not DPV-confirmed102Input address primary number is DPV-confirmed, secondary number is present but not DPV-confirmed103Input address primary number is DPV-confirmed, secondary number is missing200Canadian address on input, verified on city level onlyInteger100
SecondaryAddressLineSecondary delivery address line (if applicable).String
StateAbbreviationThe 2-letter state abbreviation.StringVA
UrbanizationThe urbanization name (used in Puerto Rico only).StringLOMAS VERDES
ZipCodeThe corrected ZIP Code or Zip+4 (if available).String23320

AddressInfo

This data is included in the PavResponse data type.

Type Properties

Property NameDescriptionData TypeSample
CarrierRouteA 4-character code assigned to a mail delivery or collection route within a 5-digit ZIP Code.StringC064
FinanceNumberUSPS Finance Number for the address.String511750
FirmBuilding or firm recipient name (if available).String
Plus4HighThe high-end ZIP add-on in a range of Zip+4 codes.String5178
Plus4LowThe low-end ZIP add-on in a range of Zip+4 codes.String5178
PostDirectionalDirection designation after suffix (if available). Ex: N, S, E, WString
PreDirectionalDirection designation. Ex: N, S, E, WString
PrimaryEOCode identifying if Post Office considers address even, odd or both.ValueDescriptionOOddEEvenBBothStringO
PrimaryHighHigh-end address of range of addresses.String505
PrimaryLowLow-end address of range of addresses.String505
RecordTypeCodeType of record.ValueDescriptionFFirmGGeneral DeliveryHHigh-RisePP.O. BoxRRural Route/Highway ContractSStreetStringH
SecondaryAbbreviationAbbreviation for apartment, suite, or trailer number (if applicable).StringSTE
SecondaryEOCode for secondary addressValueDescriptionOOddEEvenBBothStringE
SecondaryHighSecondary high-end address of range of addresses.String300
SecondaryLowSecondary low-end address of range of addresses.String300
StreetNameStreet name.StringINDEPENDENCE
SuffixAddress suffix component. Ex: AVE, LN, DRIVE, STREET, RDStringPKWY
ZipCodeZIP Code.String23320

CensusInfo

This data is included in the PavResponse data type.

Type Properties

Property NameDescriptionData TypeSample
CensusBlockNumberCensus Block Number.String1029
CensusTractNumberCensus Tract Number.String0209.06
CMSAUS Census Consolidated Metropolitan Statistical Area.String545
FIPSFederal Information Processing Standard Code.String51550
MAMetropolitan Area.String572
MSAUS Census Metropolitan Statistical Area.String47260
PMSAUS Census Primary Metropolitan Statistical Area.String

City

This data is included in the CityNamesResponse data type.

Type Properties

Property NameDescriptionData TypeSample
IsDefaultIndicates whether this city name is the preferred city name.BooleanTrue
IsMailingSpecifies whether or not the city state name can be used as a last line of address on a mail piece.BooleanTrue
NameThe city name.StringCHESAPEAKE

CityNamesResponse

This response is returned by the GetCityNamesForZipCode method.

Type Properties

Property NameDescriptionData TypeSample
CityNamesDetails of city names.Array of City objects
ReturnCodeReturn status of the method call.ValueDescription0Success1Invalid input2Invalid license key3No matchInteger0

CongressionalDistrictResponse

This response is returned by the GetCongressionalDistrictByZip method.

Type Properties

Property NameDescriptionData TypeSample
CongressionalDistrictA standard value identifying a geographic area within the United States served by a member of the U.S. House of Representatives.String02
ReturnCodeReturn status of the method call.ValueDescription0Success1Invalid input2Invalid license key3No match4Multiple matchesInteger0

GeoLocationInfo

This data is included in the PavResponse data type.

Type Properties

Property NameDescriptionData TypeSample
AreaCodeArea Code.String757
AvgLatitudeAverage latitude position for address.String36.761033
AvgLongitudeAverage longitude position for address.String-76.256341
FromLatitudeThe ‘from’ latitude.String36.716751
FromLongitudeThe ‘from’ longitude.String-76.300819
HasDaylightSavingsWhether the address location recognizes Daylight Savings Time.BooleanTrue
TimeZoneTime zone for area.ValueDescriptionESTEastern Standard TimeCSTCentral Standard TimeMSTMountain Standard TimePSTPacific Standard TimePST-1Pacific Standard Time -1 hour (Alaska)PST-2Pacific Standard Time -2 hours (Hawaii)EST+1Eastern Standard Time +1 hour (Puerto Rico)StringEST
ToLatitudeThe ‘to’ latitude.String36.810799
ToLongitudeThe ‘to’ longitude.String-76.098457

IntelligentBarcodeResponse

This response is returned by the GetIntelligentMailBarcode method.

Type Properties

Property NameDescriptionData TypeSample
BarcodeIntelligent Mail Barcode string.String
ReturnCodeReturn status of the method call.ValueDescription0Success1Invalid inputInteger0

LegislativeInfo

This data is included in the PavResponse data type.

Type Properties

Property NameDescriptionData TypeSample
CongressionalDistrictNumberCongressional District Number.String03
StateLegislativeLowerLower Legislative District for the address (i.e. House).String078
StateLegislativeUpperUpper Legislative District for the address (i.e. Senate).String005

MailingIndustryInfo

This data is included in the PavResponse data type.

Type Properties

Property NameDescriptionData TypeSample
CSKeyStringX26324
CarrierRouteA 4-character code assigned to a mail delivery or collection route within a 5-digit ZIP Code.StringC064
CheckDigitDigit used in PostNet Barcode.String7
DefaultFlagDefault flag.Booleanfalse
DeliveryPointDelivery Point.String75
DpvConfirmationIndicatorDPV indicator.ValueDescription<empty string>Address not presented to DPV (means address was not found in USPS database)NAddress is not DPV-confirmedYAddress is DPV-confirmedDPrimary number is DPV-confirmed, but secondary is not presentSPrimary number is DPV-confirmed, secondary number is present but not DPV-confirmedStringY
DpvCrmaIndicatorCRMA (‘Y’ or ‘N’).StringN
DpvFootnote1Address matching footnote.ValueDescriptionAAaddress is matched to zip4A1address is not matched to zip4StringAA
DpvFootnote2Address matching footnote.ValueDescriptionBBAddress is matched to DPV (all components)CCPrimary number is matched to DPV, secondary is present but matchedN1Primary number is matched to DPV, secondary is missingM1Primary number is missingM3Primary number is invalidU1Address is matched to unique ZIP CodeF1Address is matched to military addressG1Address is matched to general delivery addressP1Address PO, RR, or HC Box number is missingP3Address PO, RR, or HC Box number is invalidStringBB
DpvFootnote3Address matching footnote.ValueDescriptionRRaddress matched to CMRA with secondary presentR1address matched to CMRA with secondary not presentString
DpvFootnote4Address matching footnote.String
DpvFootnote5Address matching footnote.String
DpvNoStatIndicator‘Y’ or ‘N’StringN
DpvVacantIndicator‘Y’ or ‘N’StringN
ELOTAscDesceLOT ascending/descending code.ValueDescriptionAAscendingBDescendingStringA
ELOTSequenceNumbereLOT sequence number.String0185
EwsFlageLOT sequence number.ValueDescriptionYaddress is in early warning system databaseNaddress is not in EWS<empty string>not presented to EWSBooleanfalse
LACSFlagY – address has been converted by LACS.String
LACSIndicatorL – input address has been matched to ‘L’ marked record.String
LACSReturnCodeLACS return code.String
RecordTypeCodeType of record.ValueDescriptionFFirmGGeneral DeliveryHHigh-RisePP.O. BoxRRural Route/Highway ContractSStreetStringH
SuiteLinkReturnCodeSuiteLink return code.String

PavRequest

This type is used as a parameter in the VerifyAddressAdvanced method. The Return* properties are optional and available for U.S. addresses only. When verifying Canadian addresses, optional parameters that are set to True will return null values.

Type Properties

Property NameDescriptionData TypeSample
CityNameCity name.StringChesapeake
FirmOrRecipientFirm or recipient.StringEsendex
LicenseKeyYour license key.String00000000-0000-0000-0000-000000000000
PrimaryAddressLinePrimary address line (address number and street name).String505 Independence Parkway
ReturnCaseSensitiveSet to true to DISABLE the default behavior of returning the street name in ALL CAPS.BooleanTrue
ReturnCensusInfoSet to true to include CensusInfo in the response.BooleanTrue
ReturnCityAbbreviationSet to true to return the abbreviated city name in the response.BooleanTrue
ReturnGeoLocationSet to true to include GeoLocationInfo in the response.BooleanTrue
ReturnLegislativeInfoSet to true to include LegislativeInfo in the response.BooleanTrue
ReturnMailingIndustryInfoSet to true to include MailingIndustryInfo in the response.BooleanTrue
ReturnResidentialIndicatorSet to true to include ResidentialDeliveryIndicator in the response.BooleanTrue
ReturnStreetAbbreviationSet to true to return the abbreviated street name (if available).BooleanTrue
SecondaryAddressLineSecondary address line.StringSuite 300
StateState.StringVA
UrbanizationUrbanization name (used in Puerto Rico only).StringBOSQUE DE LAS FLORES
ZipCodeZIP code.String23320

PavResponse

This data response is returned by the VerifyAddressAdvanced method.

Type Properties

Property NameDescriptionData TypeSample
CensusInfoCensus information.CensusInfo
CityNameAddress city.StringChesapeake
CountryAddress country.StringUSA
CountyThe name of the county or parish in which the 5-digit ZIP Code resides.StringCHESAPEAKE CITY
CountyNumThe Federal Information Processing Standard (FIPS) code assigned to a given county or parish within a state.String550
FinanceNumberUSPS Finance Number for the address.String511750
FirmOrRecipientBuilding or firm recipient name (if available).StringESENDEX
GeoLocationInfoGeolocation information.GeoLocationInfo
IntelligentMailBarcodeKeyA key that can be used to obtain Intelligent Mail Barcode using GetIntelligentMailBarcode method.StringHM3NbwIHnfyeFkCrFAClmA==
LegislativeInfoLegislative information.LegislativeInfo
MailingIndustryInfoMailing industry information.MailingIndustryInfo
MultipleMatchesAddress information.Array of AddressInfo objects
PMBDesignatorPrivate Mail Box (PMB) designator.String
PMBNumberPrivate Mail Box (PMB) number.String
PostDirectionalDirection designation after suffix (if available). Ex: N, S, E, W.String
PostnetBarcodeAddress Bar Code.Stringf233205178757f
PreDirectionalDirection designation. Ex: N, S, E, WString
PreferredCityNameThe preferred City name.StringChesapeake
PrimaryPrimary street house number.String505
PrimaryDeliveryLineCorrected delivery address.String505 Independence Pkwy Ste 300
PrimaryEOCode identifying if Post Office considers address even, odd or both.ValueDescriptionOOddEEvenBBothStringO
PrimaryHighHigh-end address of range of addresses.String505
PrimaryLowLow-end address of range of addresses.String505
ResidentialDeliveryIndicatorWhether the address is residential or commercial.ValueDescriptionYAddress is residentialNAddress is commercialStringN
ReturnCodeReturn status of the method call.ValueDescription1Invalid input2Invalid license key10Address is not found100Address is DPV-confirmed for all components101Address is found, but not DPV-confirmed102Address primary number is DPV-confirmed, secondary number is present but not DPV-confirmed103Address primary number is DPV-confirmed, secondary number is missing200Canadian address on input, Verified on City level onlyInteger100
SecondaryCode that describes an apartment, room, suite, space, floor, or other secondary addressing numeric or alphanumeric that follows a street address.String300
SecondaryAbbreviationAbbreviation for apartment, suite, or trailer number (if applicable). (Note: Values listed here with an asterisk do not require a secondary range number to follow.)ValueDescriptionAPTAPARTMENTBSMTBASEMENT *BLDGBUILDINGDEPTDEPARTMENTFLFLOORFRNTFRONT *HNGRHANGARLBBYLOBBY *LOTLOTLOWRLOWER *OFCOFFICE *PHPENTHOUSE *PIERPIERREARREAR *RMROOMSIDESIDE *SLIPSLIPSPCSPACESTOPSTOPSTESUITETRLRTRAILERUNITUNITUPPRUPPER *StringSTE
SecondaryDeliveryLineSecondary delivery address lineString
SecondaryEOCode identifying if Post Office considers secondary address even, odd or both.ValueDescriptionOOddEEvenBBothStringE
SecondaryHighSecondary high-end address of range of addresses.String300
SecondaryLowSecondary low-end address of range of addresses.String300
StateAbbreviationThe 2-character state abbreviation.StringVA
StreetNameStreet name.StringINDEPENDENCE
SuffixThe address suffix component. Ex: AVE, LN, DRIVE, STREET, RDStringPKWY
UrbanizationAddress urbanization (used in Puerto Rico only).StringLOMAS VERDES
ZipCodeZIP Code.String23320-5178

UrbanizationResponse

This response is returned by the GetUrbanizationListForZipCode method.

Type Properties

Property NameDescriptionData TypeSample
ReturnCodeReturn status of the method call.ValueDescription0Success1Invalid input2Invalid license key3No matchInteger0
UrbanizationListOne or more Urbanization names.Array of String valuesALTS DE BAYAMON, BOSQUE DE LAS FLORES, URB AGUSTIN STAHL

ZipCodesResponse

This response is returned by the GetZipCodesForCityAndStateGetZipCodesForFips, and GetZipCodesWithinDistance methods.

Type Properties

Property NameDescriptionData TypeSample
ReturnCodeReturn status of the method call.ValueDescription0Success1Invalid input2Invalid license key3Returned 0 ZIP Codes (no matches)4Outside of latitude/longitude rangeInteger0
ZipCodesOne or more ZIP Codes.Array of String values

Let’s start sending, together.