Migrating from XML/JSON APIs to the New REST APIs

Migrating from XML/JSON APIs to the New REST APIs

Our new REST APIs provide developers with an enhanced and easier way to access and use the features and functionalities of Zoho Desk. This document lists the REST API equivalents to the old XML/JSON APIs to help you seamlessly migrate to the new APIs. 

Important Changes
Below are the most important changes related to the migration. 

Input and Response Format
The old APIs returned responses in both XML and JSON formats. We have designed the new APIs to return responses only in the JSON format to reduce complexity and ensure ease of use. 

HTTP Methods
The new APIs will use basic HTTP methods, such as GET,  POST, PATCH, and DELETE in API requests.

Authentication
The old APIs used authTokens for authentication. The new REST APIs use the more secure OAuth tokens.

orgId
The old APIs used the portal name in requests to identify the organization in Zoho Desk. In contrast, the new APIs use the orgId parameter. You can obtain the orgId of your organization(s) using the Get all organizations API. 
Both the orgId and Oauth token must be included in the headers of all API requests. 

The following table lists some frequently used XML/JSON APIs and their corresponding REST API equivalents.


Old XML/JSON APIs
REST API Equivalents

/api/(xml|json)/(Requests|Cases|requests|cases)/updaterecords  


/api/(xml|json)/(Contacts|contacts)/updaterecords


/api/(xml|json)/(Accounts|accounts)/updaterecords


/api/(xml|json)/(Tasks|tasks)/updaterecords


/api/(xml|json)/(timeentry|TimeEntry)/updaterecords


/api/(xml|json)/(Contracts|contracts|Contract)/updaterecords


/api/(xml|json)/(Requests|Cases|requests|cases)/addrecords


/api/(xml|json)/(Contacts|contacts)/addrecords


/api/(xml|json)/(Accounts|accounts)/addrecords


/api/(xml|json)/(Tasks|tasks)/addrecords


/api/(xml|json)/(timeentry|TimeEntry)/addrecords


/api/(xml|json)/(Requests|Cases|requests|cases)/getrecords



/api/(xml|json)/(Accounts|accounts)/getrecords


/api/(xml|json)/(Products|products)/getrecords


/api/(xml|json)/(Contracts|contracts|Contract)/getrecords


/api/(xml|json)/(Timeentry|timeentry|TimeEntry)/getrecords


/api/(xml|json)/(Tasks|tasks)/getrecords


/api/(xml|json)/(Solutions|solutions)/getrecords


/api/(xml|json)/(Requests|Cases|requests|cases)/getrecordsbyid


/api/(xml|json)/(Contacts|contacts)/getrecordsbyid


/api/(xml|json)/(Tasks|tasks)/getrecordsbyid


/api/(xml|json)/(Accounts|accounts)/getrecordsbyid

/api/(xml|json)/(Solutions|solutions)/getrecordsbyid


/api/(xml|json)/(Requests|Cases|requests|cases)/getrecordsbycustomview 



/api/(xml|json)/(Requests|Cases|requests|cases)/getrecordsbysearch


/api/(xml|json)/(Contacts|contacts)/getrecordsbysearch


/api/(xml|json)/(Accounts|accounts)/getrecordsbysearch

/api/(xml|json)/(Requests|Cases|requests|cases)/getrecordsbyowner

/api/(xml|json)/(Requests|Cases|requests|cases)/deleterecords


/api/(xml|json)/(Requests|Cases|requests|cases)/getrequestthreads


/api/(xml|json)/(Requests|Cases|requests|cases)/getattachments


/api/(xml|json)/(Requests|Cases|requests|cases)/getattachmentslist


/api/(xml|json)/(Requests|Cases|requests|cases)/addattachments


/api/(xml|json)/(Requests|Cases|requests|cases)/reply


/api/(xml|json)/(departments|department)/getalldepartments


/api/(xml|json)/(portals|portal)/getportallist


/api/(xml|json)/emails/getfromaddress