RESTful web-service to get and search States and territories of a Country
148258
Mar 20, 2016
Here is a RESTful web service to get and search states and territories of a country. This web service can be used for testing, learning or can be consumed for any web application.
1. REST web-service to get a list of all States and territories of a country
Each country has 3 character ISO assigned code assigned to it. Below service can be used to get all states of a country. Use this web-service to know the iso codes of countries.
{ "RestResponse" : { "messages" : [ "No matching state found for requested code [IND->upp]." ], "result" : [ ] } }
To test above services just click the example link or copy/paste the example link in browser's address bar and you will get the JSON Rest response. If you are using Java,then you can integrate this web service with your code either by using Spring's org.springframework.web.client.RestTemplate or Apache's HTTPClient