Countries: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
Retrieves a list of all supported countries.
Contents |
Request
GET /countries
Request Parameters
None.
URI Parameters
None.
Response
Returns a dictionary containing list of countries with ISO 3166-1 alpha-2[1] country codes and a link to obtain the provinces of each country.
Status Code
- 200 OK
- Success
Response Body
{ "list": [ { "isoName": "US", "name": "United States of America", "provinces": "https://api.hostway.com/countries/US/provinces/" }, { "isoName": "BG", "name": "Bulgaria", "provinces": "https://api.hostway.com/countries/BG/provinces/" } ], "links": [ {"rel": "self", "href": "https://api.hostway.com/countries"} ] }
- list - list
- List of countries with ISO 3166-1 alpha-2[2] code and link to corresponding province list. Each element of the list has the following attributes:
- isoName - string
- The ISO 3166-1 alpha-2[3] code of the country.
- name - string
- A descriptive name (in English) for the country.
- provinces - URI
- A URI to the list of provinces for the given country.
- links - list
- Hypermedia for this resource. Link to self will preserve filtering, sorting and pagination set by the request. Links to the first, last, previous and next pages will also be included if applicable.
See also