2. GetCountries
Last modified by Giorgi Mdivnishvili on 2024/04/11 15:40
Contents
Method Description
This method facilitates the retrieval of a comprehensive list of countries, each annotated with relevant parameters. It is designed to return a list of countries, providing key information for each. The response is structured in JSON format, ensuring ease of integration and data parsing. Each country object within the array contains the following fields:
Endpoint URL - [GET]
Request Parameters
Request Body
none
Response Body
{
"error": true,
"errorCode": "string",
"errorDescription": "string",
"userErrorDescription": "string",
"countries": [
{
"countryCode": "string",
"countryName": "string",
"note": "string",
"phoneCode": "string",
"isO2": "string",
"isO3": "string",
"status": 0,
"sortingOrder": 0,
"sellCurrency": "string"
}
]
}
"error": true,
"errorCode": "string",
"errorDescription": "string",
"userErrorDescription": "string",
"countries": [
{
"countryCode": "string",
"countryName": "string",
"note": "string",
"phoneCode": "string",
"isO2": "string",
"isO3": "string",
"status": 0,
"sortingOrder": 0,
"sellCurrency": "string"
}
]
}
Response Body -example
{
"countryCode": "UU",
"countryName": "Ukraine.",
"phoneCode": "111",
"isO2": "UU",
"isO3": "UA.",
"status": 1,
"sortingOrder": 0,
"sellCurrency": "USD"
},
{
"countryCode": "AE",
"countryName": "United Arab Emirates",
"phoneCode": "971",
"isO2": "AE",
"isO3": "ARE",
"status": 1,
"sortingOrder": 1000,
"sellCurrency": "USD"
},
"countryCode": "UU",
"countryName": "Ukraine.",
"phoneCode": "111",
"isO2": "UU",
"isO3": "UA.",
"status": 1,
"sortingOrder": 0,
"sellCurrency": "USD"
},
{
"countryCode": "AE",
"countryName": "United Arab Emirates",
"phoneCode": "971",
"isO2": "AE",
"isO3": "ARE",
"status": 1,
"sortingOrder": 1000,
"sellCurrency": "USD"
},
Schema
Attribute | Description | Example |
---|---|---|
countryCode | The ISO 3166-1 alpha-2 country code. | "AL" for Albania |
countryName | The name of the country. | Albania |
phoneCode | The international dialing code for the country. | "355" for Albania |
isO2 | The ISO 3166-1 alpha-2 code for the country. Typically the same as countryCode. | "AL" for Albania |
isO3 | The ISO 3166-1 alpha-3 code for the country. | "ALB" for Albania |
status | The status of the country (e.g., active or not). Integer where 1 could represent active. | 1 for active |
sortingOrder | The sorting order for the country. This could be used to sort countries in a list. | Integer value (e.g., 1, 2, 3) |
sellCurrency | The currency in which transactions are conducted in the country. ISO 4217 format. | "USD" for United States Dollar |