GetCountryByIsoLetterCode()

Get country by ISO letter code

Description

Retrieves a country by it's alphabetical 2 or 3 digit ISO code.
[https://www.iban.com/country-codes]

Package Details

Interface

IAddressManager

Syntax

_addressManager.GetCountryByIsoLetterCode(string countryCode)

Returns

Task<Country>

API

[GET] /api/v1/countries/{code}

Parameters

Querystring
code - alpha 2 or 3 letter ISO letter code

Returns

200 OK - Country

Example

string threeLetterCode = "CAN; string twoLetterCode = "CA"; var country1 = await _addressManager.GetCountryByIsoLetterCode(threeLetterCode); var country2 = await _addressManager.GetCountryByIsoLetterCode(twoLetterCode);