GET api/Town/GetTown/{stateCode}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
stateCode

string

Required

Body Parameters

None.

Response Information

Resource Description

ResponseGetTownsModel
NameDescriptionTypeAdditional information
data

Collection of TownModel

None.

message

string

None.

success

boolean

None.

total

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "data": [
    {
      "Id": "8f4d1db7-a58c-4ae7-8d8f-66c48763d148",
      "Name": "sample string 2",
      "Code": "sample string 3",
      "CityName": "sample string 4",
      "CityCode": "sample string 5",
      "CreatedOn": "2025-12-05T23:28:10.8779904-04:00",
      "StateId": "188df93e-14aa-4ea4-90e9-62501005423c",
      "State": {
        "Id": "f6f57fe4-e049-4683-ab79-9813b5065163",
        "Name": "sample string 2",
        "Code": "sample string 3",
        "CreatedOn": "2025-12-05T23:28:10.8779904-04:00"
      }
    },
    {
      "Id": "8f4d1db7-a58c-4ae7-8d8f-66c48763d148",
      "Name": "sample string 2",
      "Code": "sample string 3",
      "CityName": "sample string 4",
      "CityCode": "sample string 5",
      "CreatedOn": "2025-12-05T23:28:10.8779904-04:00",
      "StateId": "188df93e-14aa-4ea4-90e9-62501005423c",
      "State": {
        "Id": "f6f57fe4-e049-4683-ab79-9813b5065163",
        "Name": "sample string 2",
        "Code": "sample string 3",
        "CreatedOn": "2025-12-05T23:28:10.8779904-04:00"
      }
    }
  ],
  "message": "sample string 1",
  "success": true,
  "total": 3
}

application/xml, text/xml

Sample:
<ResponseGetTownsModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/UnderArmorAPI.Models">
  <message>sample string 1</message>
  <success>true</success>
  <total>3</total>
  <data>
    <TownModel>
      <CityCode>sample string 5</CityCode>
      <CityName>sample string 4</CityName>
      <Code>sample string 3</Code>
      <CreatedOn>2025-12-05T23:28:10.8779904-04:00</CreatedOn>
      <Id>8f4d1db7-a58c-4ae7-8d8f-66c48763d148</Id>
      <Name>sample string 2</Name>
      <State>
        <Code>sample string 3</Code>
        <CreatedOn>2025-12-05T23:28:10.8779904-04:00</CreatedOn>
        <Id>f6f57fe4-e049-4683-ab79-9813b5065163</Id>
        <Name>sample string 2</Name>
      </State>
      <StateId>188df93e-14aa-4ea4-90e9-62501005423c</StateId>
    </TownModel>
    <TownModel>
      <CityCode>sample string 5</CityCode>
      <CityName>sample string 4</CityName>
      <Code>sample string 3</Code>
      <CreatedOn>2025-12-05T23:28:10.8779904-04:00</CreatedOn>
      <Id>8f4d1db7-a58c-4ae7-8d8f-66c48763d148</Id>
      <Name>sample string 2</Name>
      <State>
        <Code>sample string 3</Code>
        <CreatedOn>2025-12-05T23:28:10.8779904-04:00</CreatedOn>
        <Id>f6f57fe4-e049-4683-ab79-9813b5065163</Id>
        <Name>sample string 2</Name>
      </State>
      <StateId>188df93e-14aa-4ea4-90e9-62501005423c</StateId>
    </TownModel>
  </data>
</ResponseGetTownsModel>