Documentation
Authorization
All requests to the API should contain a token. You can generate a token via your account dashboard. After generating one, it will be displayed on your screen. Store this in a safe place, as we can show this token only once.
This is a bearer token. The Authorization
header of your request should follow this structure:
Bearer <token>
Countries
Get all countries
Endpoint: /api/countries
Example response
[
{
"name": "Bangladesh",
"slug": "bd",
"iso2": "BD",
"iso3": "BGD",
"capital": "Dhaka",
"phone_code": "880"
},
{
"name": "Belgium",
"slug": "be",
"iso2": "BE",
"iso3": "BEL",
"capital": "Brussels",
"phone_code": "32"
},
// ...
]
Get one country
Endpoint: /api/countries/{slug}
Example response
{
"name": "Belgium",
"slug": "be",
"iso2": "BE",
"iso3": "BEL",
"capital": "Brussels",
"phone_code": "32",
"currency": {
"name": "Euro",
"slug": "eur",
"demonym": "",
"major_singular": "Euro",
"major_plural": "Euros",
"minor_singular": "Cent",
"minor_plural": "Cents",
"code": "EUR",
"iso_number": "978",
"symbol": "€",
"symbol_native": "€"
},
"continent": {
"name": "Europe",
"slug": "eu",
"iso2": "EU"
}
}
Continents
Get all continents
Endpoint: /api/continents
Example response
[
{
"name": "Africa",
"slug": "af",
"iso2": "AF"
},
{
"name": "North America",
"slug": "na",
"iso2": "NA"
},
// ...
]
Get one continent
Endpoint: /api/continents/{slug}
Example response
{
"name": "Europe",
"slug": "eu",
"iso2": "EU",
"countries": [
{
"name": "Belgium",
"slug": "be",
"iso2": "BE",
"iso3": "BEL",
"capital": "Brussels",
"phone_code": "32"
},
{
"name": "Bulgaria",
"slug": "bg",
"iso2": "BG",
"iso3": "BGR",
"capital": "Sofia",
"phone_code": "359"
},
// ..
]
}
Currencies
Get all currencies
Endpoint: /api/currencies
Example response
[
{
"name": "United Arab Emirates Dirham",
"slug": "aed",
"demonym": "UAE",
"major_singular": "Dirham",
"major_plural": "Dirhams",
"minor_singular": "Fils",
"minor_plural": "Fils",
"code": "AED",
"iso_number": "784",
"symbol": "د.إ.",
"symbol_native": "د.إ."
},
{
"name": "Afghan Afghani",
"slug": "afn",
"demonym": "Afghan",
"major_singular": "Afghani",
"major_plural": "Afghani",
"minor_singular": "Pul",
"minor_plural": "Pul",
"code": "AFN",
"iso_number": "971",
"symbol": "Af",
"symbol_native": "؋"
},
// ...
]
Get one currencie
Endpoint: /api/currencies/{slug}
Example response
{
"name": "Euro",
"slug": "eur",
"demonym": "",
"major_singular": "Euro",
"major_plural": "Euros",
"minor_singular": "Cent",
"minor_plural": "Cents",
"code": "EUR",
"iso_number": "978",
"symbol": "€",
"symbol_native": "€",
"countries": [
{
"name": "Belgium",
"slug": "be",
"iso2": "BE",
"iso3": "BEL",
"capital": "Brussels",
"phone_code": "32"
},
{
"name": "Saint Barthelemy",
"slug": "bl",
"iso2": "BL",
"iso3": "BLM",
"capital": "Gustavia",
"phone_code": "590"
},
// ..
]
}