USPS - Address-Information-Api
USPS - Address-Information-Api
Information
Table of Contents
1.0 Introduction ............................................................................................................................... 3
1.1 Before you get started: .......................................................................................................... 3
1.2 Important Notice: User ID...................................................................................................... 3
1.3 Important Notice: Address Information API ............................................................................ 3
2.0 Address Validation API ............................................................................................................. 3
2.1 Overview .............................................................................................................................. 3
2.1.1 API Signature ..................................................................................................................... 4
2.2 Request Descriptions ........................................................................................................... 4
2.2.1 Sample Request ................................................................................................................. 5
2.3 Response Descriptions ......................................................................................................... 5
2.3.1 Sample Response ............................................................................................................ 10
3.0 ZIP Code Lookup API .............................................................................................................. 10
3.1 Overview ............................................................................................................................ 10
3.1.1 API Signature ................................................................................................................... 10
3.2 Request Descriptions .......................................................................................................... 11
3.2.1 Sample Request ............................................................................................................... 11
3.2 Response Descriptions ....................................................................................................... 12
3.3.1 Sample Response ............................................................................................................ 12
4.0 CityStateLookup API ............................................................................................................... 13
4.1 Overview ............................................................................................................................ 13
4.1.1 API Signature ................................................................................................................... 13
4.2 Request Descriptions .......................................................................................................... 13
4.2.1 Sample Request ............................................................................................................... 13
4.3 Response Descriptions ....................................................................................................... 13
4.3.1 Sample Response ............................................................................................................ 14
2
USPS Web Tools User Guide
1.0 Introduction
This document contains a Reference Guide to the Address Information Web Tools listed below. See the
Developers Guide to learn the administrative process for gaining access to the Web Tools APIs as well as
the basic mechanism for calling the APIs and processing the results. The Developer’s Guide also
contains information on testing and troubleshooting.
Note: The Request Parameter sections present the XML input tags for generating live requests along
with the restrictions on the values allowed. An error message will be returned if an incorrect value is
entered. Also, be aware of the maximum character amounts allowed for some tags. If the user enters
more than those amounts, an error will not be generated. The Web Tool will simply pass in the characters
up to the maximum amount allowed and disregard the rest. This is important since the resulting value
could prevent a correct response.
When building the XML request, pay particular attention to the order and case for tags. An error message
will be returned if an incorrect value is entered. Remember that all data and attribute values in this
document are for illustration purposes and are to be replaced by your actual values. For instance, a line
of sample code may be:
<State>MD</State>
In this instance, you will replace “MD” with the state abbreviation for the address location.
3
USPS Web Tools User Guide
4
USPS Web Tools User Guide
5
USPS Web Tools User Guide
6
USPS Web Tools User Guide
K Multiple
Response
due to
Cardinal
Rule
L Address
component
changed
LI Match has
been
converted
via LACS
M Street Name
changed
N Address
Standardized
O Lowest +4
Tie-Breaker
P Better
address
exists
Q Unique Zip
Code match
R No match
due to EWS
S Incorrect
Secondary
Address
T Multiple
response
due to
Magnet
Street
Syndrome
U Unofficial
Post Office
name
V Unverifiable
City / State
W Invalid
Delivery
Address
X No match
due to out of
range alias
Y Military
match
7
USPS Web Tools User Guide
Z Match made
using the
ZIPMOVE
product data
AddressValidateResponse Optional The DPV Confirmation Indicator is String Enumerations=
/ Address / the primary method used by the • Y
DPVConfirmation USPS to determine whether an • D
address was considered • S
deliverable or undeliverable. • N
Enumeration Definition
Y Address was
DPV
confirmed for
both primary
and (if
present)
secondary
numbers.
D Address was
DPV
confirmed for
the primary
number only,
and the
secondary
number
information
was missing.
S Address was
DPV
confirmed for
the primary
number only,
and the
secondary
number
information
was present
by not
confirmed.
N Both primary
and (if
present)
secondary
number
information
8
USPS Web Tools User Guide
failed to DPV
confirm.
9
USPS Web Tools User Guide
10
USPS Web Tools User Guide
11
USPS Web Tools User Guide
12
USPS Web Tools User Guide
<ZipCodeLookupResponse>
<Address ID="1">
<FirmName>XXXY COMP</FirmName>
<Address2>8 WILDWOOD DR</Address2>
<City>OLD LYME</City>
<State>CT</State>
<Urbanization>YES</Urbanization>
<Zip5>06371</Zip5>
<Zip4>1844</Zip4>
</Address>
</ZipCodeLookupResponse>
13
USPS Web Tools User Guide
14