---
title: "Get employee details from Zenefits API"
url: "https://getknit.dev/blog/get-employee-details-from-zenefits-api-v0giuz/"
date: "2024-08-02T07:35:47+00:00"
modified: "2024-08-02T07:36:56+00:00"
type: "post"
---

# Get employee details from Zenefits API

[Blog](https://getknit.dev/blog) / [Tutorials](https://getknit.dev/blogs/tutorials/) / Get employee details from Zenefits API [Tutorials](https://getknit.dev/blogs/tutorials/) · August 2, 2024 

Get employee details from Zenefits API
======================================

 ![](https://storage.googleapis.com/knit-website-media/2026/08/64c34c8eb1ffc79e7f787ecd_Akshat-3-112x112.png)Akshat Jain

3 min read

 

 

 [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgetknit.dev%2Fblog%2Fget-employee-details-from-zenefits-api-v0giuz%2F) [](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgetknit.dev%2Fblog%2Fget-employee-details-from-zenefits-api-v0giuz%2F&text=Get%20employee%20details%20from%20Zenefits%20API)  

 

 

 

  Table of Contents - [Introduction](#introduction)
- [Get Employee Details from Zenefits API](#get-employee-details-from-zenefits-api)
- [Overview](#overview)
- [Step-by-Step Guide](#step-by-step-guide)
- [Knit for Zenefits API Integration](#knit-for-zenefits-api-integration)
 
  Introduction
------------

This article is a part of a series of articles covering the Zenefits API in depth, and covers the specific use case of using the Zenefits API to Get employee details from Zenefits API.
You can find all the other use cases we have covered for the Zenefits API along with a comprehensive deep dive on its various aspects like authentication, rate limits etc [here.](/blog/zenefits-api-directory/)

Get Employee Details from Zenefits API
--------------------------------------

### Overview

The Zenefits API allows you to retrieve detailed information about employees within a company. To get the first name, last name, manager name, and date of joining for each employee, you will need to use multiple API endpoints. Below is a step-by-step guide with Python code snippets to achieve this.

### Step-by-Step Guide

#### 1. Get All Employees

First, you need to retrieve the list of all employees in the company using the `/core/companies/{company_id}/people` endpoint.

```python
import requests

def get_employees(company_id, access_token):
    url = f"https://api.zenefits.com/core/companies/{company_id}/people"
    headers = {
        "Authorization": f"Bearer {access_token}"
    }
    response = requests.get(url, headers=headers)
    return response.json()["data"]["data"]

company_id = "your_company_id"
access_token = "your_access_token"
employees = get_employees(company_id, access_token)

```

#### 2. Get Employee Details

For each employee, retrieve detailed information using the `/core/people/{id}` endpoint.

```python
def get_employee_details(employee_id, access_token):
    url = f"https://api.zenefits.com/core/people/{employee_id}"
    headers = {
        "Authorization": f"Bearer {access_token}"
    }
    response = requests.get(url, headers=headers)
    return response.json()["data"]

employee_details = [get_employee_details(emp["id"], access_token) for emp in employees]

```

#### 3. Extract Required Information

Extract the first name, last name, manager name, and date of joining from the employee details.

```python
def extract_employee_info(employee):
    first_name = employee.get("first_name")
    last_name = employee.get("last_name")
    manager_url = employee.get("manager", {}).get("url")
    date_of_joining = employee.get("employments", {}).get("data", [{}])[0].get("hire_date")
    
    manager_name = None
    if manager_url:
        manager_id = manager_url.split("/")[-1]
        manager_details = get_employee_details(manager_id, access_token)
        manager_name = f"{manager_details.get('first_name')} {manager_details.get('last_name')}"
    
    return {
        "first_name": first_name,
        "last_name": last_name,
        "manager_name": manager_name,
        "date_of_joining": date_of_joining
    }

employee_info_list = [extract_employee_info(emp) for emp in employee_details]

```

#### 4. Display the Information

Finally, display the extracted information.

```python
for info in employee_info_list:
    print(f"First Name: {info['first_name']}, Last Name: {info['last_name']}, Manager: {info['manager_name']}, Date of Joining: {info['date_of_joining']}")

```

Knit for Zenefits API Integration
---------------------------------

For quick and seamless access to [Zenefits](/integration/zenefits/) API, Knit API offers a convenient solution. By integrating with Knit just once, you can streamline the entire process. Knit takes care of all the authentication, authorization, and ongoing integration maintenance, this approach not only saves time but also ensures a smooth and reliable connection to your [Zenefits](/integration/zenefits/) API.

Building a Zenefits integration?

Knit gives you two ways to build it. Pick the one that fits.

- [Zenefits on Unified API](https://getknit.dev/integration/zenefits/)
    
    Your customers want Zenefits and the other HRIS tools they use. Build one integration and get normalised read and write data with real-time webhooks.
    
    [Try free](https://dashboard.getknit.dev/signup)
- [Zenefits MCP server](https://getknit.dev/mcp-servers/zenefits-mcp-server/)
    
    Your AI agent needs to read and act in your customers' Zenefits. Use a pre-built, hosted MCP server instead of writing integration code.
    
    [Try free](https://mcphub.getknit.dev/)

Knit's Unified API connects to 190+ apps across HRIS, ATS, CRM, accounting and more.

Knit never stores your end users' data and is SOC 2, GDPR and ISO 27001 compliant: [How Knit handles security](/security/) · [Security Center](https://compliance.getknit.dev/)

Not sure which fits? [Talk to a human](/book-demo/)

 

 ![](https://storage.googleapis.com/knit-website-media/2026/08/64c34c8eb1ffc79e7f787ecd_Akshat-3-112x112.png)Written by Akshat Jain

Coding chaos into innovation and building from zero to scale

 

 

 

 

 

  Keep Reading
------------

  ![Zenefits API Directory](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-yellow-scaled-640x400.png) [API Directory](https://getknit.dev/blogs/api-directory/) 

### [Zenefits API Directory](https://getknit.dev/blog/zenefits-api-directory/)

A practical guide to Zenefits API integration covering HR, payroll, time off, and platform endpoints, key capabilities, and best practices…

 December 28, 2025 · 6 min read 

 

   ![A Guide to Integrating with Zenefits APIs](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-green-640x400.png) [API Directory](https://getknit.dev/blogs/api-directory/) 

### [A Guide to Integrating with Zenefits APIs](https://getknit.dev/blog/a-guide-to-integrating-with-zenefits-apis/)

Comprehensive API Directory for Zenefits and how to go about integrating with Zenefits

 April 6, 2024 · 9 min read 

 

   ![How to Get an Okta API Token (Step-by-Step)](https://storage.googleapis.com/knit-website-media/2026/08/blog-banner-red-scaled-640x400.png) [Tutorials](https://getknit.dev/blogs/tutorials/) 

### [How to Get an Okta API Token (Step-by-Step)](https://getknit.dev/blog/okta-api-key/)

Generate an Okta API token in the Admin Console, add it as an SSWS Authorization header, and call the Okta…

 July 22, 2026 · 8 min read 

 

  

 

  \#1 in Ease of Integrations
---------------------------

![4.9 out of 5 stars](/wp-content/themes/knit/assets/images/g2/g2-star-rating.svg)

4.9 out of 5 stars on G2

![G2 Leader, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-leader.svg)![G2 Fastest Implementation, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-fastest-implementation.svg)![G2 High Performer, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-high-performer.svg)![G2 Best Est. ROI, Spring 2026](/wp-content/themes/knit/assets/images/g2/g2-best-roi.svg)

 

  Put Integrations on Autopilot. Talk to Experts.
-----------------------------------------------

Knit is loved by customers across the globe due to our seamless product and white glove support. You'll love us too!

 [Talk to a Human](/book-demo)
