GET api/Town/GetTown/{stateCode}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| stateCode | string |
Required |
Body Parameters
None.
Response Information
Resource Description
ResponseGetTownsModel| Name | Description | Type | Additional information |
|---|---|---|---|
| data | Collection of TownModel |
None. |
|
| message | string |
None. |
|
| success | boolean |
None. |
|
| total | integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"data": [
{
"Id": "7293ed91-b6a7-49be-9fdd-fde9cc689415",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2026-06-24T15:44:04.995335-04:00",
"StateId": "0dd58594-88e8-42bd-906c-da9367b9fdf0",
"State": {
"Id": "395f6a5c-bcb0-4c31-b699-16ffc6b0e8d0",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2026-06-24T15:44:04.9963231-04:00"
}
},
{
"Id": "7293ed91-b6a7-49be-9fdd-fde9cc689415",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2026-06-24T15:44:04.995335-04:00",
"StateId": "0dd58594-88e8-42bd-906c-da9367b9fdf0",
"State": {
"Id": "395f6a5c-bcb0-4c31-b699-16ffc6b0e8d0",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2026-06-24T15:44:04.9963231-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>2026-06-24T15:44:04.995335-04:00</CreatedOn>
<Id>7293ed91-b6a7-49be-9fdd-fde9cc689415</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2026-06-24T15:44:04.9963231-04:00</CreatedOn>
<Id>395f6a5c-bcb0-4c31-b699-16ffc6b0e8d0</Id>
<Name>sample string 2</Name>
</State>
<StateId>0dd58594-88e8-42bd-906c-da9367b9fdf0</StateId>
</TownModel>
<TownModel>
<CityCode>sample string 5</CityCode>
<CityName>sample string 4</CityName>
<Code>sample string 3</Code>
<CreatedOn>2026-06-24T15:44:04.995335-04:00</CreatedOn>
<Id>7293ed91-b6a7-49be-9fdd-fde9cc689415</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2026-06-24T15:44:04.9963231-04:00</CreatedOn>
<Id>395f6a5c-bcb0-4c31-b699-16ffc6b0e8d0</Id>
<Name>sample string 2</Name>
</State>
<StateId>0dd58594-88e8-42bd-906c-da9367b9fdf0</StateId>
</TownModel>
</data>
</ResponseGetTownsModel>