Method
GET
Search Endpoint
https://api.callcap.com/v2/get/accounts/
Querying this endpoint with no parameters will return all of the top-level "Corporate" Callcap Accounts your login has access to.
Resource Endpoint
https://api.callcap.com/v2/get/accounts/?account_type=<account_type>&account_id=<account_id>
Querying this endpoint with account_type and account_id will return Account information for the specified account as well as its child Accounts.

Parameters

Note: Either both parameters must be omitted (to return all top-level Accounts) or both parameters must be present

Name Description Default Accepted values
account_type The "type" of the Account requested (None) String; One of "corporate", "division", or "location".
account_id The numeric identifier for the Account requested (None) Numeric; One number corresponding to a corporate_id, division_id or location_id of a Callcap Account.
location_external_id The alpha-numeric identifier for the Location (None) Alpha-numeric; Can be a list of ID's assigned to a Location
division_external_id The alpha-numeric identifier for the Division (None) Alpha-numeric; Can be a list of ID's assigned to a Division

Example JSON responses (formatted for clarity)

Blank request to return all top-level accounts
{
    "status": "success",
    "info": "All accessible Callcap top-level accounts",
    "children":
    [
      {
        "account_type": "corporate",
        "account_name": "WidgetsRUs",
        "account_id": 1
      },
      {
        "account_type": "corporate",
        "account_name": "GadgetsRUs",
        "account_id": 2
      },
      {
        "account_type": "corporate",
        "account_name": "HoldingsRUs",
        "account_id": 3
      }
    ]
  }
  
Request for specific Corporate account and its child Divisions
{
    "status": "success",
    "info":
    {
      "account_type": "corporate",
      "account_name": "Widgets of Bob",
      "account_id": 1,
      "parent": { }
    },
    "children":
    [
      {
        "account_type": "division",
        "account_name": "Widgets Corporate",
        "account_id": 15
      },
      {
        "account_type": "division",
        "account_name": "Widgets Central",
        "account_id": 16
      },
      {
        "account_type": "division",
        "account_name": "Widgets West",
        "account_id": 17
      }
    ]
  }
  
  • status is a string attribute present on every response and will be "success" when a successful request is completed.
  • info is an object containing information about the requested Account. Note: When returning all top-level Accounts, info is a string.
  • children is an array of objects, with each object containing details on a specific child Account under the requested Account.