GET api/city?name={name}&postcode={postcode}&countryId={countryId}
Returns all of the cities with names or postcodes containing the specified substrings. If both are specified, only the name is used.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| name |
City name to search for as a substring. |
string |
None. |
| postcode |
City post code to search for as a substring. |
string |
None. |
| countryId |
Country ID to search for. |
integer |
None. |
Body Parameters
None.
Response Information
Resource Description
CityDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| text |
City name. |
string |
None. |
| value |
City post code. |
string |
None. |
| CountryID |
Country ID. |
string |
None. |
| CountryName |
Name of the country. |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"text": "sample string 1",
"value": "sample string 2",
"CountryID": "sample string 3",
"CountryName": "sample string 4"
}
text/html
Sample:
{"text":"sample string 1","value":"sample string 2","CountryID":"sample string 3","CountryName":"sample string 4"}
application/xml, text/xml
Sample:
<CityDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs"> <CountryID>sample string 3</CountryID> <CountryName>sample string 4</CountryName> <text>sample string 1</text> <value>sample string 2</value> </CityDTO>