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
https://OnDemandServer/soap/GetPostalCodes
For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.
Example
The following shows a SOAP request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:get="http://www.pb.com/spectrum/services/GetPostalCodes">
<soapenv:Header/>
<soapenv:Body>
<get:GetPostalCodesRequest>
<get:input_port>
<get:Input>
<!--Optional:-->
<get:City>Holland</get:City>
<!--Optional:-->
<get:StateProvince>MI</get:StateProvince>
<!--Optional:-->
<get:Country></get:Country>
<!--Optional:-->
<get:user_fields>
<get:user_field>
<get:name>?</get:name>
<get:value>?</get:value>
</get:user_field>
</get:user_fields>
</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.pb.com/" xmlns:ns3="http://www.pb.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>