getPersons

Returns all added contacts.

Route /addressbook/getPersons[/:key[/:format[/:limit[/:skip[/:projhash]]]]]
Required Parameters
Optional Parameters format
limit (max:1000)
skip
projhash
Return values hash
assignedOrganisationHash
labels
projects
honorific
firstname
lastname
function
birthday
costumerNumber
description
email
email2
phoneWork
phonePrivate
phoneMobile
fax
facebook
google
twitter
xing
linkedin
cross references getProjects() – This function contains the project hashes.
getLabels() –  This function contains the label ids.
Hints Limit: The maximum limit is 1000. To get more results, please use the parameter skip.
resultCount: Shows the amount of the result without limits. Usefull for pagination.

PARAMETERS

Labeling description values margin default value
projhash Contains a hash of an added project. md5-String
see getProjects()
limit Defines the amount of the returned results. (max:1000) 0-1000 100
skip Defines the starting page of the result. One page equals the the value of limit. (0-9)+ 0
format Defines in which format the result will be returned. json|xml json

RETURN VALUES

LABELing description values margin
hash Id of the contact (a-z0-9){32}
assignedOrganisationHash Id of the associated organisation (a-z0-9){32}
labels Ids of the associated labels array
projects associated projects array
honorific honorific string
firstname Firstname string
lastname Lastname string
function Function string
birthday Birthday YYYY-MM-DD
costumerNumber Costumernumber string
description Description string
email E-Mail string
email2 E-Mail string
phoneWork Pnonenumber – Arbeit string
phonePrivate Pnonenumber- Privat string
phoneMobile Pnonenumber- Mobil string
fax Fax string
facebook Facebook URL string
google Google Plus URL string
twitter Twitter URL string
xing Xing URL string
linkedin Linkedin URL string

MESSAGES

message description
maximum limit exeeded The maximum limit is reached.
no permission The key has no access to this function.
internal error An internal error occured.
param missing A required parameter is missing.
param invalid The value of a parameter is not valid.
result empty The request was successful, but the result itself is empty.
cost error The current credit amount is not sufficient to handle the request.
0k. The processing was successful.

EXEMPLARY CODE

$root = 'https://suite.xovi.net/api/';
$arrayParams = array(
<%%KEEPWHITESPACE%%>                     'service' =>'addressbook',
<%%KEEPWHITESPACE%%>                     'method'  =>'getPersons',
<%%KEEPWHITESPACE%%>                     'key'     =>'myPersonalKey',
<%%KEEPWHITESPACE%%>		  );
$GETparams = implode('/', $arrayParams);

$requestURL = $root.$GETparams;

if (!function_exists('curl_init')) die('cURL not available');

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources
curl_close($ch);

echo $output;
?>

EXEMPLARY RESULTS

JSON

{
<%%KEEPWHITESPACE%%>	"apiErrorCode": 0,
<%%KEEPWHITESPACE%%>	"apiErrorMessage": "0k.",
<%%KEEPWHITESPACE%%>	"apiResult": [{
<%%KEEPWHITESPACE%%>		"hash": "b4b292d0c16f20eee10a7754539a189c",
<%%KEEPWHITESPACE%%>		"assignedOrganisationHash": "02ed57dc391c5a58808b9087a466ef78",
<%%KEEPWHITESPACE%%>		"labels": {
<%%KEEPWHITESPACE%%>			"label_0": "kbdnkaaa",
<%%KEEPWHITESPACE%%>			"label_1": "lbdnkaaa"
<%%KEEPWHITESPACE%%>		},
<%%KEEPWHITESPACE%%>		"projects": {
<%%KEEPWHITESPACE%%>			"project_0": {
<%%KEEPWHITESPACE%%>				"hash": "662dfc3980899852736864b4e43cd374",
<%%KEEPWHITESPACE%%>				"name": "projekt 1"
<%%KEEPWHITESPACE%%>			},
<%%KEEPWHITESPACE%%>			"project_1": {
<%%KEEPWHITESPACE%%>				"hash": "823a1252a8ad6f7c50fd38685de76af2",
<%%KEEPWHITESPACE%%>				"name": "projekt 2"
<%%KEEPWHITESPACE%%>			},
<%%KEEPWHITESPACE%%>			"project_2": {
<%%KEEPWHITESPACE%%>				"hash": "de3e53fc3c70bcc55b392761fa0e8a4e",
<%%KEEPWHITESPACE%%>				"name": "projket 3"
<%%KEEPWHITESPACE%%>			},
<%%KEEPWHITESPACE%%>			"project_3": {
<%%KEEPWHITESPACE%%>				"hash": "3bcc19a8a2e8336b0bedd0c5c3b23254",
<%%KEEPWHITESPACE%%>				"name": "projekt 4"
<%%KEEPWHITESPACE%%>			}
<%%KEEPWHITESPACE%%>		},
<%%KEEPWHITESPACE%%>		"honorific": "Mister",
<%%KEEPWHITESPACE%%>		"firstname": "Apu",
<%%KEEPWHITESPACE%%>		"lastname": "Nahasapeemapetilon",
<%%KEEPWHITESPACE%%>		"function": "seller",
<%%KEEPWHITESPACE%%>		"birthday": "2000-01-01",
<%%KEEPWHITESPACE%%>		"costumerNumber": "abc-123",
<%%KEEPWHITESPACE%%>		"description": "",
<%%KEEPWHITESPACE%%>		"email": "apu@xovi.de",
<%%KEEPWHITESPACE%%>		"email2": "apu@gmx.de",
<%%KEEPWHITESPACE%%>		"phoneWork": "123456/987654",
<%%KEEPWHITESPACE%%>		"phonePrivate": "123456-987654",
<%%KEEPWHITESPACE%%>		"phoneMobile": "123456789",
<%%KEEPWHITESPACE%%>		"fax": "",
<%%KEEPWHITESPACE%%>		"facebook": "",
<%%KEEPWHITESPACE%%>		"google": "",
<%%KEEPWHITESPACE%%>		"twitter": "",
<%%KEEPWHITESPACE%%>		"xing": "",
<%%KEEPWHITESPACE%%>		"linkedin": ""
<%%KEEPWHITESPACE%%>	}]
}

XML

<?xml version="1.0" encoding="UTF-8"?>
<result>
 <apiErrorCode>0</apiErrorCode>
 <apiErrorMessage>0k.</apiErrorMessage>
 <apiResult>
     <persons>
         <person>
         <hash>3957d580698c3345c9a962e077c44961</hash>
         <assignedOrganisationHash>01ed57dc391c5a58808b9087a466ef78</assignedOrganisationHash>
         <labels />
         <projects>
             <project_0>
                 <hash>661dfc3980899852736864b4e43cd374</hash>
                 <name>abc</name>
             </project_0>
         </projects>
         <honorific>titlevalue</honorific>
         <firstname>firstnamevalue</firstname>
         <lastname>lastnamevalue</lastname>
         <function>functionvalue</function>
        <birthday>2000-01-02</birthday>
        <costumerNumber>123</costumerNumber>
        <description>descriptionvalue</description>
        <email>emailvalue</email>
        <email2>emailvalue2</email2>
        <phoneWork>phoneworkvalue</phoneWork>
        <phonePrivate>phoneprivatevalue</phonePrivate>
        <phoneMobile>phonemodilevalue</phoneMobile>
        <fax>faxvalue</fax>
        <facebook>facebookvalue</facebook>
        <google>googleplusvalue</google>
        <twitter>twittervalue</twitter>
        <xing>xongvalue</xing>
        <linkedin>linkedinvalue</linkedin>
        </person>
     </persons>
 </apiResult>
</result>