QuickSearchContacts

Overview

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

Special Notes

This function is designed for speed — searching only First Name, Last Name, Other First Name, Other Last Name, Email Address, and Other Email Address.  It also returns only a limited number of fields and is limited to 50 results returned.   This would be best used in some kind of “type-along-find” Ajax contact picker.   Lower the “max results” to an even lower number to speed up the results even further.

Update 6/1/2017 – When the searchstring contains a space, the search will split the field in two and assume that it is a “first name+last name” “begins with” search.   A searchstring of “jo sm” with search for contacts with first names beginning with “jo” and last names beginning with “sm”

Post Url

https://hyperdrivepro.morethanrewards.com/api/2/QuickSearchContacts.aspx

- SSL is required

Form Fields

FieldMax Length*RequiredNotes
response_type
YesSet this field value to json to return results in JSON format
accountid
YesMust be numeric. Account ID for this account. 
teammemberid
NoDefault is 0 for Account Owner

Use -1 to search across all team member databases

apikey
YesAPI Key for this account.
searchstring
YesString to search contact for.  Search will search First Name, Last Name, Other First Name, Other Last Name, and Email Address
maxresults
NoNumber of results to return.  Specify between 1 and 50.  Default is 20 results.

Sample Results

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

 

<results>
   <contacts>
     <contact>
       <id>4302</id>
       <teammemberid>0</teammemberid>
       <name>Bob & Betty Smith</name>
       <email>bob@smith.com</email>
       <otheremail>betty@smith.com</otheremail>
     </contact>
   </contacts> 
</results>

Sample Failure Message

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