Skip to main content

CountryDto

The CountryDto (Country Data Transfer Object) represents standardized country information used across the NoWallet API.
This object provides essential metadata for each country supported by the platform, including codes, dialing prefixes, and currency formats, which are critical for localizing financial transactions and phone validations.

JSON Response Example

At the top, the JSON block presents a real-world example of a CountryDto. In this case, it describes Cameroon (CM) with its dial code (+237), currency code (XAF), and typical phone number length (8 digits). This visual example helps developers understand the format and expected values when working with country data.

These fields are all mandatory and ensure that the transaction stays within allowed parameters.

{
"code": "CM",
"name": "Cameroon",
"indicatif": "+237",
"currency": "XAF",
"phone_length": 8
}

Properties

The "Properties" section lists and explains the fields that define a country in the API:

  • code: The ISO 3166-1 alpha-2 country code, a two-letter code that uniquely identifies the country.
  • name: The full name of the country, which is useful for display purposes in user interfaces.
  • indicatif: The international dialing code for the country, which is essential for validating phone numbers.
  • currency: The ISO 4217 currency code, which indicates the currency used in the country.
  • phone_length: The standard length of phone numbers in the country, which is important for validating user input.
NameTypeRequiredRestrictionsDescription
codestringtruenonecountry code
namestringtruenonecountry name
indicatifstringtruenonecountry dial code
currencystringtruenonecountry currency code
phone_lengthnumbertruenonecountry phone length

Enumerated Values

The enumerated values section provides a complete list of acceptable code values, representing African countries supported by the API. Each country is identified by its unique two-letter code, ensuring standardized identification across all API requests and responses.

PropertyValue
codeDZ
codeAO
codeBJ
codeBW
codeBF
codeBI
codeCM
codeCV
codeCF
codeTD
codeKM
codeCG
codeCD
codeCI
codeDJ
codeEG
codeGQ
codeER
codeET
codeGA
codeGM
codeGH
codeGN
codeGW
codeKE
codeLS
codeLR
codeLY
codeMG
codeMW
codeML
codeMR
codeMU
codeYT
codeMA
codeMZ
codeNA
codeNE
codeNG
codeRE
codeRW
codeST
codeSN
codeSC
codeSL
codeSO
codeZA
codeSS
codeSD
codeSZ
codeTZ
codeTG
codeTN
codeUG
codeEH
codeZM
codeZW

This section is vital for frontend and backend developers to implement dropdowns, validations, or mappings without risking invalid country references.

Was this page helpful?