GET Departments API

Updated on 2014-05-21
Current Version: Version 1
Deprecated Version: NA
Requests Allowed: GET&SOAP

Summary:

Returns an array of departments.

Resource/WSDL Page:

http://<your_domain_here>/api/1/get.asmx?op=Departments

Parameters

api_key
Required
Type: STRING
Length (Max/Min): 50

Must be a valid API key (existing and not expired) 

Example Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh

 **Note all optional parameters still need to be passed through in the actual call. These parameters do not need a value (therefore you can use a null value). 

 

Example Request

GET

http://demo.cakemarketing.com/api/1/get.asmx/Departments?api_key=dNJFmId9rI

 

Sample XML Response:

<departments_response>
  <success>true</success>
  <row_count>8</row_count>
  <departments>
    <department>
      <department_id>2</department_id>
      <department_name>Accounting</department_name>
    </department>
    <department>
      <department_id>7</department_id>
      <department_name>Decision Maker</department_name>
    </department>
    <department>
      <department_id>1</department_id>
      <department_name>Department 1</department_name>
    </department>
    <department>
      <department_id>3</department_id>
      <department_name>Main Contact</department_name>
    </department>
    <department>
      <department_id>6</department_id>
      <department_name>Making Money Department</department_name>
    </department>
    <department>
      <department_id>4</department_id>
      <department_name>TEAM CHIE</department_name>
    </department>
    <department>
      <department_id>5</department_id>
      <department_name>TEAM GARTH</department_name>
    </department>
    <department>
      <department_id>8</department_id>
      <department_name>TEAM QA</department_name>
    </department>
  </departments>
</departments_response>

Example Error Messages:  

Error Message

Likely Cause

Invalid API Key

API key does not exist or is expired