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.
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | string | true | none | country code |
| name | string | true | none | country name |
| indicatif | string | true | none | country dial code |
| currency | string | true | none | country currency code |
| phone_length | number | true | none | country 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.
| Property | Value |
|---|---|
| code | DZ |
| code | AO |
| code | BJ |
| code | BW |
| code | BF |
| code | BI |
| code | CM |
| code | CV |
| code | CF |
| code | TD |
| code | KM |
| code | CG |
| code | CD |
| code | CI |
| code | DJ |
| code | EG |
| code | GQ |
| code | ER |
| code | ET |
| code | GA |
| code | GM |
| code | GH |
| code | GN |
| code | GW |
| code | KE |
| code | LS |
| code | LR |
| code | LY |
| code | MG |
| code | MW |
| code | ML |
| code | MR |
| code | MU |
| code | YT |
| code | MA |
| code | MZ |
| code | NA |
| code | NE |
| code | NG |
| code | RE |
| code | RW |
| code | ST |
| code | SN |
| code | SC |
| code | SL |
| code | SO |
| code | ZA |
| code | SS |
| code | SD |
| code | SZ |
| code | TZ |
| code | TG |
| code | TN |
| code | UG |
| code | EH |
| code | ZM |
| code | ZW |
This section is vital for frontend and backend developers to implement dropdowns, validations, or mappings without risking invalid country references.
Was this page helpful?