getRecords Method

  1. Purpose
  2. Request URL
  3. Request Parameters
  4. Job Opening Specific Parameter
  5. Capture Errors
  6. Examples
    1. To fetch all accounts in JSON format sorted by Client Name (in descending order) starting from 20 to 200
    2. To fetch all accounts in XML format modified / created after 2008-05-27 00:00:00
    3. To fetch candidates with version = 2
    4. To fetch candidates without specifying the newFormat parameter
    5. To fetch with newFormat=2
    6. To Call with fromIndex=1,toIndex=25
    7. To Call with lastModifiedTime
    8. To select all fields from candidates with newFormat=1
    9. To select all fields from candidates with newFormat=2
    10. To Call with lastModifiedTime, fromIndex and toIndex
       

Purpose

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

Request URL

XML Format:
https://recruit.zoho.com/recruit/private/xml/Module/getRecords?authtoken=Auth Token&scope=recruitapi

JSON Format:
https://recruit.zoho.com/recruit/private/json/Module/getRecords?authtoken=Auth Token&scope=recruitapi

Note: Module refers to Candidates, JobOpenings, Clients, Interviews, Contacts, CustomModule1, CustomModule2, CustomModule3, CustomModule4, and CustomModule5.

Request Parameters

ParameterData TypeDescription
authtoken*StringEncrypted alphanumeric string to authenticate your Zoho credentials. 
scope*StringSpecify the value as recruitapi
selectColumnsStringModule(optional columns) i.e, Candidates(Last Name,Website,Email) OR All
fromIndexIntegerDefault value - 1
toIndexIntegerDefault value - 20
Maximum value - 200
sortColumnStringStringIf you use the sortColumnString parameter, by default, data is sorted in ascending order.
sortOrderStringStringDefault value - asc
if you want to sort in descending order, then you have to pass sortOrderString=desc.
lastModifiedTimeDateTimeDefault value: null
If you specify the time, modified data will be fetched after the configured time.
newFormatIntegernewFormat=1: To exclude fields with "null" values while inserting data from your Recruit account.
newFormat=2: To include fields with "null" values while inserting data from your Recruit account.
versionInteger

version=2: This will fetch responses based on the latest API implementation.

version=4: To get multiple records in a single API method call.

* - Mandatory parameter

Job Opening Specific Parameter

ParameterData TypeDescription
publishURLBoolean

Set the value as true to get the Job Detail URL and Job Apply URL. By default, this value is false.
 

Note: Job URLs appear only when the job is published in Publish in Website.

Capture Errors

Recruit API provides unique error codes to easily troubleshoot issues in your program while synchronizing data between Recruit and your application. To learn more about various error codes and corresponding defintion please refer the Error Codes.

Additional Notes

While retrieving data from your Zoho Recruit, user’s field-level security settings are applied. Hence to fetch all users data, use the user ID with highest role (Ex: Recruiter Admin) and profile (Ex: Administrator).

fromIndex and toIndex are optional parameters. By default, the fromIndex is 1 and toIndex is 20.

sortColumnString and sortOrderString are also optional parameters.

The value for lastModifiedTime parameter should be in yyyy-MM-dd HH:mm:ss format.

Examples

To fetch all accounts in JSON format sorted by Client Name (in descending order) starting from 20 to 200

 

URL Format:

https://recruit.zoho.com/recruit/private/json/Clients/getRecords?newFormat=1&authtoken=sbdjEDBDJ445791323
&scope=recruitapi&fromIndex=20&toIndex=200&sortColumnString=Client Name&sortOrderString=desc&version=2

To fetch all accounts in XML format modified / created after 2008-05-27 00:00:00

 

URL Format:

https://recruit.zoho.com/recruit/private/xml/Clients/getRecords?newFormat=1&authtoken=sbdjEDBDJ1323
&scope=recruitapi&lastModifiedTime=2008-05-27 00:00:00&version=2

To fetch candidates with version=2

It will return a response like below:

<Candidates>

<row no="1">

<FL val="CANDIDATEID">292147000000219010</FL>

<FL val="First Name">John</FL>

<FL val="Last Name">Gossling</FL>

<FL val="Email">varunteja.ch+4@zohocorp.com</FL>

<FL val="Phone">1234567890</FL>

<FL val="Source">Varun</FL>

</row>

</Candidates>

To fetch candidates without specifying the newFormat parameter

Note: When there is no specification about the response format, the default value "1" is assigned to the newFormat parameter, i.e newFormat = 1

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi&fromIndex=1&toIndex=20&selectColumns=Candidates(First Name,Last Name,Email,Current Employer,Source,Phone,City,Highest Qualification Held)&version=2

It will return a response like below:

<Candidates>
<row no="1">
<FL val="CANDIDATEID">292147000000107425</FL><FL val="First Name">Edwin</FL><FL val="Last Name">A</FL><FL val="Email">edwinraj.p@gmail.com, edwinirudaya@yahoo.com</FL><FL val="Phone">+919884351702</FL><FL val="City">Pammal</FL><FL val="Current Employer">AVAcorp Technologies Pvt Ltd</FL><FL val="Highest Qualification Held">B.Tech Information Technology</FL><FL val="Source">Imported by parser</FL>
</row>
</Candidates>

 

To fetch with newFormat=2

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi
&newFormat=2&selectColumns=Candidates(Candidate Owner,First Name,Last Name,Company,Designation,Email,Phone,Fax,Mobile,Website,Candidate Source,Candidate Status,No of Employees,Annual Revenue)

This will return a response like below:

<Candidates>
<row no="1">
<FL val="CANDIDATEID">292147000000107430</FL><FL val="First Name">Jobs</FL><FL val="Last Name">Find People</FL><FL val="Email">null</FL><FL val="Phone">null</FL><FL val="City">null</FL><FL val="Current Employer">null</FL><FL val="Highest Qualification Held">null</FL><FL val="Source">Imported by parser</FL>
</row>

</Candidates>

To Call with fromIndex=1, toIndex=25

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi&fromIndex=1&toIndex=20&selectColumns=Candidates(First Name,Last Name,Email,Current Employer,Source,Phone,City,Highest Qualification Held)&version=2&fromIndex=1&toIndex=25

Note: This will return 1 to 25 records.

To Call with lastModifiedTime

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi&fromIndex=1&toIndex=20&selectColumns=Candidates(First Name,Last Name,Email,Current Employer,Source,Phone,City,Highest Qualification Held)lastModifiedTime=2010-04-21 11:09:23&version=2

Note: If you specify the time, modified data will be fetched after the configured time.

To select all fields from candidates with newFormat=1

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi

&newFormat=1&selectColumns=All&version=2

Note: This will return all fields which have values.

To select all fields from candidates with newFormat=2

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi
&newFormat=2&selectColumns=All&version=2

Note: This will return all fields, including null value fields.

To Call with lastModifiedTime, fromIndex and toIndex

https://recruit.zoho.com/recruit/private/xml/Candidates/getRecords?authtoken=Auth Token&scope=recruitapi&fromIndex=1&toIndex=20&selectColumns=Candidates(First Name,Last Name,Email,Current Employer,Source,Phone,City,Highest Qualification Held)
&lastModifiedTime=2010-04-21 11:09:23
&fromIndex=1
&toIndex=25&version=2