Overview
This article provides details about the REST - Ticket API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /Tickets/Ticket/ListAll/$departmentid$/$ticketstatusid$/$ownerstaffid$/$userid$/$count$/$start$/$sortField$/$sortOrder$
- GET /Tickets/Ticket/$ticketid$/
- POST /Tickets/Ticket
- PUT /Tickets/Ticket/$ticketid$
- DELETE /Tickets/Ticket/$ticketid$
Information
GET /Tickets/Ticket/ListAll/$departmentid$/$ticketstatusid$/$ownerstaffid$/$userid$/$count$/$start$/$sortField$/$sortOrder$
Retrieve a filtered list of tickets from the help desk.
Arguments
Red = required
Name |
Description |
$departmentid$ | Filter the tickets by the specified department id, you can specify multiple ids by separating the values using a comma. Example: 1,2,3 |
$ticketstatusid$ | Filter the tickets by the specified ticket status id, you can specify multiple ids by separating the values using a comma. Example: 1,2,3 |
$ownerstaffid$ | Filter the tickets by the specified owner staffid, you can specify multiple ids by separating the values using a comma. Example: 1,2,3 |
$userid$ | Filter the tickets by the specified user id, you can specify multiple ids by separating the values using a comma.Example: 1,2,3 |
$count$ | Total items count for retrieval |
$start$ | Start item for retrieval. It's a mandatory field while passing $count$ parameter |
$sortField$ | Sort items according to a single specified field |
$sortOrder$ | Sort items according to a single specified order |
If you do not wish to filter a value based on ownerid or staff user id, you can send '-1' as a value. Example:
/Tickets/Ticket/ListAll/41/1/-1/-1/-1/-1/ticketid/ASC/
Response
<tickets>
<ticket id="2" flagtype="0">
<displayid>OLJ-171-16930</displayid>
<departmentid>2</departmentid>
<statusid>1</statusid>
<priorityid>1</priorityid>
<typeid>1</typeid>
<userid>1</userid>
<userorganization>Test</userorganization>
<userorganizationid>1</userorganizationid>
<ownerstaffid>0</ownerstaffid>
<ownerstaffname />
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<lastreplier>Varun Shoor</lastreplier>
<subject>This is just a test</subject>
<creationtime>1297840147</creationtime>
<lastactivity>1297840147</lastactivity>
<laststaffreply>0</laststaffreply>
<lastuserreply>1297840147</lastuserreply>
<slaplanid>1</slaplanid>
<nextreplydue>1297883347</nextreplydue>
<resolutiondue>1298012947</resolutiondue>
<replies>0</replies>
<ipaddress>127.0.0.1</ipaddress>
<creator>2</creator>
<creationmode>1</creationmode>
<creationtype>1</creationtype>
<isescalated>0</isescalated>
<escalationruleid>0</escalationruleid>
<templategroupid>1</templategroupid>
<templategroupname>default</templategroupname>
<tags>test tag client</tags>
<watcher staffid="1" name="Varun Shoor" />
<workflow id="1" title="Close Ticket" />
<note type="ticket" id="1" ticketid="2" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842417">This is a ticket note</note>
<note type="user" id="1" userid="1" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842435">This is a test User note</note>
<note type="userorganization" id="1" userorganizationid="1"notecolor="1" creatorstaffid="1" forstaffid="0" creatorstaffname="VarunShoor" creationdate="1297842447">This is a test User Organizationnote</note>
<note type="timetrack" id="1" ticketid="2" timeworked="1800"timebillable="1800" billdate="1297842420" workdate="1297842420"workerstaffid="1" workerstaffname="Varun Shoor" creatorstaffid="1"creatorstaffname="Varun Shoor" notecolor="1">This is a test time trackentry for thirty minutes</note>
</ticket>
</tickets>
GET /Tickets/Ticket/$ticketid$/
Retrieve the ticket identified by$ticketid$.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket or the ticket mask ID (e.g. ABC-123-4567). |
Response
<tickets>
<ticket id="2" flagtype="0">
<displayid>OLJ-171-16930</displayid>
<departmentid>2</departmentid>
<statusid>1</statusid>
<priorityid>1</priorityid>
<typeid>1</typeid>
<userid>1</userid>
<userorganization>Test</userorganization>
<userorganizationid>1</userorganizationid>
<ownerstaffid>0</ownerstaffid>
<ownerstaffname /><fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<lastreplier>Varun Shoor</lastreplier>
<subject>This is just a test</subject>
<creationtime>1297840147</creationtime>
<lastactivity>1297840147</lastactivity>
<laststaffreply>0</laststaffreply>
<lastuserreply>1297840147</lastuserreply>
<slaplanid>1</slaplanid>
<nextreplydue>1297883347</nextreplydue>
<resolutiondue>1298012947</resolutiondue>
<replies>0</replies>
<ipaddress>127.0.0.1</ipaddress>
<creator>2</creator>
<creationmode>1</creationmode>
<creationtype>1</creationtype>
<isescalated>0</isescalated>
<escalationruleid>0</escalationruleid>
<templategroupid>1</templategroupid>
<templategroupname>default</templategroupname>
<tags>test tag client</tags>
<watcher staffid="1" name="Varun Shoor" /><workflow id="1" title="Close Ticket" />
<note type="ticket" id="1" ticketid="2" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842417">This is a ticket note</note>
<note type="user" id="1" userid="1" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842435">This is a test User note</note>
<note type="userorganization" id="1" userorganizationid="1"notecolor="1" creatorstaffid="1" forstaffid="0" creatorstaffname="VarunShoor" creationdate="1297842447">This is a test User Organizationnote</note>
<note type="timetrack" id="1" ticketid="2" timeworked="1800"timebillable="1800" billdate="1297842420" workdate="1297842420"workerstaffid="1" workerstaffname="Varun Shoor" creatorstaffid="1"creatorstaffname="Varun Shoor" notecolor="1">This is a test time trackentry for thirty minutes</note>
<posts><post>
<id>2</id>
<ticketid>2</ticketid>
<dateline>1297840147</dateline>
<userid>1</userid>
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<emailto /><ipaddress>127.0.0.1</ipaddress>
<hasattachments>0</hasattachments>
<creator>2</creator>
<isthirdparty>0</isthirdparty>
<ishtml>0</ishtml>
<isemailed>0</isemailed>
<staffid>0</staffid>
<issurveycomment>0</issurveycomment>
<contents><![CDATA[I am justtesting]]]]><![CDATA[></contents>
</post>
</posts>
</ticket>
</tickets>
POST /Tickets/Ticket
Create a new ticket.
Note: This API is supported in version > v4.01.220
Arguments (POST variables)
Red = required, Blue = Either of the value, Green = Optional Variables
Name |
Description |
subject | The Ticket Subject |
fullname | Full Name of creator |
Email Address of creator | |
contents | The contents of the first ticket post |
departmentid | The Department ID |
ticketstatusid | The Ticket Status ID |
ticketpriorityid | The Ticket Priority ID |
tickettypeid | The Ticket Type ID |
autouserid | If dispatched as "1" then the User ID is looked up based on the email address, if none is found, the system ends up creating a new user based on the information supplied |
userid | The User ID, if the ticket is to be created as a user |
staffid | The Staff ID, if the ticket is to be created as a staff |
ownerstaffid | The Owner Staff ID, if you want to set an Owner for this ticket |
type | The ticket type: 'default' or 'phone' |
templategroup | The custom template group identifier (ID or Name) for the Ticket. This is only available in version upwards of4.40.954 |
ignoreautoresponder | Option to disable autoresponderemail, if is set to 1.This is only available in version upwards of4.40.1079 |
emailqueueid | Option to select email queue ID. This is only available in version upwards of 4.70 |
Response
<tickets>
<ticket id="2" flagtype="0">
<displayid>OLJ-171-16930</displayid>
<departmentid>2</departmentid>
<statusid>1</statusid>
<priorityid>1</priorityid>
<typeid>1</typeid>
<userid>1</userid>
<userorganization>Test</userorganization>
<userorganizationid>1</userorganizationid>
<ownerstaffid>0</ownerstaffid><ownerstaffname />
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<lastreplier>Varun Shoor</lastreplier>
<subject>This is just a test</subject>
<creationtime>1297840147</creationtime>
<lastactivity>1297840147</lastactivity>
<laststaffreply>0</laststaffreply>
<lastuserreply>1297840147</lastuserreply>
<slaplanid>1</slaplanid>
<nextreplydue>1297883347</nextreplydue>
<resolutiondue>1298012947</resolutiondue>
<replies>0</replies>
<ipaddress>127.0.0.1</ipaddress>
<creator>2</creator>
<creationmode>1</creationmode>
<creationtype>1</creationtype>
<isescalated>0</isescalated>
<escalationruleid>0</escalationruleid>
<templategroupid>1</templategroupid>
<templategroupname>default</templategroupname>
<tags>test tag client</tags>
<watcher staffid="1" name="Varun Shoor" />
<workflow id="1" title="Close Ticket" />
<note type="ticket" id="1" ticketid="2" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842417">This is a ticket note</note>
<note type="user" id="1" userid="1" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842435">This is a test User note</note>
<note type="userorganization" id="1" userorganizationid="1"notecolor="1" creatorstaffid="1" forstaffid="0" creatorstaffname="VarunShoor" creationdate="1297842447">This is a test User Organizationnote</note>
<note type="timetrack" id="1" ticketid="2" timeworked="1800"timebillable="1800" billdate="1297842420" workdate="1297842420"workerstaffid="1" workerstaffname="Varun Shoor" creatorstaffid="1"creatorstaffname="Varun Shoor" notecolor="1">This is a test time trackentry for thirty minutes</note>
<posts><post>
<id>2</id>
<ticketid>2</ticketid>
<dateline>1297840147</dateline>
<userid>1</userid>
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email><emailto />
<ipaddress>127.0.0.1</ipaddress>
<hasattachments>0</hasattachments>
<creator>2</creator>
<isthirdparty>0</isthirdparty>
<ishtml>0</ishtml>
<isemailed>0</isemailed>
<staffid>0</staffid>
<issurveycomment>0</issurveycomment>
<contents><![CDATA[I am justtesting]]]]><![CDATA[></contents>
</post>
</posts>
</ticket>
</tickets>
PUT /Tickets/Ticket/$ticketid$
Update the ticket identified by $ticketid$.
Note: API supported in version > 4.01.192
Arguments (POST variables)
Green = Optional Variables
Name |
Details |
subject | The Ticket Subject |
fullname | Full Name of creator |
Email Address of creator | |
departmentid | The Department ID |
ticketstatusid | The Ticket Status ID |
ticketpriorityid | The Ticket Priority ID |
tickettypeid | The Ticket Type ID |
ownerstaffid | The Owner Staff ID, if you want to set an Owner for this ticket |
userid | The User ID, if you want to change the user for this ticket |
templategroup | The custom template group identifier (ID or Name) for the Ticket. This is only available in version upwards of4.40.833 |
Response
<tickets>
<ticket id="2" flagtype="0">
<displayid>OLJ-171-16930</displayid>
<departmentid>2</departmentid>
<statusid>1</statusid>
<priorityid>1</priorityid>
<typeid>1</typeid>
<userid>1</userid>
<userorganization>Test</userorganization>
<userorganizationid>1</userorganizationid>
<ownerstaffid>0</ownerstaffid><ownerstaffname />
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<lastreplier>Varun Shoor</lastreplier>
<subject>This is just a test</subject>
<creationtime>1297840147</creationtime>
<lastactivity>1297840147</lastactivity>
<laststaffreply>0</laststaffreply>
<lastuserreply>1297840147</lastuserreply>
<slaplanid>1</slaplanid>
<nextreplydue>1297883347</nextreplydue>
<resolutiondue>1298012947</resolutiondue>
<replies>0</replies>
<ipaddress>127.0.0.1</ipaddress>
<creator>2</creator>
<creationmode>1</creationmode>
<creationtype>1</creationtype>
<isescalated>0</isescalated>
<escalationruleid>0</escalationruleid>
<templategroupid>1</templategroupid>
<templategroupname>default</templategroupname>
<tags>test tag client</tags>
<watcher staffid="1" name="Varun Shoor" />
<workflow id="1" title="Close Ticket" />
<note type="ticket" id="1" ticketid="2" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842417">This is a ticket note</note>
<note type="user" id="1" userid="1" notecolor="1"creatorstaffid="1" forstaffid="0" creatorstaffname="Varun Shoor"creationdate="1297842435">This is a test User note</note>
<note type="userorganization" id="1" userorganizationid="1"notecolor="1" creatorstaffid="1" forstaffid="0" creatorstaffname="VarunShoor" creationdate="1297842447">This is a test User Organizationnote</note>
<note type="timetrack" id="1" ticketid="2" timeworked="1800"timebillable="1800" billdate="1297842420" workdate="1297842420"workerstaffid="1" workerstaffname="Varun Shoor" creatorstaffid="1"creatorstaffname="Varun Shoor" notecolor="1">This is a test time trackentry for thirty minutes</note>
<posts><post>
<id>2</id>
<ticketid>2</ticketid>
<dateline>1297840147</dateline>
<userid>1</userid>
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<emailto /><ipaddress>127.0.0.1</ipaddress>
<hasattachments>0</hasattachments>
<creator>2</creator>
<isthirdparty>0</isthirdparty>
<ishtml>0</ishtml>
<isemailed>0</isemailed>
<staffid>0</staffid>
<issurveycomment>0</issurveycomment>
<contents><![CDATA[I am justtesting]]]]><![CDATA[></contents>
</post>
</posts>
</ticket>
</tickets>
DELETE /Tickets/Ticket/$ticketid$
Delete the ticket identified by$ticketid$.
Arguments
Red = required
Name |
Description |
$ticketid$ |
The unique numeric identifier of the ticket |