The Department API


Department Information


A returned user consists of the following information:

Department ID      [id]
The unique department ID.
Department Name      [name]
The name of the department.
Private      [private]
Shows if this is a private department (Only staff members can see it).
Hidden      [hidden]
Shows if this is a hidden department (doesn't show up inside of helpdesk).
Default      [default]
Shows if this is the default department (where any emails when no department is specified).

This method returns a department given a department ID.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

Required Information:



Example 1:

https://rhinosupport.com/API/Department/?apiCode=[apiCode]&id=[id]

Example 2:

https://rhinosupport.com/API/Department/?apiCode=[apiCode]&id=[id]&showUsers&responseType=json

PHP Curl Example
<?php $request = curl_init('https://api.rhinosupport.com/API/Department/?apiCode=[apiCode]&id=[id]');
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($request);
curl_close($request);
echo $result;
?>


 

This method returns all departments.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

Required Information:



Example 1:

https://rhinosupport.com/API/Department/?apiCode=[apiCode]

Example 2:

https://rhinosupport.com/API/Department/?apiCode=[apiCode]&id=[id]&showUsers&responseType=json

PHP Curl Example
<?php $request = curl_init('https://api.rhinosupport.com/API/Department/?apiCode=[apiCode]&id=[id]');
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($request);
curl_close($request);
echo $result;
?>


 

This method lets you create a new department.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

Required Information:



PHP Curl Example 1:

<?php $request = curl_init ('https://www.rhinosupport.com/API/Department/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['name'] = '[name]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


PHP Curl Example 2:

<?php $request = curl_init ('https://www.rhinosupport.com/API/Department/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['name'] = '[name]';
$postFields['private'] = '[private]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


 

This method lets you update an existing department.


You will need to use the required information, and may need to use the optional information below.


Optional Information:

Required Information:



PHP Curl Example 1:

<?php $request = curl_init ('https://www.rhinosupport.com/API/Department/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['id'] = '[id]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


PHP Curl Example 2:

<?php $request = curl_init ('https://www.rhinosupport.com/API/Department/');
$postFields = array();
$postFields['apiCode'] = '[apiCode]';
$postFields['id'] = '[id]';
$postFields['name'] = '[name]';
$postFields['private'] = '[private]';


curl_setopt ($request, CURLOPT_POST, true);
curl_setopt ($request, CURLOPT_POSTFIELDS, http_build_query($postFields));
curl_setopt ($request, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec ($request);
curl_close ($request);
echo $result;
?>


 

Account Options


×  
×