Overview
This article provides details about the REST - TicketPost API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /Tickets/TicketPost/ListAll/$ticketid$
- GET /Tickets/TicketPost/$ticketid$/$id$
- POST /Tickets/TicketPost
- DELETE /Tickets/TicketPost/$ticketid$/$id$
Information
GET /Tickets/TicketPost/ListAll/$ticketid$
Retrieve a list of all the ticket posts that belong to a ticket given ticket's id.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket |
Response
<posts>
<post>
<id>2</id>
<ticketpostid>2</ticketpostid>
<ticketid>1</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 just testing]]]]><![CDATA[></contents>
<isprivate>0</isprivate>
</post><post>
<id>4</id>
<ticketpostid>4</ticketpostid>
<ticketid>1</ticketid>
<dateline>1297874640</dateline>
<userid>0</userid>
<fullname>Varun Shoor</fullname>
<email>varun.shoor@kayako.com</email>
<emailto /><ipaddress>127.0.0.1</ipaddress>
<hasattachments>0</hasattachments>
<creator>1</creator><isthirdparty>0</isthirdparty>
<ishtml>0</ishtml><isemailed>0</isemailed>
<staffid>1</staffid><issurveycomment>0</issurveycomment>
<contents><![CDATA[Test reply]]]]><![CDATA[></contents>
<isprivate>1</isprivate>
</post>
</posts>
GET /Tickets/TicketPost/$ticketid$/$id$
Retrieve the post identified by $id$ that belong to the ticket identified by $ticketid$.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket. |
$id$ | The unique numeric identifier of the ticket post. |
Response
<posts>
<post>
<id>4</id>
<ticketpostid>4</ticketpostid>
<ticketid>1</ticketid><dateline>1297874640</dateline><userid>0</userid>
<fullname>Varun Shoor</fullname><email>varun.shoor@kayako.com</email><emailto />
<ipaddress>127.0.0.1</ipaddress><hasattachments>0</hasattachments>
<creator>1</creator><isthirdparty>0</isthirdparty><ishtml>0</ishtml>
<isemailed>0</isemailed><staffid>1</staffid>
<issurveycomment>0</issurveycomment>
<contents><![CDATA[Test reply]]]]><![CDATA[></contents>
<isprivate>0</isprivate>
</post>
</posts>
POST /Tickets/TicketPost
A new post to an existing ticket.
Arguments (POST variables)
Red = required, Blue = Either of the value, Brown = Note, Green = Optional variables
Name |
Description |
ticketid | The unique numeric identifier of the ticket. |
contents | The ticket post contents |
userid | The User ID, if the ticket post is to be created as a user |
staffid | The Staff ID, if the ticket post is to be created as a staff |
isprivate | Indicates whether the ticket post is private (hidden from the customer) or not. Applies only to post created by staff user. This parameter needs to be declared either 0 or 1 in case you are creating a ticket using Staff id |
filename | The file/attachment name, for multiple attachments it would be filename 1, filename 2 and so on...This is only available inversion upwards of 4.70 |
filecontent | The file/attachment content, for multiple attachments it would be file content 1, file content 2 and so on...This is only available in version upwards of 4.70 |
Response
<posts>
<post>
<id>4</id>
<ticketpostid>4</ticketpostid>
<ticketid>1</ticketid>
<dateline>1297874640</dateline>
<userid>0</userid>
<fullname>Varun Shoor</fullname><email>varun.shoor@kayako.com</email><emailto />
<ipaddress>127.0.0.1</ipaddress><hasattachments>0</hasattachments>
<creator>1</creator>
<isthirdparty>0</isthirdparty>
<ishtml>0</ishtml><isemailed>0</isemailed><staffid>1</staffid>
<issurveycomment>0</issurveycomment>
<contents><![CDATA[Test reply]]]]><![CDATA[></contents>
<isprivate>0</isprivate>
</post>
</posts>
DELETE /Tickets/TicketPost/$ticketid$/$id$
Delete a ticket post identified by$id$which belongs to a ticket identified by$ticketid.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket |
$id$ |
The unique numeric identifier of the ticket post |