GetCityStateProvince

GetCityStateProvince returns a city and state/province for a given input postal code.

Note: GetCityStateProvince works with U.S. and Canadian addresses only.

GetCityStateProvince is part of Spectrum Universal Address.

Resource URL

http://server:port/soap/GetCityStateProvince

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/GetCityStateProvince" xmlns:spec="http://spectrum.precisely.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <get:GetCityStateProvinceRequest>
         <get:input_port>
            <get:Input>
               <get:PostalCode>60510</get:PostalCode>
            </get:Input>
         </get:input_port>
      </get:GetCityStateProvinceRequest>
   </soapenv:Body>
</soapenv:Envelope>

This would be the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns3:GetCityStateProvinceResponse xmlns:ns2="http://spectrum.precisely.com/" ​xmlns:ns3="http://www.precisely.com/spectrum/services/GetCityStateProvince">
         <ns3:output_port>
            <ns3:Result>
               <ns3:ProcessedBy>USA</ns3:ProcessedBy>
               <ns3:PostalCode>60510</ns3:PostalCode>
               <ns3:City>BATAVIA</ns3:City>
               <ns3:City.Type>P</ns3:City.Type>
               <ns3:StateProvince>IL</ns3:StateProvince>
               <ns3:Country>USA</ns3:Country>
               <ns3:user_fields/>
            </ns3:Result>
         </ns3:output_port>
      </ns3:GetCityStateProvinceResponse>
   </soap:Body>
</soap:Envelope>