Choose where you’d like to start

Get Record By ID from Zoho People

Overview

The zoho.people.getRecordById task is used to fetch a record from the specified Zoho People form using its ID.

Syntax

<response> = zoho.people.getRecordById(<form_name>, <record_id>, [<connection>]);

where:

Params Data typeDescription

<response> 

KEY-VALUE

The details of the record that will be fetched.

<form_name> 

TEXT

The label name of the form from which the records need to be fetched.

Note: Click here for the instructions to get the form label names in Zoho People.

<record_id>

NUMBER

The ID of the record that needs to be fetched.

Note: Learn how to get the ID of a record after fetching and creating it.

<connection>

(optional)*

TEXT

The name of the connection.

*Note: This param is not applicable to Zoho Creator and mandatory in Zoho Cliq.

Example

The following script fetches the record with ID - 4163000000170001 from the form - Employee in Zoho People

response = zoho.people.getRecordById("P_Employee", 4163000000170001);

where:

"P_Employee"
The TEXT that represents the label name of the form from which the record needs to be fetched.
4163000000170001
The NUMBER that represents the ID of the record that needs to be fetched.

Response Format

Success Response

  • The success response will be returned in the following format:

    {  
       "Current_Job_Description":"",
       "EmailID":"richard@zohocorp.com",
       "CreatedTime":"1500373226190",
       "Address":"",
       "Date_of_birth":"",
       "Dateofexit":"",
       "Photo":"https://contacts.zoho.com/file?ID=-1&fs=thumb",
       "Marital_status":"",
       "Gender":"",
       "Other_Email":"",
       "ApprovalStatus":"Approval Not Enabled",
       "Work_location":"",
       "LocationName":"",
       "Department":"",
       "Nick_Name":"",
       "ModifiedTime":"1500373226190",
       "Reporting_To.MailID":"",
       "Zoho_ID":"4163000000170001",
       "LocationName.ID":"",
       "Designation.ID":"",
       "tabularSections":"{\"Education\":[{\"Specialization\":\"\",\"Education_AdditionalNotes\":\"\",\"Degree\":\"\",\"College\":\"\",\"Yearofgraduation\":\"\",\"Interests\":\"\"}],\"Work experience\":[{\"Jobtitle\":\"\",\"Employer\":\"\",\"Previous_JobDesc\":\"\",\"FromDate\":\"\",\"Todate\":\"\"}],\"Dependent\":[{\"DependentDOB\":\"\",\"Name\":\"\",\"DependentRelationship\":\"\"}]}",
       "Source_of_hire":"",
       "Tags":"",
       "Reporting_To":"",
       "Photo_downloadUrl":"https://contacts.zoho.com/file?ID=-1&fs=thumb",
       "Designation":"",
       "FirstName":"Richard",
       "Dateofjoining":"",
       "AboutMe":"",
       "Mobile":"",
       "Employeestatus":"Inactive",
       "Extension":"",
       "Role":"Team member",
       "Employee_type":"",
       "Reporting_To.ID":"",
       "Work_phone":"",
       "Role.ID":"4163000000019635",
       "LastName":"Patrick",
       "Department.ID":"",
       "EmployeeID":"12311",
       "Expertise":""
    }

Failure Response

  • The failure response for incorrect or non-existent form name will be returned in the following format:

    {  
       "response": {
       "message": "Error occurred",
       "uri": "/api/forms/PEmployee/getDataByID",
       "errors": {
       "code": 7011,
       "message": "Form name 'PEmployee' is invalid"
       },
       "status": 1
       }
       }

  • The failure response for incorrect or non-existent record ID will be returned in the following format:

    {  
       "response": {
       "message": "Error occurred",
       "uri": "/api/forms/P_Employee/getDataByID",
       "errors": {
       "code": 7049,
       "message": "No record available with the specified record ID"
       },
       "status": 1
       }
    }

Related Links

Get Started Now

Execute