Custom Connector

Countrylayer Connector

Global

The Countrylayer Connector provides access to detailed country information. It acts as a proxy supporting retrieval of all countries and searches by country name, capital, language, currency, region, regional bloc, calling code, or alpha code, with field filtering and API-key authentication.

Type
Virtual machines, Single VM, BYOL
Runs on
Google Compute Engine
Last update
24 Oct 2024
Category
Integration
Overview

Integration Overview

This document provides a detailed guide for each integration point, its purpose, configuration, and workflow support using the Countrylayer Connector.

  • getAllCountries. Retrieves a list of all available countries.
  • searchCountriesByName. Searches for countries by name, with optional full-text search.
  • searchCountriesByCapital. Searches for countries by capital city name.
  • searchCountriesByLanguage. Searches for countries by official language.
  • searchCountriesByCurrency. Searches for countries by official currency.
  • searchCountriesByRegion. Searches for countries by region.
  • searchCountriesByRegionalBloc. Searches for countries by regional bloc membership.
  • searchCountriesByCallingCode. Searches for countries by calling code.
  • searchCountriesByAlphaCode. Searches for countries by alpha code.
  • ping. Checks the health of the connector service.
Documentation

Detailed Integration Documentation

Get All Countries

Operation IDgetAllCountries
Endpoint/all-countries
PurposeRetrieves a list of all available countries, with optional filtering to include specific fields. Data may be limited by subscription plan.
ParametersRequired:
access_key. Optional:
filters – semicolon-separated fields (e.g. name;capital;currencies).
ConfigurationConfigure CONNECTOR_ENV_COUNTRYLAYER_BASE_URL and CONNECTOR_ENV_PORT (default 8081).
OutputSuccessful: JSON array of country objects (name, alpha2Code, alpha3Code, callingCodes, capital, region, subregion, population, latlng, currencies, languages, flag, regionalBlocs, etc.). Failure: error object (invalid_access_key).
Workflow exampleExecute getAllCountries with filters=name;capital;currencies, then populate a country selection dropdown.

Search Countries by Name

Operation IDsearchCountriesByName
Endpoint/search-by-name/{name}
PurposeSearches for countries by name, supporting partial or full-text searches, with optional filtering.
ParametersRequired:
access_key, name (e.g. Germany). Optional:
fullText (boolean), filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByName with name=Germany and fullText=true for search functionality.

Search Countries by Capital

Operation IDsearchCountriesByCapital
Endpoint/search-by-capital/{capital}
PurposeRetrieves country data by capital city name, with optional filtering.
ParametersRequired:
access_key, capital (e.g. Berlin). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByCapital with capital=Berlin for geographic or travel applications.

Search Countries by Language

Operation IDsearchCountriesByLanguage
Endpoint/search-by-language/{language}
PurposeRetrieves country data by official language spoken, with optional filtering.
ParametersRequired:
access_key, language (e.g. ita). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByLanguage with language=ita for linguistic or cultural analysis.

Search Countries by Currency

Operation IDsearchCountriesByCurrency
Endpoint/search-by-currency/{currency}
PurposeRetrieves country data by official currency used, with optional filtering.
ParametersRequired:
access_key, currency (e.g. EUR). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByCurrency with currency=EUR for financial or e-commerce applications.

Search Countries by Region

Operation IDsearchCountriesByRegion
Endpoint/search-by-region/{region}
PurposeRetrieves country data by region, with optional filtering.
ParametersRequired:
access_key, region (e.g. Europe). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByRegion with region=Europe for regional analysis or mapping.

Search Countries by Regional Bloc

Operation IDsearchCountriesByRegionalBloc
Endpoint/search-by-regionalbloc/{regionalbloc}
PurposeRetrieves country data by regional bloc membership, with optional filtering.
ParametersRequired:
access_key, regionalbloc (e.g. EU). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByRegionalBloc with regionalbloc=EU for policy or trade applications.

Search Countries by Calling Code

Operation IDsearchCountriesByCallingCode
Endpoint/search-by-callingcode/{callingcode}
PurposeRetrieves country data by official calling code, with optional filtering.
ParametersRequired:
access_key, callingcode (e.g. 49). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByCallingCode with callingcode=49 for telecom or contact management.

Search Countries by Alpha Code

Operation IDsearchCountriesByAlphaCode
Endpoint/search-by-alpha-code/{code}
PurposeRetrieves country data by alpha code, with optional filtering.
ParametersRequired:
access_key, code (e.g. DE). Optional:
filters.
ConfigurationConfigure the connector with the correct base URL.
OutputSuccessful: JSON array of country objects. Failure: error object (404_not_found).
Workflow exampleExecute searchCountriesByAlphaCode with code=DE for country-specific data processing.

Health Check

Operation IDping
Endpoint/ping
PurposeChecks the health of the connector service.
ParametersNone.
ConfigurationNo specific configuration required.
OutputSuccessful: plain text “OK” with status 200. Failure: appropriate error status if the service is unavailable.
Workflow exampleExecute ping to verify the connector is running and confirm service availability.

Example Workflow: Country Information Retrieval and Filtering

Retrieve all countriesExecute getAllCountries with filters=name;capital;currencies for a country selection dropdown.
Search by nameExecute searchCountriesByName with name=Germany and fullText=true for customer validation or localization.
Search by currencyExecute searchCountriesByCurrency with currency=EUR for financial calculations or market analysis.
Search by regionExecute searchCountriesByRegion with region=Europe for regional reporting or mapping.
Support

For technical support, contact custom-connectors-support@isolutions.sa.

free consultation

Schedule a Free Consultation With Our Specialists

Book a free demo
request

Begin Your Adventure With Experienced Professionals

Send request
help desk

Do You Have Questions or Want More Information? Call Now.

Contact support