$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "contacts", "objectAction" => "add", "values" => array( array( "contactFirstname" => "Testing", "contactState" => "MD", "contactPlus4" => "1234", "contactClass" => "Individual/Family", "contactGroups" => array("6","2"), ), ), ); |
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "contacts", "objectAction" => "edit", "values" => array( array( "contactID" => $validPK, "contactFirstname" => "edited testing first name", "contactState" => "MD", "contactPlus4" => "1234", "contactClass" => "Individual/Family", "contactSendMail" => "Yes", "contactActive" => "Yes", "contactCaretakerPublic" => "No", "contactCoalitionMember" => "No", "contactGroups" => array("6","11"), ), ), ); |
Search for the first 200 contacts where first name is John or last name is Doe. This is done using the filterProcessing property.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "contacts", "objectAction" => "search", "search" => array ( "resultStart" => 0, "resultLimit" => 200, "resultSort" => "contactFirstname", "resultOrder" => "asc", "filters" => array( array( "fieldName" => "contactFirstname", "operation" => "equal", "criteria" => "John", ), array( "fieldName" => "contactLastname", "operation" => "equal", "criteria" => "Doe", ), ), "filterProcessing" => "1 or 2", "fields" => array("contactID","contactFirstname","contactLastname","contactCompany","contactEmail") ), ); |