GetCityStateProvinceLoqate

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

This stage is part of the Spectrum Universal Addresse.

Resource URL

JSON endpoint:

http://server:port/rest/GetCityStateProvinceLoqate/results.json

XML endpoint:

http://server:port/rest/GetCityStateProvinceLoqate/results.xml

Example with JSON Response

The following example requests a JSON response:

http://myserver:8080/rest/GetCityStateProvinceLoqate/results.json?​Data.Country=USA&Data.PostalCode=60510

The JSON returned by this request would be:

{"output_port": [{
   "ProcessedBy": "LOQATE",
   "PostalCode": "60510",
   "City": "Batavia",
   "StateProvince": "IL",
   "Country": "United States",
   "Status": "",
   "Status.Code": "",
   "Status.Description": "",
   "user_fields": []
}]}

Example with XML Response

The following example requests an XML response:

http://myserver:8080/rest/GetCityStateProvinceLoqate/results.xml?Data.Country=USA&​Data.PostalCode=60510

The XML returned by this request would be:

<ns2:xml.GetCityStateProvinceLoqateResponse
xmlns:ns2="http://www.precisely.com/spectrum/services/GetCityStateProvinceLoqate">
   <ns2:output_port>
      <ns2:Result>
         <ns2:ProcessedBy>LOQATE</ns2:ProcessedBy>
         <ns2:PostalCode>60510</ns2:PostalCode>
         <ns2:City>Batavia</ns2:City>
         <ns2:StateProvince>IL</ns2:StateProvince>
         <ns2:Country>United States</ns2:Country>
         <ns2:Status/>
         <ns2:Status.Code/>
         <ns2:Status.Description/>
         <ns2:user_fields/>
      </ns2:Result>
   </ns2:output_port>
</ns2:xml.GetCityStateProvinceLoqateResponse>