Retrieve the list of animal statuses that can be made public.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "getPublicableStatuses", ); |
Retrieve the list of animal statuses that are currently public.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "getPublicStatuses", ); |
Set the animal statuses that should be public. The array of statuses must include all statuses that you want to be public.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "setPublicStatuses", "values" => array( array( "statuslist" => array("1"), ), ), ); |
Get the first 10 adoptable dogs, sorted by animalID ascending.
$data = array( "apikey" => $publicApiKey, "objectType" => "animals", "objectAction" => "publicSearch", "search" => array ( "resultStart" => 0, "resultLimit" => 10, "resultSort" => "animalID", "resultOrder" => "asc", "calcFoundRows" => "Yes", "filters" => array( array( "fieldName" => "animalStatus", "operation" => "equal", "criteria" => "Available", ), array( "fieldName" => "animalSpecies", "operation" => "equal", "criteria" => "Dog", ), ), "fields" => array("animalName"), ), ); |
Get the first 10 small available/adoptable animals ordered by animalID ascending.
$data = array( "apikey" => $publicApiKey, "objectType" => "animals", "objectAction" => "publicSearch", "search" => array ( "resultStart" => 0, "resultLimit" => 10, "resultSort" => "animalID", "resultOrder" => "asc", "filters" => array( array( "fieldName" => "animalStatus", "operation" => "equal", "criteria" => "Available", ), array( "fieldName" => "animalGeneralSizePotential", "operation" => "equal", "criteria" => "Small", ), ), "fields" => array("animalID", "animalOrgID", "animalName", "animalBreed"), ), ); |
Retrieve the list of currently disabled animal fields.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "getDisabledFields", ); |
Set the field animalAdoptedDate to disabled. All other fields will be enabled.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "setDisabledFields", "values" => array( array( "fieldlist" => array("animalAdoptedDate"), ), ), ); |
Set the field animalAdoptedDate to required. All other fields will not be required (other than those required by the system).
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "setRequiredFields", "values" => array( array( "fieldlist" => array("animalAdoptedDate"), ), ), ); |
Add an animal
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "add", "values" => array( array( "animalName" => "testing", "animalSpeciesID" => "Cat", "animalPrimaryBreedID" => "1", "animalSecondaryBreedID" => "2", "animalStatusID" => "1", "animalDescription" => "This is the description of this cat!", ), ), ); |
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "add", "values" => array( array( "animalName" => "Testing", "animalSpeciesID" => "Cat", "animalPrimaryBreedID" => "1", "animalSecondaryBreedID" => "17", "animalStatusID" => "1", "animalFound" => "No", ), ), ); |
Edit an animal.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "edit", "values" => array( array( "animalID" => $validPK, "animalName" => "edited testing first name", "animalSpeciesID" => "Dog", "animalPrimaryBreedID" => "419", "animalSecondaryBreedID" => "421", "animalStatusID" => "2", "animalFound" => "No", ), ), ); |
Change an animal's animal groups.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "edit", "values" => array( array( "animalID" => "1", "animalGroups" => array("0" => "1", "1" => "85"), ), ), ); |
Retrieve the list of videos associated with a specific animal. In this case we are actually getting the videos for two animals at the same time.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => "animals", "objectAction" => "videos", "values" => array ( "0" => array( "animalID" => 1, ), "1" => array( "animalID" => 2, ), ), ); |
Retrieve the list of video URLs (YouTube videos) associated with a specific animal.
$data = array( "token" => $token, "tokenHash" => $tokenHash, "objectType" => x, "objectAction" => "youtubeUrls", "values" => array ( "0" => array( "animalID" => 1, ), ), ); |