Tutorials · August 13, 2026

How to get employee dependent data from BambooHR API (Python Example)

Akshat Jain
2 min read
Table of Contents

Introduction

This article is a part of a series of articles covering the BambooHR API in depth, and covers the specific use case of using the BambooHR API to Get employee details.

If you are looking for a comprehensive directory of BambooHR API endpoints to discover what endpoints will fit best for your use case, check our BambooHR API Directory.

BambooHR API: Get Employee Details

Overview

To retrieve detailed information about employees in BambooHR, you can utilize multiple APIs. This guide provides a step-by-step approach to get the first name and last name of all employees using the BambooHR API.

Step-by-Step Guide

Step 1: Get Employee Directory

First, you need to fetch the employee directory, which contains basic information about all employees.

Endpoint
GET https://api.bamboohr.com/api/gateway.php/{companyDomain}/v1/employees/directory
Sample Python Code
import requests

company_domain = 'your_company_domain'
url = f'https://api.bamboohr.com/api/gateway.php/{company_domain}/v1/employees/directory'
headers = {
   'Accept': 'application/json',
   'Authorization': 'Basic YOUR_API_KEY'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
   employees = response.json().get('employees', [])
   for employee in employees:
       print(f"First Name: {employee.get('firstName')}, Last Name: {employee.get('lastName')}")
else:
   print(f"Failed to retrieve employee directory: {response.status_code}")

Step 2: Get Employee Dependents (Optional)

If you need additional details such as employee dependents, you can use the following endpoint.

Endpoint
GET https://api.bamboohr.com/api/gateway.php/{companyDomain}/v1/employeedependents
Sample Python Code
employee_id = 'specific_employee_id'
url = f'https://api.bamboohr.com/api/gateway.php/{company_domain}/v1/employeedependents?employeeid={employee_id}'
response = requests.get(url, headers=headers)
if response.status_code == 200:
   dependents = response.json().get('Employee Dependents', [])
   for dependent in dependents:
       print(f"Dependent Name: {dependent.get('firstName')} {dependent.get('lastName')}")
else:
   print(f"Failed to retrieve employee dependents: {response.status_code}")

Knit for BambooHR API Integration

For quick and seamless access to BambooHR 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 BambooHR API.


Ready to build this integration?
Explore Knit’s BambooHR integration or read more about our Unified HRIS API.

Written by Akshat Jain

Coding chaos into innovation and building from zero to scale

Keep Reading

BambooHR API Directory

Learn about the common BambooHR API end points in this comprehensive BambooHR API directory and quickstart your BAmbooHR integration journey!

April 4, 2026 · 12 min read

#1 in Ease of Integrations

4.9 out of 5 stars

4.9 out of 5 stars on G2

G2 Leader, Spring 2026G2 Fastest Implementation, Spring 2026G2 High Performer, Spring 2026G2 Best Est. ROI, Spring 2026

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