SOAP API - GetCities
GetCities( stateID ) : City[]
Since: EngageIP v25.2
Returns the list of cities which belong to a specified state, or throws exception if the state does not exist.
This method returns an array of City objects. A city object has the following properties:
ID (Integer) – Unique ID for this city
Name (String) – The name of the city
CountryID (Integer) – The ID of the country to which this city belongs
SortOrder (Integer) – The position where this city belongs within the list of available cities
StateID (Integer) – The ID of the state to which this city belongs
Parameters:
stateID (Integer) - The ID of the state to retrieve the list of cities. An exception will be thrown if the ID does not exist.
Returns:
An array of City objects
Possible Exceptions:
INVALID STATE ID
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /adminportal/webservice.asmx HTTP/1.1
Host: demo.logisense.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<AuthHeader xmlns="Logisense_EngageIP">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap12:Header>
<soap12:Body>
<GetCities xmlns="Logisense_EngageIP">
<stateID>int</stateID>
</GetCities>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetCitiesResponse xmlns="Logisense_EngageIP">
<GetCitiesResult>
<City>
<Validate />
<ID>int</ID>
<Name>string</Name>
<CountyID>int</CountyID>
<SortOrder>int</SortOrder>
<StateID>int</StateID>
</City>
<City>
<Validate />
<ID>int</ID>
<Name>string</Name>
<CountyID>int</CountyID>
<SortOrder>int</SortOrder>
<StateID>int</StateID>
</City>
</GetCitiesResult>
</GetCitiesResponse>
</soap12:Body>
</soap12:Envelope>
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /adminportal/webservice.asmx HTTP/1.1
Host: demo.logisense.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "Logisense_EngageIP/GetCities"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthHeader xmlns="Logisense_EngageIP">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap:Header>
<soap:Body>
<GetCities xmlns="Logisense_EngageIP">
<stateID>int</stateID>
</GetCities>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetCitiesResponse xmlns="Logisense_EngageIP">
<GetCitiesResult>
<City>
<Validate />
<ID>int</ID>
<Name>string</Name>
<CountyID>int</CountyID>
<SortOrder>int</SortOrder>
<StateID>int</StateID>
</City>
<City>
<Validate />
<ID>int</ID>
<Name>string</Name>
<CountyID>int</CountyID>
<SortOrder>int</SortOrder>
<StateID>int</StateID>
</City>
</GetCitiesResult>
</GetCitiesResponse>
</soap:Body>
</soap:Envelope>