Countries & States
This is used to view countries and states.
Country Properties
id |
{ "id" : 255 }
The unique ID for the country |
name |
{ "name" : "United Kingdom" }
The name of the country |
iso |
{ "iso" : "GB" }
The ISO 2 code for the country |
states |
{ "states" : [
{
"id": 1,
"name": "Alabama",
"shortName": "AL"
}
]
}
The states assigned to a particular country |
GET /v1/countries
Returns all countries.
virtual | 1 or 0 |
fields | Comma separated list of properties to include |
GET /v1/countries
HTTP/1.1 200 OK [ { "id": 222, "name": "United Kingdom", "iso": "GB" } }
GET /v1/countries/ID
Retrieves a single country.
embed | states |
fields | Comma separated list of properties to include |
GET /v1/countries/1?embed=states
HTTP/1.1 200 OK { "id": 223, "name": "United States", "iso": "US", "states": [ { "id": 1, "name": "Alabama", "shortName": "AL" } ] }