Tools and News for Developers using the AllClients Platform

GetContacts

Overview

Lists contact or contacts based on information sent via an http form post.

Important Note about pagingsizeIt will be required at a future date.

Post Url

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

Notes

  • March 2018 – Name Matching: categoryid, category2id, sourceid, and flagid can also be selected by their name value (instead of id).   For example, if source name to match was “Outbound Marketing”, you could put the value name:Outbound Marketing in the sourceid field and it would filter the list to contacts with the source Outbound Marketing

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
pagingsize Strongly Recommended Number of results to return per API call
* Will be required in the future
pagingoffset Strongly Recommended Number of records to offset. (If your pagingsize was 100, then you’d offset 100 records on your second call to the API)
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 No Must be numeric. ID of Team Member database that contact record belongs to. Leave blank for all account contacts.
apikey Yes API Key for this account. Found in Settings > API Settings or for White Label CRM in the Admin control panel
contactid No Specify contact id using the database id. (Optional). If this contactid is left blank, all contacts for this account will be displayed.
email or otheremail No Specify an email address.Multiple matches will be returned if multiple contacts have the same email address.
phone No Specify a phone number. Searches all 4 contact phone number fields.Multiple matches will be returned if multiple contacts have the same phone number.
Other text fields: firstname, lastname, otherfirstname, otherlastname, company, address, city, state, postalcode, custom1 through custom20 No Multiple matches will be returned if multiple contacts have matching data.
categoryid No Specify a Category ID. Only contacts with matching Category ID will be returnedAlso use “name:” matching (see notes)
category2id No Specify a Category 2 ID. Only contacts with matching Category 2 ID will be returned. (Category 2 is the customizable 2nd category that can be named whatever the user would like)Also use “name:” matching (see notes)
flagid No Specify a Flag ID. Only contacts assigned a matching Flag will be returnedAlso use “name:” matching (see notes)
sourceid No Specify a Source ID. Only contacts with matching Source ID will be returnedAlso use “name:” matching (see notes)
othersystemid No Specify contact id using the database Other System ID. (Optional).
importbatchid No Specify Import Batch ID. Only used in very rare circumstances. (Optional).
clienttouch 1 No Specify “1” to display only contacts that are in the Team Member’s ClientTouch. Be sure to specific the proper TeamMemberID, otherwise account owner’s ClientTouch group will be used.
getcategories 1 No Specify “1” to display additional category details with the resultsPlease note: Use this option only when needed. This will slow down your results.
getflags 1 No Specify “1” to display flags assigned to the contact with the resultsPlease note: Use this option only when needed. This will slow down your results.
getsource 1 No Specify “1” to display additional source details with the resultsPlease note: Use this option only when needed. This will slow down your results.
getteam 1 No Specify “1” to display team database that the contact is assigned toPlease note: Use this option only when needed. This will slow down your results.
adddateafter No Enter a date is US Date / Time Format   example:  4/24/2013 2:01PMOnly contacts added after the date given will be returned.

4/24/2013 assumes midnight, so anything added on or after 4/24/2013 would be included.

Time Zone for Add Date is US Central Time

aftereditdate No Enter a date is US Date / Time Format   example:  4/24/2013 2:01PMOnly Contacts edited after the date given will be returned.

4/24/2013 assumes midnight, so anything added on or after 4/24/2013 would be included.

Time Zone for Edit Date is US Central Time

* An error will not result if Max Length is exceeded. Data will be trimmed to this length. 

Sample Results

Success Message (for 1 contact – not all fields displayed – blank fields are omitted from the results)

<results>
  <contacts>
    <contact>
      <id>4302</id>
      <accountid>2</accountid>
      <firstname>Adam</firstname>
      <lastname>Dalton</lastname>
      <phone1>(707) 555-1234</phone1>
      <phone1note>Cell</phone1note>
      <email>test@email.com</email>
      <adddate>10/26/2006 12:38:15 PM</adddate>
      <editdate>10/26/2006 12:38:15 PM</editdate>
      <inactive>False</inactive>
      <category>
        <id>2</id>
        <name>HOT</name>
      </category>
      <flags>
        <flag>
          <id>576</id>
          <name>High Value Prospect</name>
        </flag>
      </flags>
      <referralcontactid>3233</referralcontactid>
    </contact>
  </contacts>
</results>

Sample Failure Message

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