Countries-countryCode-provinces:GET
(Difference between revisions)
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) m (1 revision) |
Revision as of 11:58, 19 February 2013
GET /countries/{countryCode}/provinces
Get list of provinces for a given country.
Contents |
Request
GET /countries/{countryCode}/provinces
Request Parameters
- countryCode - string
- The country code - e.g. US, CA, UK, DE, AU
URI Parameters
None.
Response
Status Code
- 200 OK
- Success
- 404 Not Found
- Returned if countryCode is not found or provinces are not defined for the given country.
Response Body
{ "list": [ { "isoCode": "AL", "name": "Alabama" }, { "isoCode": "AK", "name": "Alaska" }, ... ... { "isoCode": "WI", "name": "Wisconsin" }, { "isoCode": "WY", "name": "Wyoming" } ], "links": [ "self": {"href": "https://api.hostway.com/countries/US/provinces/", "rel": "self"} ] }
Parameters
- isoCode - string
- The state/province code - e.g. NJ, IL, DC, CA, FL
- name - string
- Full state/province name
- links - list
- Hypermedia for this resource. Links to self.
See also