GET api/country?name={name}&all={all}

Returns all of the countries with names containing the specified substring.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
name

Country name to search for as a substring.

string

None.

all

Fetch all countries.

boolean

Default value is False

Body Parameters

None.

Response Information

Resource Description

Collection of CountryDTO
NameDescriptionTypeAdditional information
ID

Country ID.

integer

None.

Name

Country name.

string

None.

Alpha2

string

None.

Alpha3

string

None.

ISO31661

Country's ISO 31661 code.

string

None.

CurrencyID

Country's currency ID.

integer

None.

Currency

Country's currency data.

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "ID": 1,
    "Name": "sample string 2",
    "Alpha2": "sample string 3",
    "Alpha3": "sample string 4",
    "ISO31661": "sample string 5",
    "CurrencyID": 1,
    "Currency": {
      "ID": 1,
      "Name": "sample string 2",
      "Code": "sample string 3",
      "Sign": "sample string 4",
      "EndDate": "2025-06-28T19:35:42.6262637+00:00"
    },
    "BankID": 1,
    "value": 6,
    "text": 7
  },
  {
    "ID": 1,
    "Name": "sample string 2",
    "Alpha2": "sample string 3",
    "Alpha3": "sample string 4",
    "ISO31661": "sample string 5",
    "CurrencyID": 1,
    "Currency": {
      "ID": 1,
      "Name": "sample string 2",
      "Code": "sample string 3",
      "Sign": "sample string 4",
      "EndDate": "2025-06-28T19:35:42.6262637+00:00"
    },
    "BankID": 1,
    "value": 6,
    "text": 7
  }
]

text/html

Sample:
[{"ID":1,"Name":"sample string 2","Alpha2":"sample string 3","Alpha3":"sample string 4","ISO31661":"sample string 5","CurrencyID":1,"Currency":{"ID":1,"Name":"sample string 2","Code":"sample string 3","Sign":"sample string 4","EndDate":"2025-06-28T19:35:42.6262637+00:00"},"BankID":1,"value":6,"text":7},{"ID":1,"Name":"sample string 2","Alpha2":"sample string 3","Alpha3":"sample string 4","ISO31661":"sample string 5","CurrencyID":1,"Currency":{"ID":1,"Name":"sample string 2","Code":"sample string 3","Sign":"sample string 4","EndDate":"2025-06-28T19:35:42.6262637+00:00"},"BankID":1,"value":6,"text":7}]

application/xml, text/xml

Sample:
<ArrayOfCountryDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs">
  <CountryDTO>
    <Alpha2>sample string 3</Alpha2>
    <Alpha3>sample string 4</Alpha3>
    <BankID>1</BankID>
    <Currency>
      <Code>sample string 3</Code>
      <EndDate>2025-06-28T19:35:42.6262637+00:00</EndDate>
      <ID>1</ID>
      <Name>sample string 2</Name>
      <Sign>sample string 4</Sign>
    </Currency>
    <CurrencyID>1</CurrencyID>
    <ID>1</ID>
    <ISO31661>sample string 5</ISO31661>
    <Name>sample string 2</Name>
    <text>7</text>
    <value>6</value>
  </CountryDTO>
  <CountryDTO>
    <Alpha2>sample string 3</Alpha2>
    <Alpha3>sample string 4</Alpha3>
    <BankID>1</BankID>
    <Currency>
      <Code>sample string 3</Code>
      <EndDate>2025-06-28T19:35:42.6262637+00:00</EndDate>
      <ID>1</ID>
      <Name>sample string 2</Name>
      <Sign>sample string 4</Sign>
    </Currency>
    <CurrencyID>1</CurrencyID>
    <ID>1</ID>
    <ISO31661>sample string 5</ISO31661>
    <Name>sample string 2</Name>
    <text>7</text>
    <value>6</value>
  </CountryDTO>
</ArrayOfCountryDTO>