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": "265abe76-66e4-43ae-83ed-fc070bdbd510",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2026-01-22T17:23:50.4155097-04:00",
"StateId": "9783b550-165d-4640-8666-4f0422846758",
"State": {
"Id": "b95ec090-cb1f-436b-adef-db2df0feed75",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2026-01-22T17:23:50.4155097-04:00"
}
},
{
"Id": "265abe76-66e4-43ae-83ed-fc070bdbd510",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2026-01-22T17:23:50.4155097-04:00",
"StateId": "9783b550-165d-4640-8666-4f0422846758",
"State": {
"Id": "b95ec090-cb1f-436b-adef-db2df0feed75",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2026-01-22T17:23:50.4155097-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-01-22T17:23:50.4155097-04:00</CreatedOn>
<Id>265abe76-66e4-43ae-83ed-fc070bdbd510</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2026-01-22T17:23:50.4155097-04:00</CreatedOn>
<Id>b95ec090-cb1f-436b-adef-db2df0feed75</Id>
<Name>sample string 2</Name>
</State>
<StateId>9783b550-165d-4640-8666-4f0422846758</StateId>
</TownModel>
<TownModel>
<CityCode>sample string 5</CityCode>
<CityName>sample string 4</CityName>
<Code>sample string 3</Code>
<CreatedOn>2026-01-22T17:23:50.4155097-04:00</CreatedOn>
<Id>265abe76-66e4-43ae-83ed-fc070bdbd510</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2026-01-22T17:23:50.4155097-04:00</CreatedOn>
<Id>b95ec090-cb1f-436b-adef-db2df0feed75</Id>
<Name>sample string 2</Name>
</State>
<StateId>9783b550-165d-4640-8666-4f0422846758</StateId>
</TownModel>
</data>
</ResponseGetTownsModel>