Start a conversation

REST - Department

Overview

This article provides details about the REST - Department API call that Kayako Classic uses, including its field types, arguments, and responses.

Information

GET /Base/Department

Retrieve a list of all departments and sub-departments in the help desk.


Response

<departments>
<department>
<id>1</id>
<title>Support</title>
<type>private</type>
<app>tickets</app>
<displayorder>1</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>1</uservisibilitycustom>
<usergroups><id>1</id><id>2</id><id>3</id></usergroups>
</department>
<department>
<id>2</id>
<title>Sales</title>
<type>public</type>
<app>livechat</app>
<displayorder>2</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>0</uservisibilitycustom>
</department>
<department>
<id>3</id>
<title>Kayako Fusion</title>
<type>public</type>
<app>livechat</app>
<displayorder>3</displayorder>
<parentdepartmentid>2</parentdepartmentid>
<uservisibilitycustom>0</uservisibilitycustom>
</department>
</departments>

 

GET /Base/Department/$id$

Retrieve the department identified by its internal $id$.


Arguments

Name Description
$id$ The unique numeric identifier of the department to retrieve


Response

<departments>
<department>
<id>1</id>
<title>Support</title>
<type>private</type>
<app>tickets</app>
<displayorder>1</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>1</uservisibilitycustom>
<usergroups><id>1</id><id>2</id><id>3</id></usergroups>
</department>
</departments>

 

PUT /Base/Department/$id$

Update the department identified by $id$.


Arguments

Red = required

Name Description
$id$ The unique numeric identifier of the department to update
title The title of the department
type The accessibility level of the department ('public' or 'private')
displayorder A positive integer that the help desk will use to sort departments when displaying them (ascending)
parentdepartment id A positive integer of the parent department for this department
uservisibilitycustom 1 or 0 Boolean that controls whether or not to restrict the visibility of the department to particular user groups (see usergroupid[])
usergroupid[] An array of positive integers identifying the user groups to be assigned to this department

Posting an array using the query string for instance: 

?usergroupid[]=2&usergroupid[]=3&usergroupid[]=X. 


Response

<departments>
<department>
<id>3</id>
<title>Kayako Fusion</title>
<type>public</type>
<app>livechat</app>
<displayorder>3</displayorder>
<parentdepartmentid>2</parentdepartmentid>
<uservisibilitycustom>0</uservisibilitycustom>
</department>
</departments>

 

DELETE /Base/Department/$id$

Create a department. 


Arguments

Red = required

Name Description
title The title of the department
app The app of the department should be associated with ('tickets' or 'livechat')
type The accessibility level of the department ('public' or 'private')
displayorder A positive integer that the help desk will use to sort departments when displaying them (ascending).
parentdepartmentid A positive integer of the parent department for this department.
uservisibilitycustom 1 or 0 boolean that controls whether or not to restrict the visibility of this department to particular user groups (see usergroupid[])
usergroupid[] An array of positive integers identifying the user groups to be assigned to this department.

Posting an array using the query string like this:

?usergroupid[]=2&usergroupid[]=3&usergroupid[]=X


Response

<departments>
<department>
<id>1</id>
<title>Support</title>
<type>private</type>
<app>tickets</app>
<displayorder>1</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>1</uservisibilitycustom>
<usergroups><id>1</id><id>2</id><id>3</id></usergroups>
</department>
</departments>

 

DELETE /Base/Department/$id$

Delete the Department identified by $id$.


Arguments

Red = required

Name Description
$id$ The unique numeric identifier of the department to delete

 

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments