GetStatistics

Overview

Returns various statistics based on information sent via an http form post.

Post Url

https://www.allclients.com/api/2/GetStatistics.aspx
  • SSL is requred
  • White Label CRM Customers: Replace www.allclients.com with your White Label CRM domain name.

Form Fields

Field Max Length* Required Notes
response_type No Default results will be returned in XML.Set this field value to json to return results in JSON format
accountid Yes Must be numeric. Account ID for this account. Found in Settings > API Settings or for White Label CRM in the Admin control panel
teammemberid Varies based on report_type
apikey Yes API Key for this account. Found in Settings > API Settings or for White Label CRM in the Admin control panel
report_type Yes Specifies the type of report statistic. See report_type table below
start_date Varies based on report_type
end_date Varies based on report_type

Values for report_type

 

Value Description Optional Fields
contactsbyoptinstatus Contacts by Opt In Status teammemberid
contactsbycategory Contacts by Category teammemberid, start_date,end_date
contactsbycategory2 Contacts by Category 2 (Custom Category) teammemberid, start_date,end_date
contactsbysource Contacts by Source teammemberid, start_date,end_date
contactsbycity Contacts by City teammemberid
contactsbypostalcode Contacts by Postal Code teammemberid, start_date,end_date
notesummary Notes Summary (Note Date and Contact Id) teammemberid, start_date,end_date

Set teammemberid to -1 to get summary for entire account

Sample Results

Success Message (This example is for “contactsbyoptinstatus” by the results structure is similar for each report_type)

<results>
  <statistics>
    <item>
      <element>optin</element>
      <count>145</count>
    </item>
    <item>
      <element>optout</element>
      <count>5</count>
    </item>
    <item>
      <element>pending</element>
      <count>5</count>
    </item>
    <item>
      <element>bounced</element>
      <count>17</count>
    </item>
    <item>
      <element>spamreport</element>
      <count>1</count>
    </item>
    <item>
      <element>unknown</element>
      <count>152</count>
    </item>
  </statistics>
</results>

Sample Failure Message

<?xml version="1.0"?>
<results>
    <error>Authentication failed</error>
</results>