We are glad to inform you that our new set of REST APIs are now finalized and ready for use.
Some of you had offered to use the new APIs in the beta phase. As we mentioned when we provided you with access to these APIs in the beta phase, we have modified some of the APIs to facilitate easy usage. However, we have also taken extreme care not to introduce any drastic changes. The APIs will be backward-compatible with the beta phase APIs for a period of 2 weeks. Please upgrade your code to reflect the new changes within this transition period.
Overview of the Major Changes:
Authentication Through Header
In the beta phase, you would have included "orgId" and "authtoken" through a query param in the API request. Going forward, you will be able to include these details only through the header because data transfer is much safer this way.
Data Format in Ticket Thread
When it comes to the APIs associated with the Threads module, we have planned to reduce the nesting in API response. We have introduced a new key called "status" to determine the status of a thread, in place of the "isDraft" key which will be deprecated. Also, to eliminate the need to construct the URL to obtain thread attachments, we have planned to provide the constructed URL through the href param in the API response. As a result, instead of the following response, which you would have received earlier,
{
"summary" : "Sample Thread",
"responderId" : "1892000000042001",
"attachments" : [ {
"size" : "1234",
"name" : "attach.png",
"id" : "1892000000042043"
} ],
"recipients" : {
"cc" : "",
"bcc" : "",
"to" : "example2@example.com"
},
"isDraft" : true,
"channel" : "EMAIL",
"createdTime" : "2016-05-25T10:06:09.686Z",
"from" : {
"emailId" : "example@example.com"
},
"id" : "1892000001004072",
"content" : "\n Hi manoj\n",
"isForward" : false,
"direction" : "out"
}
you would receive this response:
{
"summary" : "Sample Thread",
"cc" : "",
"bcc" : "",
"attachments" : [ {
"size" : "1234",
"name" : "atach.png",
"id" : "1892000000042043",
"href" : "https://desk.zoho.com/api/v1/tickets/1892000000093205/threads/1892000001083008
/attachments/1892000001083005/content"
} ],
"channel" : "EMAIL",
"content" : "\n Hi manoj\n",
"isForward" : false,
"responderId" : "1892000000042001",
"status":"DRAFT",
"createdTime" : "2016-05-25T10:06:09.686Z",
"id" : "1892000001004072",
"to" : "example2@example.com",
"fromEmailAddress" : "example@example.com",
"direction" : "out"
}
However, during the transition period, we will provide both the old and new keys in the representation.
URL Change in API for Replying to Tickets
To provide a relatively simpler interface, we are introducing a new API endpoint for replying to tickets, instead of the old endpoint. Therefore, going forward, please use
POST api/v1/tickets/{id}/sendReply
instead of
POST api/v1/tickets/{id}/threads
to create threads.
If you are currently using the old endpoint, kindly switch to the new endpoint within the transition period.
The old set of XML/JSON APIs will be supported for the time being but will be deprecated in the near future. We will keep you updated on the deprecation and provide adequate time to ensure that you can make a smooth transition to the new REST APIs.
For more information or clarifications, please mail us at restapi_desk@zohocorp.com