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": "67144cb7-70e3-419a-8abd-554ac57f2c1f",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2025-12-05T23:40:00.6879398-04:00",
"StateId": "78777d63-6079-4d7f-91f4-73c49ff9a465",
"State": {
"Id": "74fc3086-b18a-467b-9b16-9f96824d8c73",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2025-12-05T23:40:00.6889794-04:00"
}
},
{
"Id": "67144cb7-70e3-419a-8abd-554ac57f2c1f",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2025-12-05T23:40:00.6879398-04:00",
"StateId": "78777d63-6079-4d7f-91f4-73c49ff9a465",
"State": {
"Id": "74fc3086-b18a-467b-9b16-9f96824d8c73",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2025-12-05T23:40:00.6889794-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:40:00.6879398-04:00</CreatedOn>
<Id>67144cb7-70e3-419a-8abd-554ac57f2c1f</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2025-12-05T23:40:00.6889794-04:00</CreatedOn>
<Id>74fc3086-b18a-467b-9b16-9f96824d8c73</Id>
<Name>sample string 2</Name>
</State>
<StateId>78777d63-6079-4d7f-91f4-73c49ff9a465</StateId>
</TownModel>
<TownModel>
<CityCode>sample string 5</CityCode>
<CityName>sample string 4</CityName>
<Code>sample string 3</Code>
<CreatedOn>2025-12-05T23:40:00.6879398-04:00</CreatedOn>
<Id>67144cb7-70e3-419a-8abd-554ac57f2c1f</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2025-12-05T23:40:00.6889794-04:00</CreatedOn>
<Id>74fc3086-b18a-467b-9b16-9f96824d8c73</Id>
<Name>sample string 2</Name>
</State>
<StateId>78777d63-6079-4d7f-91f4-73c49ff9a465</StateId>
</TownModel>
</data>
</ResponseGetTownsModel>