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
https://OnDemandServer/soap/GetCityStateProvince

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/GetCityStateProvince">
	<soapenv:Header/>
	<soapenv:Body>
		<get:GetCityStateProvinceRequest>
			<!--Optional:-->
			<get:input_port>
				<get:Input>
					<!--Optional:-->
					<get:PostalCode>60510</get:PostalCode>
					<!--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: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.pb.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>