Appearance
Countries
DANGER
This document has not been updated since version 0.0.3 and is not ready for production. It will be updated before version 1.0 of the project is released.
The API uses structured country data to perform geo-related computations.
The Country object
json
// country object
{
"id": "US",
"title": "United States",
"currency_id": "USD",
"fips_code": "US",
"iso_numeric": "840",
"north": "49.388611",
"south": "24.544245",
"east": "-66.954811",
"west": "-124.733253",
"capital": "Washington",
"continent_name": "North America",
"continent": "NA",
"languages": "en-US,es-US,haw,fr",
"iso_alpha3": "USA",
"geoname_id": 6252001,
"telephone_prefix": "+1"
}
Property | Type | Description |
---|---|---|
id | String | The country ID. |
title | String | The country title. |
currency_id | String | The currency ID used by the country. |
fips_code | String | County FIPS Codes are unique 5-digit codes that represent specific US counties. The first two digits represent the county's state and the last three digits represent the county. |
iso_numeric | String | ISO 3166-1 numeric (or numeric-3) codes are three-digit country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest. |
north | String | North geo coordinates. |
south | String | South geo coordinates. |
east | String | East geo coordinates. |
west | String | West geo coordinates. |
capital | String | The capital of the country. |
continent_name | String | The continent name. |
continent | String | The continent identifier. |
languages | String | Languages of the country. |
iso_alpha3 | String | ISO 3166-1 alpha-3 codes are three-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest. |
geoname_id | Integer | The GEO Name identifier. |
telephone_prefix | String | The international telephone prefix. |
Read country
Retrieves the country object for the current session.account
.
Request
sh
GET /v1/static/country
Response
The Country object.
json
// country object
{
"id": "US",
"title": "United States",
...
}
Enumerated countries
Provides an enumerated collection of country data for HTML selects, radios, or similar listing elements.
Request
sh
GET /v1/static/countries/enumerated
Response
json
[
{
"id": "US",
"title": "United States"
},
...
[
Optionally, provide a custom value for the id
and/or title
property names in the query. In the example request, the response property names have been changed to value
and label
to eliminate mapping requirements in the frontend codebase.
Request
sh
GET /v1/static/countries/enumerated
?id=value&title=label
Response
json
[
{
"value": "US",
"label": "United States"
},
...
[