2. GetCountries

Last modified by Giorgi Mdivnishvili on 2024/04/11 15:40

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"
    }
  ]
}

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"
        },

Schema

Success

{

errorboolean
errorCodestring
nullable: true
errorDescriptionstring
nullable: true
userErrorDescriptionstring
nullable: true
countries[
nullable: trueCountry{
countryCodestring
nullable: true
readOnly: true
countryNamestring
nullable: true
notestring
nullable: true
phoneCodestring
nullable: true
isO2string
nullable: true
isO3string
nullable: true
statusinteger($int32)
sortingOrderinteger($int32)
sellCurrencystring
nullable: true

}]

}

AttributeDescriptionExample
countryCodeThe ISO 3166-1 alpha-2 country code."AL" for Albania
countryNameThe name of the country.Albania
phoneCodeThe international dialing code for the country."355" for Albania
isO2The ISO 3166-1 alpha-2 code for the country. Typically the same as countryCode."AL" for Albania
isO3The ISO 3166-1 alpha-3 code for the country."ALB" for Albania
statusThe status of the country (e.g., active or not). Integer where 1 could represent active.1 for active
sortingOrderThe sorting order for the country. This could be used to sort countries in a list.Integer value (e.g., 1, 2, 3)
sellCurrencyThe currency in which transactions are conducted in the country. ISO 4217 format."USD" for United States Dollar