GetRelatedRecords API

Purpose

To get a list of records related to a specific record, i.e, Notes, Attachments, etc.

Request URL

https://recruit.zoho.com/recruit/v2/{module_api_name}/{record_id}/{related_module}

module_api_name - The API name of the module
record_id - The unique Id of the record
related_module - The API name of the related module

Supported modulesRelated Modules

Candidates, Clients, Contacts, Job Openings, Campaigns, Tasks, Events, Calls, Departments, Interviews, Vendors, Offers

Notes, Attachments, Interviews, Invited_Events, Campaigns, Activities, Contacts, Activity History, Custom Related List, Offers, Reviews

Request Method

GET

Scope

scope=ZohoRecruit.modules.all
(or)
scope=ZohoRecruit.modules.{module_name}.{operation_type}

Possible module namesPossible operation types
candidate, application, jobopening, interview, client, review, contact, department, task, event, vendor, campaign, and custommoduleALL - Full access to the record
READ - Get records from the module

Parameters

Parameter NameData TypeDescriptionPossible Values
ids
(optional)
StringTo list the related records of the record with said IDRelated record ids, comma-separated.
For example: [100001000000023101,100001000000023102]
sort_order
(optional)
StringTo sort the available list of records in either ascending or descending orderasc - ascending order
desc - descending order
sort_by
(optional)
StringTo sort the available list of records based on the given fieldField API name
Example: Email
page
(optional)
IntegerTo get the list of records from the respective pages.
The default value for the page is 1.
Positive Integer values only
per_page
(optional)
IntegerTo get the list of records available per page.
The default value for the page is 200.
Positive Integer values only
fields
(optional)
String

To list all the module records with respect to fields

Multiple field API names, comma-separated.
For example: Last_Name, Email

Note:

  • sort_order applies to the given sort_by field.

  • If the sort_by field is not provided, then it applies to the system-defined field.

  • The page and per_page parameter is used to fetch records according to their position in Recruit. Let's assume that the user has to fetch 400 records. The maximum number of records that one can get for an API call is 200. So, for records above the 200th position, they cannot be fetched. By using the page (1, 2, 3, and 4) and the per_page (100) parameter, the user can fetch all 400 records using 4 API calls.

Possible Errors

HTTP StatusError CodeMessageReason
400INVALID_DATA

The given relation name seems to be invalid

The name of the related module mentioned is invalid
403

INVALID_DATA

The given relation ID seems to be invalid

Invalid PKID provided
500INTERNAL_SERVER_ERROR

Some error occurred

Exception

Sample Request

Copiedcurl "https://recruit.zoho.com/recruit/v2/Interviews/100001000000023096/Attachments"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample Response

Copied{
    "data": [
        {
            "Modified_Time": "2020-08-14T08:04:37+02:00",
            "File_Name": "Live Interview.ics",
            "Size": "394",
            "Created_Time": "2020-08-14T08:04:37+02:00",
            "Parent_Id": "100001000000023096",
            "$editable": true,
            "Attachment_Owner": {
                "name": "Patricia Boyle",
                "id": "100001000000021266"
            },
            "$file_id": true,
            "$type": "Attachment",
            "$se_module": "Interviews",
            "Modified_By": {
                "name": "Patricia Boyle",
                "id": "100001000000021266"
            },
            "id": "100001000000023101",
            "Created_By": {
                "name": "Patricia Boyle",
                "id": "100001000000021266"
            },
            "$link_url": null
        }
    ],
    "info": {
        "per_page": 200,
        "count": 1,
        "page": 1,
        "more_records": false
    }
}