GET api/Country/GetCountryById

Request Information

URI Parameters

None.

Body Parameters

PublicIdDTO
NameDescriptionTypeAdditional information
Id

integer

None.

sId

string

None.

isStatus

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "sId": "sample string 2",
  "isStatus": true
}

application/xml, text/xml

Sample:
<PublicIdDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Application.DTOs">
  <Id>1</Id>
  <isStatus>true</isStatus>
  <sId>sample string 2</sId>
</PublicIdDTO>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'PublicIdDTO'.

Response Information

Resource Description

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

application/xml, text/xml

Sample:
<CountryDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Application.DTOs">
  <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>