GetCityStateProvinceInternational
GetCityStateProvinceInternational returns a city and state/province for a given input postal code and country.
Resource URL
JSON endpoint:
http://server:port/rest/GetCityStateProvinceInternational/results.json
https://OnDemandServer/rest/GetCityStateProvinceInternational/results.json
XML endpoint:
http://server:port/rest/GetCityStateProvinceInternational/results.xml
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:
http://myserver:8080/rest/GetCityStateProvinceInternational/results.json?Data.PostalCode=1684&Data.Country=ZAF
https://spectrum.precisely.com/rest/GetCityStateProvinceInternational/results.json?Data.PostalCode=95380&Data.Country=FRA
The JSON returned by this request would be:
{
"Output": [
{
"ProcessedBy": "INTS",
"City": "ÉPIAIS-LÈS-LOUVRES",
"StateProvince": "VAL-D'OISE",
"PostalCode": "95380",
"Country": "FRA",
"user_fields": []
}
]
}
Example with XML Response
The following example requests an XML response:
http://myserver:8080/rest/GetCityStateProvinceInternational/results.xml?Data.PostalCode=1684&Data.Country=ZAF
https://spectrum.precisely.com/rest/GetCityStateProvinceInternational/results.xml?Data.PostalCode=95380&Data.Country=FRA
The XML returned by this request would be:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xml.GetCityStateProvinceInternationalResponse
xmlns="http://www.pb.com/spectrum/services/GetCityStateProvinceInternational">
<Output>
<Row>
<ProcessedBy>INTS</ProcessedBy>
<City>ÉPIAIS-LÈS-LOUVRES</City>
<StateProvince>VAL-D'OISE</StateProvince>
<PostalCode>95380</PostalCode>
<Country>FRA</Country>
<user_fields/>
</Row>
</Output>
</xml.GetCityStateProvinceInternationalResponse>