Get Record IDs By Reference IDs API
To obtain the IDs of records for entities like Client, Project, Job, and time logs by using the IDs of records from other services. It is possible to retrieve the IDs of records that have been synced via Integrations.
Important Note
Record IDs can only be fetched for the following integrations:
Zoho People - Zoho Books/Invoice Integration
Zoho People - Zoho Projects Integration
Zoho People - Zoho CRM Integration
Sample Request
Sample Response
{
"response": {
"result": {
<ReferenceId_1> : <RecordId_1>,
<ReferenceId_2> : <RecordId_2>,
...
},
"message": "Data fetched successfully",
"uri": "/api/timetracker/getRecordIdsByReferenceIds",
"status": 0
}
}
Scope
ZOHOPEOPLE.timetracker.ALL
(or)
ZOHOPEOPLE.timetracker.READ
Possible Operation Types
ALL - Full access to data
READ - Only access to read data
Request Parameters
PARAMETERS | VALUES ALLOWED | DEFAULT VALUE | PARAMETER DESCRIPTION | MANDATORY |
---|---|---|---|---|
service | Zoho Books | Zoho Invoice | Zoho CRM | Zoho Projects | Specify the service that the provided referenceIds belong to. | Yes | |
entity | client | project | job | timelog | Specify the entity that the provided referenceIds belong to. | Yes | |
referenceId | <Reference Ids> | ReferenceIds - Ids of records in other services is referred as reference Ids. Specify the reference IDs of the entities for which you want to get the record IDs. Maximum number of IDs allowed is 200. | Yes |
Common Error Codes and Descriptions
ERROR CODE | ERROR DESCRIPTION |
---|---|
9000 | Permission Denied |
7019 | Missing parameter(s) in the request |
7205 | Input format does not match |
7214 | Maximum occurrences exceeded for referenceId. |
Threshold Limit: 50 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
Copiedimport okhttp3.*;
public class Main {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient();
HttpUrl url = new HttpUrl.Builder()
.scheme("https")
.host("people.zoho.com") .addPathSegments("api/timetracker/getRecordIdsByReferenceIds")
.addQueryParameter("service", "Zoho Projects")
.addQueryParameter("entity", "job")
.addQueryParameter("referenceId", "112674000000221023,112674000000221024")
.build();
Request request = new Request.Builder()
.url(url)
.get()
.addHeader("Authorization", "Zoho-oauthtoken YOUR_ACCESS_TOKEN")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Copiedconst service = "Zoho Projects"; // Example value
const entity = "job"; // Example value
const referenceIds = "112674000000221023,112674000000221024"; // Example value
const url = `https://people.zoho.com/api/timetracker/getRecordIdsByReferenceIds?service=${encodeURIComponent(service)}&entity=${encodeURIComponent(entity)}&referenceId=${encodeURIComponent(referenceIds)}`;
fetch(url, {
method: "GET",
headers: {
"Authorization": "Zoho-oauthtoken YOUR_ACCESS_TOKEN"
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Copiedcurl -X GET "https://people.zoho.com/api/timetracker/getRecordIdsByReferenceIds?service=Zoho%20Projects&entity=job&referenceId=112674000000221023,112674000000221024" \
-H "Authorization: Zoho-oauthtoken YOUR_ACCESS_TOKEN"
Copiedurl = "https://people.zoho.com/api/timetracker/getRecordIdsByReferenceIds";
headers = map();
headers.put("Content-Type", "application/json");
headers.put("Authorization", "Zoho-oauthtoken YOUR_ACCESS_TOKEN");
params = map();
params.put("service", "Zoho Projects");
params.put("entity", "job");
params.put("referenceId", "112674000000221023,112674000000221024");
response = invokeurl
[
url : url
type : GET
parameters: params
headers: headers
];
info response;
Copiedimport requests
service = "Zoho Projects" # Example value
entity = "job" # Example value
referenceIds = "1234567890,9876543210" # Example value
url = "https://people.zoho.com/api/timetracker/getRecordIdsByReferenceIds"
params = {
"service": "Zoho Projects",
"entity": "job",
"referenceId": "112674000000221023,112674000000221024"
}
headers = {
"Authorization": "Zoho-oauthtoken YOUR_ACCESS_TOKEN"
}
response = requests.get(url, params=params, headers=headers)
print(response.json())