Skip to main content

Get Country Codes

base_url: https://firseinvoicedemo.etranzactng.com

Description:: This endpoint returns a list of Countries and their corresponding codes. Optionally filters the list by the first letter of the country name. Defaults to paginated full list if no query parameters are passed.

Query ParameterTypeDescription
namestringCountry name
alpha_2stringISO 3166-1 alpha-2 code
alpha_3stringISO 3166-1 alpha-3 code
country_codestringNumeric Country code
iso_3166_2stringISO 3166-2 code
regionstringGeographical region
region_codestringGeographical region code
sub_regionstringGeographical sub-region
sub_region_codestringGeographical sub-region code
intermediate_regionstringGeographical intermediate region
intermediate_region_codestringGeographical intermediate region code

Sample Request

GET {base_url}/api/v1/resource/countries
curl `{base_url}/api/v1/resource/countries`
-H "X-API-Key: {{CLIENT_API_KEY}}"
-H "X-API-Signature: {{HMAC_SHA256_SIGNATURE}}"
-H "X-API-Timestamp: {{ISO_20022_TIMESTAMP}}"
'

Sample Response

POST {base_url}/api/v1/resource/countries
{
"status": 200,
"message": "Tax categories fetched successfully",
"data": [
{
"name": "Ghana",
"alpha_2": "GH",
"alpha_3": "GHA",
"country_code": "288",
"iso_3166_2": "ISO3166-2:GH",
"region": "Africa",
"region_code": "002",
"sub_region": "Sub-SaharanAfrica",
"sub_region_code": "202",
"intermediate_region": "WesternAfrica",
"intermediate_region_code": "011"
},
{
"name": "Canada",
"alpha_2": "CA",
"alpha_3": "CAN",
"country_code": "124",
"iso_3166_2": "ISO3166-2:CA",
"region": "Americas",
"region_code": "019",
"sub_region": "NorthAmerica",
"sub_region_code": "021",
"intermediate_region": "",
"intermediate_region_code": ""
}
],
"execTime": 1.47873,
"error": ""
}