GET api/Town/GetTownByCity/{cityCode}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| cityCode | 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": "0edacecc-2cdc-4d78-98d9-79f8d911f499",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2026-03-22T18:26:11.3950976-04:00",
"StateId": "3609f24c-12aa-4d5d-8c95-7d74b75fce9a",
"State": {
"Id": "9bb9edb8-3fb0-40e0-9c37-e3e544727a72",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2026-03-22T18:26:11.3950976-04:00"
}
},
{
"Id": "0edacecc-2cdc-4d78-98d9-79f8d911f499",
"Name": "sample string 2",
"Code": "sample string 3",
"CityName": "sample string 4",
"CityCode": "sample string 5",
"CreatedOn": "2026-03-22T18:26:11.3950976-04:00",
"StateId": "3609f24c-12aa-4d5d-8c95-7d74b75fce9a",
"State": {
"Id": "9bb9edb8-3fb0-40e0-9c37-e3e544727a72",
"Name": "sample string 2",
"Code": "sample string 3",
"CreatedOn": "2026-03-22T18:26:11.3950976-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-03-22T18:26:11.3950976-04:00</CreatedOn>
<Id>0edacecc-2cdc-4d78-98d9-79f8d911f499</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2026-03-22T18:26:11.3950976-04:00</CreatedOn>
<Id>9bb9edb8-3fb0-40e0-9c37-e3e544727a72</Id>
<Name>sample string 2</Name>
</State>
<StateId>3609f24c-12aa-4d5d-8c95-7d74b75fce9a</StateId>
</TownModel>
<TownModel>
<CityCode>sample string 5</CityCode>
<CityName>sample string 4</CityName>
<Code>sample string 3</Code>
<CreatedOn>2026-03-22T18:26:11.3950976-04:00</CreatedOn>
<Id>0edacecc-2cdc-4d78-98d9-79f8d911f499</Id>
<Name>sample string 2</Name>
<State>
<Code>sample string 3</Code>
<CreatedOn>2026-03-22T18:26:11.3950976-04:00</CreatedOn>
<Id>9bb9edb8-3fb0-40e0-9c37-e3e544727a72</Id>
<Name>sample string 2</Name>
</State>
<StateId>3609f24c-12aa-4d5d-8c95-7d74b75fce9a</StateId>
</TownModel>
</data>
</ResponseGetTownsModel>