FAQs Zoho Desk For Developers Developer Guide

            getRecords API Method

            You can use the getRecords method to fetch all users data specified in the API request.

            Request URL Format

            XML https://desk.zoho.com/api/xml/MODULE/getrecords?authtoken=AUTHTOKEN&portal=PORTALNAME&department=DEPARTMENTNAME
            JSON https://desk.zoho.com/api/json/MODULE/getrecords?authtoken=AUTHTOKEN&portal=PORTALNAME&department=DEPARTMENTNAME

            Note:
            • Replace MODULE with any one of these - requests, solutions, accounts, contacts, contracts, products, or tasks.
            • Replace AUTHTOKEN, PORTALNAME, DEPARTMENTNAME with your authtoken, portal name, and department name respectively.
            Request Parameters

            Parameter Data Type Description
            authtoken*String Encrypted alphanumeric string to authenticate your Zoho credentials
            portal* String Portal of your Zoho Desk
            department* String Department of your Zoho Desk
            selectfields Stringmodule(field labels) i.e, Requests (SLA,Final Response Time,Case Owner)
            fromindex Integer Default value - 1
            toindex Integer Default value - 20
            Maximum value - 200
            myrecordsBoolean myrecords = true displays own record

            * - Mandatory parameter

            Note:
            • While retrieving data from your Zoho Desk, user’s field-level security settings are applied. Hence to fetch all users data, use the user ID with the highest role (Ex: CEO) and profile (Ex: Administrator).
            • fromindex and toindex are optional parameters. By default, the fromindex is 1 and toindex is 20.
            • sortbyfield and sortorder are also optional parameters
            • The value for lastmodifiedtime parameter should be in yyyy-MM-dd HH:mm:ss format
            Sample Request URL
            Here are a couple of sample request URLs and their results.

            Example 1:
            https://desk.zoho.com/api/xml/requests/getrecords?authtoken=AUTHTOKEN&portal=demosupport&department=demodepartment

            Result:
            <response uri="/api/xml/requests/getrecords">
            <result>
            <requests>
            <row no="1">
            <fl val="CASEID">11111222220010010</fl>
            <fl val="Subject">Demo Request Online</fl>
            <fl val="Department">demodepartment</fl>
            <fl val="Contact Name">John</fl>
            <fl val="Product Name">Customer Care</fl>
            <fl val="Email">john@demo.com</fl>
            <fl val="Phone">002200330044</fl>
            </row>
            <row no="2">
            <fl val="CASEID">11111222220010010</fl>
            <fl val="Subject">Not able to create task</fl>
            <fl val="Department">demodepartment</fl>
            <fl val="Contact Name">Peter</fl>
            <fl val="Product Name">People Care</fl>
            <fl val="Email">peter@demo123.com</fl>
            <fl val="Phone">9888888888889</fl>
            </row>
            <row no="3">
            <fl val="CASEID">2000000010010</fl>
            <fl val="Subject">Welcome</fl>
            <fl val="Department">General</fl>
            <fl val="Contact Name">Amit Agarwal</fl>
            <fl val="Product Name">CRM</fl>
            <fl val="Email">amit@dummyemail.com</fl>
            <fl val="Phone">00909090990</fl>
            </row>
            </requests> 
            </result>
            </response>

            Example 2:
            https://desk.zoho.com/api/xml/requests/getrecords?authtoken=AUTHTOKEN&portal=demosupport&department=General&myrecords=true

            Result:
            <response uri="/api/xml/requests/getrecords">
            <result>
            <requests>
            <row no="1">
            <fl val="CASEID">2000000010010</fl>
            <fl val="Subject">Welcome</fl>
            <fl val="Department">General</fl>
            <fl val="Contact Name">Amit Agarwal</fl>
            <fl val="Product Name">CRM</fl>
            <fl val="Email">amit@dummyemail.com</fl>
            <fl val="Phone">00909090990</fl>
            </row>
            </requests>
            </result>
            </response>
            Note:
            • Date & Time must be in yyyy-MM-dd HH:mm:ss format.
            Helpful?  
            Help us to make this article better
            0 5