API v1 Reference

List States

The list of States is a standard field in NeonCRM and cannot be customized. This request retrieves a list of available states.

Note: Canadian Provinces are included in this list. For Canadian Provinces, use this field. Do not use the Provinces field.

REST

Request

https://api.neoncrm.com/neonws/services/api/account/listStates?userSessionId=[session id]

Response

{ "listStatesResponse": { 
    "operationResult": "SUCCESS", 
    "responseMessage": "75 records were found.", 
    "responseDateTime": "2012-12-27T01:26:57.353-06:00", 
    "states": { 
        "state": [ 
            { "code": "AL", "name": "ALABAMA" }, 
            { "code": "AK", "name": "ALASKA" }, 
            { "code": "AZ", "name": "ARIZONA" }, 
            { "code": "AR", "name": "ARKANSAS" }
            ...
            ] 
        } 
    } 
}

SOAP

Request

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:neon="http://www.z2systems.com/schemas/neonws/">
   <soapenv:header>
       <soapenv:body>
          <neon:liststatesrequest>
             <usersessionid>T1357624094982</usersessionid>
          </neon:liststatesrequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:liststatesresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>75 records were found.</responsemessage>
         <responsedatetime>2013-01-08T01:24:55.527-06:00</responsedatetime>
         <states>
            <state>
               <code>AL</code>
               <name>ALABAMA</name>
            </state>
            <state>
               <code>AK</code>
               <name>ALASKA</name>
            </state>
            <state>
               <code>AZ</code>
               <name>ARIZONA</name>
            </state>
            <state>
               <code>AR</code>
               <name>ARKANSAS</name>
            </state>
            ...
         </states>
      </ns2:liststatesresponse>
   </soap:body>
</soap:envelope>

Response Parameters

Name Required Description
state.code Yes Code for a particular state.
state.name Yes Display name for a particular state.