GetPostalCodes
GetPostalCodes allows you to look up the postal codes for a particular city. The service takes a city, state, and country as input and returns the postal codes for that city. The input must be exactly correct in order to return postal codes.
Note: GetPostalCodes only works with U.S. addresses.
GetPostalCodes is part of the Spectrum Universal Address.
Resource URL
http://server:port/soap/GetPostalCodes
Example
The following shows a SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://www.precisely.com/spectrum/services/GetPostalCodes" xmlns:spec="http://spectrum.precisely.com/">
<soapenv:Header/>
<soapenv:Body>
<get:GetPostalCodesRequest>
<get:input_port>
<get:Input>
<get:City>Holland</get:City>
<get:StateProvince>MI</get:StateProvince>
</get:Input>
</get:input_port>
</get:GetPostalCodesRequest>
</soapenv:Body>
</soapenv:Envelope>
This would be the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:GetPostalCodesResponse xmlns:ns2="http://spectrum.precisely.com/" xmlns:ns3="http://www.precisely.com/spectrum/services/GetPostalCodes">
<ns3:output_port>
<ns3:Result>
<ns3:ProcessedBy>USA</ns3:ProcessedBy>
<ns3:PostalCode>49422</ns3:PostalCode>
<ns3:City.Type></ns3:City.Type>
<ns3:Status/>
<ns3:Status.Code/>
<ns3:Status.Description/>
<ns3:user_fields/>
</ns3:Result>
<ns3:Result>
<ns3:ProcessedBy>USA</ns3:ProcessedBy>
<ns3:PostalCode>49423</ns3:PostalCode>
<ns3:City.Type></ns3:City.Type>
<ns3:Status/>
<ns3:Status.Code/>
<ns3:Status.Description/>
<ns3:user_fields/>
</ns3:Result>
<ns3:Result>
<ns3:ProcessedBy>USA</ns3:ProcessedBy>
<ns3:PostalCode>49424</ns3:PostalCode>
<ns3:City.Type></ns3:City.Type>
<ns3:Status/>
<ns3:Status.Code/>
<ns3:Status.Description/>
<ns3:user_fields/>
</ns3:Result>
</ns3:output_port>
</ns3:GetPostalCodesResponse>
</soap:Body>
</soap:Envelope>