Response

GetCityStateProvince returns the matching city and state/province for the input postal code as well as a code to indicate the success or failure of the match attempt. If more than one city/state or city/province matches the input postal code, multiple output records are returned.

Table 1. GetCityStateProvince Output

Response Element

Description

City

The matched city name.

City.Type

The USPSĀ® standardized city name type (U.S. addresses only).

V
Vanity (non-mailing) city name.
P
Primary. The city name is the primary mailing city name.
S
Secondary. The city name is an alternate city name but is acceptable. A city can have multiple secondary city names.

PostalCode

The input postal code.

ProcessedBy

Indicates which address coder processed the address. One of the following:

USA
The U.S. address coder processed the address.
CAN
The Canadian address coder processed the address.

StateProvince

The validated state/province or its abbreviated value.

Status

Reports the success or failure of the match attempt.

null
Success
F
Failure

Status.Code

The reason for failure, if there is one. The only valid value is:

  • DisabledCoder
  • UnrecognizedPostalCode

Status.Description

The description of the failure. The valid values are:

Postal code not found
This value will appear if Status.Code=UnrecognizedPostalCode.
PerformUSProcessing disabled
This value will appear if Status.Code=DisabledCoder.
PerformCanadianProcessing disabled
This value will appear if Status.Code=DisabledCoder.