GetCityStateProvinceInternational
GetCityStateProvinceInternational returns a city and state/province for a given input postal code and country.
Resource URL
JSON endpoint:
https://OnDemandServer/rest/GetCityStateProvinceInternational/results.json
XML endpoint:
https://OnDemandServer/rest/GetCityStateProvinceInternational/results.xml
For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.
Example with JSON Response
The following example requests a JSON response:
https://spectrum.precisely.com/rest/GetCityStateProvinceInternational/results.json?Data.PostalCode=1684&Data.Country=ZAF
The JSON returned by this request would be:
{"Output": [{
"ProcessedBy": "INTS",
"City": "CITY OF JOHANNESBURG",
"StateProvince": "GAUTENG",
"PostalCode": "1684",
"Country": "ZAF",
"user_fields": []
}]}
Example with XML Response
The following example requests an XML response:
https://spectrum.precisely.com/rest/GetCityStateProvinceInternational/results.xml?Data.PostalCode=1684&Data.Country=ZAF
The XML returned by this request would be:
<xml.GetCityStateProvinceInternationalResponsexmlns="http://www.precisely.com/spectrum/services/GetCityStateProvinceInternational">
<Output>
<Row>
<ProcessedBy>INTS</ProcessedBy>
<City>CITY OF JOHANNESBURG</City>
<StateProvince>GAUTENG</StateProvince>
<PostalCode>1684</PostalCode>
<Country>ZAF</Country>
<user_fields/>
</Row>
</Output>
</xml.GetCityStateProvinceInternationalResponse>