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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
ZipCode | ZIP Code. | String | True | 02861 |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
ZipCode | ZIP Code. | String | True | 23320 |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
BarcodeIdentifier | Barcode identifier. (Consult USPS.com for more info.) | String | True | |
ServiceTypeIdentifier | Service type identifier (STID). (Consult USPS.com for more info.) | String | True | |
MailerIdentifier | Mailer identifier (assigned by USPS). | String | True | |
SerialNumber | Serial number. (Consult USPS.com for more info.) | String | True | |
IntelligentMailBarcodeKey | Barcode key returned from calling VerifyAddressAdvanced method. | String | True | |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
ZipCode | ZIP Code. | String | True | 00956 |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
City | City name. | String | True | Chesapeake |
State | Two-letter state name abbreviation. | String | True | VA |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
Fips | FIPS code that represents the area or county of interest. | String | True | 51550 |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
Latitude | Latitude coordinate from -179.2311 to 179.8597. | String | True | 36.763075 |
Longitude | Longitude coordinate from 17.8315 to 71.4411. | String | True | -76.258473 |
Radius | Radius in miles. (The maximum is 50.) | String | True | 2.1 |
LicenseKey | Your license key. | String | True | 00000000-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 Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
FirmOrRecipient | Firm name or recipient. | String | False | Esendex |
PrimaryAddressLine | First line of the address. | String | True | 505 Independence Parkway |
SecondaryAddressLine | Second line of the address. | String | False | Suite 300 |
Urbanization | Urbanization name (used in Puerto Rico only). | String | False | BOSQUE DE LAS FLORES |
CityName | City name. | String | True | Chesapeake |
State | The state or 2-character state abbreviation. | String | True | VA |
ZipCode | 5-digit ZIP Code. | String | False | 23320 |
LicenseKey | Your license key. | String | True | 00000000-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 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
TYPES
Address
This response is returned by the VerifyAddress
method.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CityName | The preferred city name for the address. | String | Chesapeake |
Country | The address country. | String | USA |
County | The name of the county or parish in which the 5-digit ZIP Code resides. | String | CHESAPEAKE CITY |
FirmNameOrRecipient | The building or firm recipient name when available. | String | ESENDEX |
PrimaryAddressLine | The corrected primary delivery address. | String | 505 Independence Pkwy Ste 300 |
ReturnCode | Return 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 only | Integer | 100 |
SecondaryAddressLine | Secondary delivery address line (if applicable). | String | |
StateAbbreviation | The 2-letter state abbreviation. | String | VA |
Urbanization | The urbanization name (used in Puerto Rico only). | String | LOMAS VERDES |
ZipCode | The corrected ZIP Code or Zip+4 (if available). | String | 23320 |
AddressInfo
This data is included in the PavResponse
data type.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CarrierRoute | A 4-character code assigned to a mail delivery or collection route within a 5-digit ZIP Code. | String | C064 |
FinanceNumber | USPS Finance Number for the address. | String | 511750 |
Firm | Building or firm recipient name (if available). | String | |
Plus4High | The high-end ZIP add-on in a range of Zip+4 codes. | String | 5178 |
Plus4Low | The low-end ZIP add-on in a range of Zip+4 codes. | String | 5178 |
PostDirectional | Direction designation after suffix (if available). Ex: N, S, E, W | String | |
PreDirectional | Direction designation. Ex: N, S, E, W | String | |
PrimaryEO | Code identifying if Post Office considers address even, odd or both.ValueDescriptionOOddEEvenBBoth | String | O |
PrimaryHigh | High-end address of range of addresses. | String | 505 |
PrimaryLow | Low-end address of range of addresses. | String | 505 |
RecordTypeCode | Type of record.ValueDescriptionFFirmGGeneral DeliveryHHigh-RisePP.O. BoxRRural Route/Highway ContractSStreet | String | H |
SecondaryAbbreviation | Abbreviation for apartment, suite, or trailer number (if applicable). | String | STE |
SecondaryEO | Code for secondary addressValueDescriptionOOddEEvenBBoth | String | E |
SecondaryHigh | Secondary high-end address of range of addresses. | String | 300 |
SecondaryLow | Secondary low-end address of range of addresses. | String | 300 |
StreetName | Street name. | String | INDEPENDENCE |
Suffix | Address suffix component. Ex: AVE, LN, DRIVE, STREET, RD | String | PKWY |
ZipCode | ZIP Code. | String | 23320 |
CensusInfo
This data is included in the PavResponse
data type.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CensusBlockNumber | Census Block Number. | String | 1029 |
CensusTractNumber | Census Tract Number. | String | 0209.06 |
CMSA | US Census Consolidated Metropolitan Statistical Area. | String | 545 |
FIPS | Federal Information Processing Standard Code. | String | 51550 |
MA | Metropolitan Area. | String | 572 |
MSA | US Census Metropolitan Statistical Area. | String | 47260 |
PMSA | US Census Primary Metropolitan Statistical Area. | String |
City
This data is included in the CityNamesResponse
data type.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
IsDefault | Indicates whether this city name is the preferred city name. | Boolean | True |
IsMailing | Specifies whether or not the city state name can be used as a last line of address on a mail piece. | Boolean | True |
Name | The city name. | String | CHESAPEAKE |
CityNamesResponse
This response is returned by the GetCityNamesForZipCode
method.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CityNames | Details of city names. | Array of City objects | |
ReturnCode | Return status of the method call.ValueDescription0Success1Invalid input2Invalid license key3No match | Integer | 0 |
CongressionalDistrictResponse
This response is returned by the GetCongressionalDistrictByZip
method.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CongressionalDistrict | A standard value identifying a geographic area within the United States served by a member of the U.S. House of Representatives. | String | 02 |
ReturnCode | Return status of the method call.ValueDescription0Success1Invalid input2Invalid license key3No match4Multiple matches | Integer | 0 |
GeoLocationInfo
This data is included in the PavResponse
data type.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
AreaCode | Area Code. | String | 757 |
AvgLatitude | Average latitude position for address. | String | 36.761033 |
AvgLongitude | Average longitude position for address. | String | -76.256341 |
FromLatitude | The ‘from’ latitude. | String | 36.716751 |
FromLongitude | The ‘from’ longitude. | String | -76.300819 |
HasDaylightSavings | Whether the address location recognizes Daylight Savings Time. | Boolean | True |
TimeZone | Time 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) | String | EST |
ToLatitude | The ‘to’ latitude. | String | 36.810799 |
ToLongitude | The ‘to’ longitude. | String | -76.098457 |
IntelligentBarcodeResponse
This response is returned by the GetIntelligentMailBarcode
method.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
Barcode | Intelligent Mail Barcode string. | String | |
ReturnCode | Return status of the method call.ValueDescription0Success1Invalid input | Integer | 0 |
LegislativeInfo
This data is included in the PavResponse
data type.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CongressionalDistrictNumber | Congressional District Number. | String | 03 |
StateLegislativeLower | Lower Legislative District for the address (i.e. House). | String | 078 |
StateLegislativeUpper | Upper Legislative District for the address (i.e. Senate). | String | 005 |
MailingIndustryInfo
This data is included in the PavResponse
data type.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CSKey | String | X26324 | |
CarrierRoute | A 4-character code assigned to a mail delivery or collection route within a 5-digit ZIP Code. | String | C064 |
CheckDigit | Digit used in PostNet Barcode. | String | 7 |
DefaultFlag | Default flag. | Boolean | false |
DeliveryPoint | Delivery Point. | String | 75 |
DpvConfirmationIndicator | DPV 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-confirmed | String | Y |
DpvCrmaIndicator | CRMA (‘Y’ or ‘N’). | String | N |
DpvFootnote1 | Address matching footnote.ValueDescriptionAAaddress is matched to zip4A1address is not matched to zip4 | String | AA |
DpvFootnote2 | Address 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 invalid | String | BB |
DpvFootnote3 | Address matching footnote.ValueDescriptionRRaddress matched to CMRA with secondary presentR1address matched to CMRA with secondary not present | String | |
DpvFootnote4 | Address matching footnote. | String | |
DpvFootnote5 | Address matching footnote. | String | |
DpvNoStatIndicator | ‘Y’ or ‘N’ | String | N |
DpvVacantIndicator | ‘Y’ or ‘N’ | String | N |
ELOTAscDesc | eLOT ascending/descending code.ValueDescriptionAAscendingBDescending | String | A |
ELOTSequenceNumber | eLOT sequence number. | String | 0185 |
EwsFlag | eLOT sequence number.ValueDescriptionYaddress is in early warning system databaseNaddress is not in EWS<empty string>not presented to EWS | Boolean | false |
LACSFlag | Y – address has been converted by LACS. | String | |
LACSIndicator | L – input address has been matched to ‘L’ marked record. | String | |
LACSReturnCode | LACS return code. | String | |
RecordTypeCode | Type of record.ValueDescriptionFFirmGGeneral DeliveryHHigh-RisePP.O. BoxRRural Route/Highway ContractSStreet | String | H |
SuiteLinkReturnCode | SuiteLink 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 Name | Description | Data Type | Sample |
---|---|---|---|
CityName | City name. | String | Chesapeake |
FirmOrRecipient | Firm or recipient. | String | Esendex |
LicenseKey | Your license key. | String | 00000000-0000-0000-0000-000000000000 |
PrimaryAddressLine | Primary address line (address number and street name). | String | 505 Independence Parkway |
ReturnCaseSensitive | Set to true to DISABLE the default behavior of returning the street name in ALL CAPS. | Boolean | True |
ReturnCensusInfo | Set to true to include CensusInfo in the response. | Boolean | True |
ReturnCityAbbreviation | Set to true to return the abbreviated city name in the response. | Boolean | True |
ReturnGeoLocation | Set to true to include GeoLocationInfo in the response. | Boolean | True |
ReturnLegislativeInfo | Set to true to include LegislativeInfo in the response. | Boolean | True |
ReturnMailingIndustryInfo | Set to true to include MailingIndustryInfo in the response. | Boolean | True |
ReturnResidentialIndicator | Set to true to include ResidentialDeliveryIndicator in the response. | Boolean | True |
ReturnStreetAbbreviation | Set to true to return the abbreviated street name (if available). | Boolean | True |
SecondaryAddressLine | Secondary address line. | String | Suite 300 |
State | State. | String | VA |
Urbanization | Urbanization name (used in Puerto Rico only). | String | BOSQUE DE LAS FLORES |
ZipCode | ZIP code. | String | 23320 |
PavResponse
This data response is returned by the VerifyAddressAdvanced
method.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
CensusInfo | Census information. | CensusInfo | |
CityName | Address city. | String | Chesapeake |
Country | Address country. | String | USA |
County | The name of the county or parish in which the 5-digit ZIP Code resides. | String | CHESAPEAKE CITY |
CountyNum | The Federal Information Processing Standard (FIPS) code assigned to a given county or parish within a state. | String | 550 |
FinanceNumber | USPS Finance Number for the address. | String | 511750 |
FirmOrRecipient | Building or firm recipient name (if available). | String | ESENDEX |
GeoLocationInfo | Geolocation information. | GeoLocationInfo | |
IntelligentMailBarcodeKey | A key that can be used to obtain Intelligent Mail Barcode using GetIntelligentMailBarcode method. | String | HM3NbwIHnfyeFkCrFAClmA== |
LegislativeInfo | Legislative information. | LegislativeInfo | |
MailingIndustryInfo | Mailing industry information. | MailingIndustryInfo | |
MultipleMatches | Address information. | Array of AddressInfo objects | |
PMBDesignator | Private Mail Box (PMB) designator. | String | |
PMBNumber | Private Mail Box (PMB) number. | String | |
PostDirectional | Direction designation after suffix (if available). Ex: N, S, E, W. | String | |
PostnetBarcode | Address Bar Code. | String | f233205178757f |
PreDirectional | Direction designation. Ex: N, S, E, W | String | |
PreferredCityName | The preferred City name. | String | Chesapeake |
Primary | Primary street house number. | String | 505 |
PrimaryDeliveryLine | Corrected delivery address. | String | 505 Independence Pkwy Ste 300 |
PrimaryEO | Code identifying if Post Office considers address even, odd or both.ValueDescriptionOOddEEvenBBoth | String | O |
PrimaryHigh | High-end address of range of addresses. | String | 505 |
PrimaryLow | Low-end address of range of addresses. | String | 505 |
ResidentialDeliveryIndicator | Whether the address is residential or commercial.ValueDescriptionYAddress is residentialNAddress is commercial | String | N |
ReturnCode | Return 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 only | Integer | 100 |
Secondary | Code that describes an apartment, room, suite, space, floor, or other secondary addressing numeric or alphanumeric that follows a street address. | String | 300 |
SecondaryAbbreviation | Abbreviation 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 * | String | STE |
SecondaryDeliveryLine | Secondary delivery address line | String | |
SecondaryEO | Code identifying if Post Office considers secondary address even, odd or both.ValueDescriptionOOddEEvenBBoth | String | E |
SecondaryHigh | Secondary high-end address of range of addresses. | String | 300 |
SecondaryLow | Secondary low-end address of range of addresses. | String | 300 |
StateAbbreviation | The 2-character state abbreviation. | String | VA |
StreetName | Street name. | String | INDEPENDENCE |
Suffix | The address suffix component. Ex: AVE, LN, DRIVE, STREET, RD | String | PKWY |
Urbanization | Address urbanization (used in Puerto Rico only). | String | LOMAS VERDES |
ZipCode | ZIP Code. | String | 23320-5178 |
UrbanizationResponse
This response is returned by the GetUrbanizationListForZipCode
method.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
ReturnCode | Return status of the method call.ValueDescription0Success1Invalid input2Invalid license key3No match | Integer | 0 |
UrbanizationList | One or more Urbanization names. | Array of String values | ALTS DE BAYAMON, BOSQUE DE LAS FLORES, URB AGUSTIN STAHL |
ZipCodesResponse
This response is returned by the GetZipCodesForCityAndState
, GetZipCodesForFips
, and GetZipCodesWithinDistance
methods.
Type Properties
Property Name | Description | Data Type | Sample |
---|---|---|---|
ReturnCode | Return status of the method call.ValueDescription0Success1Invalid input2Invalid license key3Returned 0 ZIP Codes (no matches)4Outside of latitude/longitude range | Integer | 0 |
ZipCodes | One or more ZIP Codes. | Array of String values |
Let’s start sending, together.