Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Examples

Action add

Code Block
languagephp
$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

Code Block
languagephp
$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.

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