deleteOrganisation

Removes an organisation from the addressbook.

Route /addressbook/deleteOrganisation[/:key[/:hash[/:format]]]
required Parameters hash
Optional Parameters format
return values hash 
crossreferences
hints

Parameters

labeling description valuemargin defaultvalue
projhashes Projekthashes array of Projekthashes
format Defines of what format the result is. json|xml json

Return Values

labeling description valuemargin
hash Id of the person. (a-z0-9){32}

Messages

message description
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.

Beispielcode

$root = 'https://suite.xovi.net/api/';
$arrayParams = array(
                     'service' =>'addressbook',
                     'method'  =>'deleteOrganisation',
                     'key'     =>'myPersonalKey',
                     'hash' => 'hashOfThe Organisation'
		  );
$pathString = implode('/', $arrayParams);
$requestURL = $root.$pathString;

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;

Beispielergebnisse

JSON

{
	"apiErrorCode": 0,
	"apiErrorMessage": "0k.",
	"apiResult": [{
		"hash": "b4b292d0c16f20eee10a7754539a189c"
	}]
}

XML

<?xml version="1.0" encoding="UTF-8"?>
<result>
 <apiErrorCode>0</apiErrorCode>
 <apiErrorMessage>0k.</apiErrorMessage>
 <apiResult>
     <persons>
         <person>
             <hash>3957d580698c3345c9a962e077c44961</hash>
        </person>
     </persons>
 </apiResult>
</result>