Get Related Records API
This API will retrieve records based on lookup Record ID.
Request URL:
https://people.zoho.com/api/forms/exitinterview/getRelatedRecords?id=759415000000240001&parentModule=employee
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Scope:
ZOHOPEOPLE.forms.READ
Possible Operation Types:
READ - Read form data
Request Parameters:
PARAMETERS | VALUES ALLOWED | DEFAULT VALUE | PARAMETER DESCRIPTION | MANDATORY |
---|---|---|---|---|
formLinkName | - | To get formLinkName, you can use Fetch Forms API. | Yes | |
slindex | 1 | Starting index | No | |
limit | 200 | Number of records to be fetched | No | |
parentModule | - | Related records to the parent module will be fetched | Yes | |
id | - | Get related records based on record id | Yes | |
lookupfieldName | - | Records will be retrieved related to this lookup field | No |
Note: If lookupfieldName is not given, primary lookup of the form will be taken as input.
Common Error Codes and Descriptions
ERROR CODE | ERROR DESCRIPTION |
---|---|
7011 | Form name '<formlinkname>' is invalid |
7024 | No records found |
7013 | Field name '<param value>' is invalid |
7021 | Maximum record limit 200 is exceeded |
Threshold Limit: 30 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
Sample Request
Copiedhttps://people.zoho.com/people/api/forms/employee/getRelatedRecords?parentModule=department&id=3000000032001
Sample Response
Copied{
"response": {
"result": [
{
"759415000001349009": [
{
"BooksSubmitted": "",
"CreatedTime": "1748320506467",
"AddedTime": "27-May-2025 10:05:06",
"Clearance": "",
"Security": "",
"ModifiedBy": "Jane Doe",
"NoticePeriod": "",
"ApprovalStatus": "Approval Not Enabled",
"StaffFWelfare": "",
"ModifiedTime": "1748320506467",
"LikedMost": "",
"Zoho_ID": 759415000001349009,
"CompanyVehicle": "",
"Resignation": "",
"AddedBy": "HRM13 - Navin 01 - 01",
"AllEquipments": "",
"SeparationDate": "31-May-2025",
"ReasonForLeaving.id": "759415000000040023",
"EmployeeID.ID": "759415000000240001",
"ReasonForLeaving": "Retirement",
"ModifiedBy.ID": "759415000000240001",
"Interviewer.ID": "759415000000240001",
"Interviewer": "Jane Doe",
"AddedBy.ID": "759415000000240001",
"ExitInterview": "",
"ShareWithus": "",
"EmployeeID": "HRM02",
"WorkingForThisOrganizationAgain": ""
}
]
}
],
"message": "Data fetched successfully",
"uri": "/api/forms/exitinterview/getRelatedRecords",
"status": 0
}
}
Show full
Show less
CopiedOkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
Request request = new Request.Builder()
.url("https://people.zoho.com/api/forms/exitinterview/getRelatedRecords?id=759415000000240001&parentModule=employee")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "••••••")
.addHeader("Cookie", "CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a")
.build();
Response response = client.newCall(request).execute();
Copiedconst myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "••••••");
myHeaders.append("Cookie", "CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a");
const raw = JSON.stringify({});
const requestOptions = {
method: "GET",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://people.zoho.com/api/forms/exitinterview/getRelatedRecords?id=759415000000240001&parentModule=employee", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Copiedcurl --location --request GET 'https://people.zoho.com/api/forms/exitinterview/getRelatedRecords?id=759415000000240001&parentModule=employee' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--header 'Cookie: CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a' \
--data '{
}'
CopiedinputMap = Map();
inputMap.put("id","759415000000240001");
inputMap.put("parentModule","employee");
AuthMap = Collection();
AuthMap.insert("Authorization":"••••••");
response = invokeUrl
[
url: "https://people.zoho.com/api/forms/exitinterview/getRelatedRecords"
type: GET
parameters: inputMap
headers: AuthMap.toMap()
];
info response;
Copiedimport requests
import json
url = "https://people.zoho.com/api/forms/exitinterview/getRelatedRecords?id=759415000000240001&parentModule=employee"
payload = json.dumps({})
headers = {
'Content-Type': 'application/json',
'Authorization': '••••••',
'Cookie': 'CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Show full
Show less