We have updated our API Terms of Service. Please review the entire terms before continuing to use the API. Your use of the API means you accept and agree to the updated API Terms of Service found here: https://rescuegroups.org/api-terms-of-service/

Examples

Action add

$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"),
				),
		),
);

Action edit

$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"),
				),
		),
);

Action search

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")
		),
);
  • No labels