v1

latestOpenAPI 3.0.12026-07-242073551.1 MB
Reference Data

Get Countries

Retrieves a list of countries available on the system along with their relevant details. <br />With this endpoint, you can search for specific countries, paginate results, and sort the data as needed.

get/v4/countries

Query parameters

searchTermstring

A string representing the term or keywords used to filter the list of countries, <br /> helping users to narrow down the list based on the their input.

pageSizeinteger

An integer that defines the maximum number of countries (records) returned per page in the response. <br /> For instance, if <b>pageSize</b> is set to 20, the API will return up to 20 countries in each response. <br />
<br /> <b>Note:</b> By default, this value is set to 100.

pageNumberinteger

An integer indicating the specific page of results to retrieve, allowing for pagination of larger datasets. <br /> For example, if pageNumber is set to 3, the API will return the results corresponding to the third page of countries based on the specified <b>pageSize</b>. <br />
<br /> <b>Note:</b> By default, this value is set to 1.

sortBy'CountryName' | 'Alpha2Code' | 'Alpha3Code' | 'Numeric' | 'CountryGroup' | 'PostcodeRequired' | 'StateCodeRequired' | 'DefaultCurrency'

Sort By

A string specifying the field by which to organise the search results. <br />For instance, "CountryName" could be used to sort countries alphabetically, arranging the results in a more user-friendly order. <br /> <br /><b>Note:</b> By default, this value is set to <b>CountryName</b>. <br /> <br />Enum [CountryName, Alpha2Code, Alpha3Code, Numeric, CountryGroup, PostCodeRequired, StateCodeRequired, DefaultCurrency]

sortDir'Ascending' | 'Descending'

Order Direction

A string indicating the direction in which to sort the results, typically set to "ascending" or "descending." <br />For example, setting <b>sortDir</b> to "Ascending" while using "CountryName" as <b>sortBy</b> would arrange the countries from A to Z. <br /> <br /><b>Note:</b> By default, this value is set to Ascending. <br /> <br />Enum [Ascending, Descending]

Response

Returns a list of countries.

TotalCountinteger required

An integer representing the total number of countries matching the search criteria, regardless of pagination. <br />This information is useful for understanding the full scope of available results.

Example response

{
  "Countries": [
    {
      "CountryName": "United Kingdom",
      "Alpha2Code": "GB",
      "Alpha3Code": "GBR",
      "Numeric": "826",
      "PostcodeRequired": true,
      "DefaultCurrency": "GBP"
    }
  ],
  "TotalCount": 236
}