GET api/Country/GetAllCountryByState

Request Information

URI Parameters

None.

Body Parameters

None.

Response Information

Resource Description

Collection of CountryDTO
NameDescriptionTypeAdditional information
id

integer

None.

name

string

None.

States

Collection of StateDTO

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "id": 1,
    "name": "sample string 2",
    "States": [
      {
        "id": 1,
        "name": "sample string 2",
        "abbreviation": "sample string 3",
        "countryId": 4
      },
      {
        "id": 1,
        "name": "sample string 2",
        "abbreviation": "sample string 3",
        "countryId": 4
      }
    ]
  },
  {
    "id": 1,
    "name": "sample string 2",
    "States": [
      {
        "id": 1,
        "name": "sample string 2",
        "abbreviation": "sample string 3",
        "countryId": 4
      },
      {
        "id": 1,
        "name": "sample string 2",
        "abbreviation": "sample string 3",
        "countryId": 4
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfCountryDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Application.DTOs">
  <CountryDTO>
    <States>
      <StateDTO>
        <abbreviation>sample string 3</abbreviation>
        <countryId>4</countryId>
        <id>1</id>
        <name>sample string 2</name>
      </StateDTO>
      <StateDTO>
        <abbreviation>sample string 3</abbreviation>
        <countryId>4</countryId>
        <id>1</id>
        <name>sample string 2</name>
      </StateDTO>
    </States>
    <id>1</id>
    <name>sample string 2</name>
  </CountryDTO>
  <CountryDTO>
    <States>
      <StateDTO>
        <abbreviation>sample string 3</abbreviation>
        <countryId>4</countryId>
        <id>1</id>
        <name>sample string 2</name>
      </StateDTO>
      <StateDTO>
        <abbreviation>sample string 3</abbreviation>
        <countryId>4</countryId>
        <id>1</id>
        <name>sample string 2</name>
      </StateDTO>
    </States>
    <id>1</id>
    <name>sample string 2</name>
  </CountryDTO>
</ArrayOfCountryDTO>