2. GetCountries

Version 18.1 by Giorgi Mdivnishvili on 2024/04/10 03:22

Method Description

This method ensures that a list of all countries is retrieved with the appropriate parameters

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

}]

}

Definitions

Warning

- `countryCode`: (string) The ISO 3166-1 alpha-2 country code. For example, "AL" for Albania.
- `countryName`: (string) The name of the country.
- `phoneCode`: (string) The international dialing code for the country. For example, "355" for Albania.
- `isO2`: (string) The ISO 3166-1 alpha-2 code for the country. This is typically the same as `countryCode`.
- `isO3`: (string) The ISO 3166-1 alpha-3 code for the country. For example, "ALB" for Albania.
- `status`: (integer) The status of the country. This could represent whether the country is active or not. For example, 1 could represent an active status.
- `sortingOrder`: (integer) The sorting order for the country. This could be used to sort countries in a list.
- `sellCurrency`: (string) The currency in which transactions are conducted in the country. This is typically in ISO 4217 format. For example, "USD" for United States Dollar.