SOAP API - GetStates
GetStates( countryID ) : State[]
Since: EngageIP v25.2
Returns the list of states/provinces that belong to the specified country ID, or throws exception if the country does not exist.
This method returns a list of State objects that belong to the specified country. A state object consists of the following properties:
ID (Integer) - The unique ID for this state/province
CountryID (Integer) - The ID of the country for which this state belongs
Name (String) - The name/abbreviation of the state/province such as NY, ON, etc.
SortOrder (Integer) - The number identifying the position of this state in the list of states for the country
LongName (String) - The full name of the state such as "New York", "Ontario" etc.
Parameters:
countryID (Integer) - The ID of the country for which the list of states are to be retrieved. An exception will be thrown if the country does not exist.
Returns:
An array of State objects that belong to the specified country
Possible Exceptions:
INVALID COUNTRY 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>
<GetStates xmlns="Logisense_EngageIP">
<countryID>int</countryID>
</GetStates>
</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>
<GetStatesResponse xmlns="Logisense_EngageIP">
<GetStatesResult>
<State>
<Validate />
<ID>int</ID>
<CountryID>int</CountryID>
<Name>string</Name>
<SortOrder>int</SortOrder>
<LongName>string</LongName>
</State>
<State>
<Validate />
<ID>int</ID>
<CountryID>int</CountryID>
<Name>string</Name>
<SortOrder>int</SortOrder>
<LongName>string</LongName>
</State>
</GetStatesResult>
</GetStatesResponse>
</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/GetStates"
<?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>
<GetStates xmlns="Logisense_EngageIP">
<countryID>int</countryID>
</GetStates>
</soap:Body>
</soap:Envelope>