Download the PHP package bamboohr/api without Composer

On this page you can find all versions of the php package bamboohr/api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api

BambooHR PHP SDK

Official PHP SDK for the BambooHR API. For complete API documentation, visit https://documentation.bamboohr.com/

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, simply run:

This will install the latest version of the SDK from Packagist, the main Composer repository.

Manual Installation

Download the files and include autoload.php:

Changelog

For a detailed list of changes and version history, see CHANGELOG.md.

Getting Started using the Fluent API Client (Recommended)

The SDK provides a modern, fluent interface for easier configuration and usage:

Quick Start with Fluent Interface

Authentication Methods

OAuth (Recommended)

API Key

Also refer to the getting started docs found here: https://documentation.bamboohr.com/docs/getting-started

Convenience Methods

Access commonly used APIs with simple method calls:

Advanced Configuration

Secure Logging

The SDK includes secure logging with automatic sensitive data redaction:

Note: Sensitive data (API keys, tokens, passwords) is automatically masked in logs.

Complete Example

Backward Compatibility

The traditional approach still works if you prefer it:

Migration Guide

If you're upgrading from an older version of the SDK or transitioning from direct API calls:

⚠️ Critical: Return Types

Returns are arrays, not objects:

Method name changes:

For detailed migration steps and troubleshooting, see MIGRATION.md.

OAuth Token Refresh

The SDK supports automatic OAuth token refresh when using BambooHR's OAuth 2.0 flow:

Persisting Refreshed Tokens:

When tokens are refreshed, you'll need to save the new tokens. Use the callback:

Note: Token refresh only activates when both accessToken AND refreshToken are provided via withOAuthRefresh(). Using the standard withOAuth() method will not enable automatic refresh.

API Endpoints

All URIs are relative to https://companySubDomain.bamboohr.com

Class Method HTTP request Description
AccountInformationApi getCountriesOptions GET /api/v1/meta/countries/options Get Countries
AccountInformationApi getListOfUsers GET /api/v1/meta/users Get Users
AccountInformationApi getStatesByCountryId GET /api/v1/meta/provinces/{countryId} Get States by Country ID
AccountInformationApi metadataAddOrUpdateValuesForListFields PUT /api/v1/meta/lists/{listFieldId} Create or Update List Field Values
AccountInformationApi metadataGetAListOfFields GET /api/v1/meta/fields Get Fields
AccountInformationApi metadataGetAListOfTabularFields GET /api/v1/meta/tables Get Tabular Fields
AccountInformationApi metadataGetDetailsForListFields GET /api/v1/meta/lists Get List Field Details
ApplicantTrackingApi addNewCandidate POST /api/v1/applicant_tracking/application Create Candidate
ApplicantTrackingApi addNewJobOpening POST /api/v1/applicant_tracking/job_opening Create Job Opening
ApplicantTrackingApi getApplicationDetails GET /api/v1/applicant_tracking/applications/{applicationId} Get Job Application Details
ApplicantTrackingApi getApplications GET /api/v1/applicant_tracking/applications Get Job Applications
ApplicantTrackingApi getCompanyLocations GET /api/v1/applicant_tracking/locations Get Company Locations
ApplicantTrackingApi getHiringLeads GET /api/v1/applicant_tracking/hiring_leads Get Hiring Leads
ApplicantTrackingApi getJobSummaries GET /api/v1/applicant_tracking/jobs Get Job Summaries
ApplicantTrackingApi getStatuses GET /api/v1/applicant_tracking/statuses Get Applicant Statuses
ApplicantTrackingApi postApplicantStatus POST /api/v1/applicant_tracking/applications/{applicationId}/status Update Applicant Status
ApplicantTrackingApi postApplicationComment POST /api/v1/applicant_tracking/applications/{applicationId}/comments Create Job Application Comment
BenefitsApi addEmployeeDependent POST /api/v1/employeedependents Create Employee Dependent
BenefitsApi getBenefitCoverages GET /api/v1/benefitcoverages Get Benefit Coverages
BenefitsApi getBenefitDeductionTypes GET /api/v1/benefits/settings/deduction_types/all Get Benefit Deduction Types
BenefitsApi getEmployeeDependent GET /api/v1/employeedependents/{id} Get Employee Dependent
BenefitsApi getEmployeeDependents GET /api/v1/employeedependents Get Employee Dependents
BenefitsApi getMemberBenefit GET /api/v1/benefit/member_benefit Get Member Benefit Events
BenefitsApi updateEmployeeDependent PUT /api/v1/employeedependents/{id} Update Employee Dependent
CompanyFilesApi addCompanyFileCategory POST /api/v1/files/categories Create Company File Category
CompanyFilesApi deleteCompanyFile DELETE /api/v1/files/{fileId} Delete Company File
CompanyFilesApi getCompanyFile GET /api/v1/files/{fileId} Get Company File
CompanyFilesApi listCompanyFiles GET /api/v1/files/view Get Company Files and Categories
CompanyFilesApi updateCompanyFile POST /api/v1/files/{fileId} Update Company File
CompanyFilesApi uploadCompanyFile POST /api/v1/files Upload Company File
CustomReportsApi getByReportId GET /api/v1/custom-reports/{reportId} Get Report by ID
CustomReportsApi listReports GET /api/v1/custom-reports Get Reports
DatasetsApi getDataFromDataset POST /api/v1/datasets/{datasetName} Get Data from Dataset
DatasetsApi getDatasets GET /api/v1/datasets Get Datasets
DatasetsApi getFieldOptions POST /api/v1/datasets/{datasetName}/field-options Get Field Options
DatasetsApi getFieldsFromDataset GET /api/v1/datasets/{datasetName}/fields Get Fields from Dataset
EmployeeFilesApi addEmployeeFileCategory POST /api/v1/employees/files/categories Create Employee File Category
EmployeeFilesApi deleteEmployeeFile DELETE /api/v1/employees/{id}/files/{fileId} Delete Employee File
EmployeeFilesApi getEmployeeFile GET /api/v1/employees/{id}/files/{fileId} Get Employee File
EmployeeFilesApi listEmployeeFiles GET /api/v1/employees/{id}/files/view Get Employee Files and Categories
EmployeeFilesApi updateEmployeeFile POST /api/v1/employees/{id}/files/{fileId} Update Employee File
EmployeeFilesApi uploadEmployeeFile POST /api/v1/employees/{id}/files Upload Employee File
EmployeesApi addEmployee POST /api/v1/employees Create Employee
EmployeesApi getCompanyInformation GET /api/v1/company_information Get Company Information
EmployeesApi getEmployee GET /api/v1/employees/{id} Get Employee
EmployeesApi getEmployeesDirectory GET /api/v1/employees/directory Get Employee Directory
EmployeesApi getEmployeesList GET /api/v1/employees Get Employees
EmployeesApi updateEmployee POST /api/v1/employees/{id} Update Employee
GoalsApi deleteGoal DELETE /api/v1/performance/employees/{employeeId}/goals/{goalId} Delete Goal
GoalsApi deleteGoalComment DELETE /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} Delete Goal Comment
GoalsApi getCanCreateGoal GET /api/v1/performance/employees/{employeeId}/goals/canCreateGoals Check Goal Creation Permission
GoalsApi getGoalAggregate GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate Get Goal Aggregate
GoalsApi getGoalComments GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments Get Goal Comments
GoalsApi getGoals GET /api/v1/performance/employees/{employeeId}/goals Get Goals
GoalsApi getGoalsAggregateV1 GET /api/v1/performance/employees/{employeeId}/goals/aggregate Get Goals Aggregate
GoalsApi getGoalsAggregateV11 GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate Get Goals Aggregate v1.1
GoalsApi getGoalsAggregateV12 GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate Get Goals Aggregate v1.2
GoalsApi getGoalsAlignmentOptions GET /api/v1/performance/employees/{employeeId}/goals/alignmentOptions Get Alignable Goal Options
GoalsApi getGoalsFiltersV1 GET /api/v1/performance/employees/{employeeId}/goals/filters Get Goal Filters
GoalsApi getGoalsFiltersV11 GET /api/v1_1/performance/employees/{employeeId}/goals/filters Get Goal Filters v1.1
GoalsApi getGoalsFiltersV12 GET /api/v1_2/performance/employees/{employeeId}/goals/filters Get Goal Status Counts v1.2
GoalsApi getGoalsShareOptions GET /api/v1/performance/employees/{employeeId}/goals/shareOptions Get Available Goal Sharing Options
GoalsApi postCloseGoal POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close Close Goal
GoalsApi postGoal POST /api/v1/performance/employees/{employeeId}/goals Create Goal
GoalsApi postGoalComment POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments Create Goal Comment
GoalsApi postReopenGoal POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen Reopen Goal
GoalsApi putGoalComment PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} Update Goal Comment
GoalsApi putGoalMilestoneProgress PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress Update Milestone Progress
GoalsApi putGoalProgress PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress Update Goal Progress
GoalsApi putGoalSharedWith PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith Update Goal Sharing
GoalsApi putGoalV1 PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} Update Goal
GoalsApi putGoalV11 PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} Update Goal v1.1
HoursApi addTimeTrackingBulk POST /api/v1/timetracking/record Create or Update Hour Records
HoursApi addTimeTrackingHourRecord POST /api/v1/timetracking/add Create Hour Record
HoursApi deleteTimeTrackingById DELETE /api/v1/timetracking/delete/{id} Delete Hour Record
HoursApi editTimeTrackingRecord PUT /api/v1/timetracking/adjust Update Hour Record
HoursApi getTimeTrackingRecord GET /api/v1/timetracking/record/{id} Get Hour Record
LastChangeInformationApi getChangedEmployeeIds GET /api/v1/employees/changed Get Updated Employee IDs
LoginApi login POST /api/v1/login User Login
PhotosApi getEmployeePhoto GET /api/v1/employees/{employeeId}/photo/{size} Get Employee Photo
PhotosApi uploadEmployeePhoto POST /api/v1/employees/{employeeId}/photo Upload Employee Photo
ReportsApi getCompanyReport GET /api/v1/reports/{id} Get Company Report
ReportsApi requestCustomReport POST /api/v1/reports/custom Request Custom Report
TabularDataApi addEmployeeTableRow POST /api/v1/employees/{id}/tables/{table} Create Table Row
TabularDataApi addEmployeeTableRowV1 POST /api/v1_1/employees/{id}/tables/{table} Create Table Row v1.1
TabularDataApi deleteEmployeeTableRowV1 DELETE /api/v1/employees/{id}/tables/{table}/{rowId} Delete Table Row
TabularDataApi getChangedEmployeeTableData GET /api/v1/employees/changed/tables/{table} Get Changed Employee Table Data
TabularDataApi getEmployeeTableRow GET /api/v1/employees/{id}/tables/{table} Get Employee Table Rows
TabularDataApi updateEmployeeTableRow POST /api/v1/employees/{id}/tables/{table}/{rowId} Update Table Row
TabularDataApi updateEmployeeTableRowV POST /api/v1_1/employees/{id}/tables/{table}/{rowId} Update Table Row v1.1
TimeOffApi getAListOfWhoIsOut GET /api/v1/time_off/whos_out Get Who’s Out
TimeOffApi getTimeOffPolicies GET /api/v1/meta/time_off/policies Get Time Off Policies
TimeOffApi getTimeOffTypes GET /api/v1/meta/time_off/types Get Time Off Types
TimeOffApi timeOffAddATimeOffHistoryItemForTimeOffRequest PUT /api/v1/employees/{employeeId}/time_off/history Create Time Off Request History Item
TimeOffApi timeOffAddATimeOffRequest PUT /api/v1/employees/{employeeId}/time_off/request Create Time Off Request
TimeOffApi timeOffAdjustTimeOffBalance PUT /api/v1/employees/{employeeId}/time_off/balance_adjustment Update Time Off Balance
TimeOffApi timeOffAssignTimeOffPoliciesForAnEmployee PUT /api/v1/employees/{employeeId}/time_off/policies Assign Time Off Policies
TimeOffApi timeOffAssignTimeOffPoliciesForAnEmployeeV11 PUT /api/v1_1/employees/{employeeId}/time_off/policies Assign Time Off Policies v1.1
TimeOffApi timeOffChangeARequestStatus PUT /api/v1/time_off/requests/{requestId}/status Update Time Off Request Status
TimeOffApi timeOffEstimateFutureTimeOffBalances GET /api/v1/employees/{employeeId}/time_off/calculator Estimate Future Time Off Balances
TimeOffApi timeOffGetTimeOffRequests GET /api/v1/time_off/requests Get Time Off Requests
TimeOffApi timeOffListTimeOffPoliciesForEmployee GET /api/v1/employees/{employeeId}/time_off/policies Get Time Off Policies for Employee
TimeOffApi timeOffListTimeOffPoliciesForEmployeeV11 GET /api/v1_1/employees/{employeeId}/time_off/policies Get Time Off Policies for Employee v1.1
TimeTrackingApi addEditTimesheetClockEntries POST /api/v1/time_tracking/clock_entries/store Create or Update Timesheet Clock Entries
TimeTrackingApi addEditTimesheetHourEntries POST /api/v1/time_tracking/hour_entries/store Create or Update Timesheet Hour Entries
TimeTrackingApi addTimesheetClockInEntry POST /api/v1/time_tracking/employees/{employeeId}/clock_in Create Timesheet Clock-In Entry
TimeTrackingApi addTimesheetClockOutEntry POST /api/v1/time_tracking/employees/{employeeId}/clock_out Create Timesheet Clock-Out Entry
TimeTrackingApi createTimeTrackingProject POST /api/v1/time_tracking/projects Create Time Tracking Project
TimeTrackingApi deleteTimesheetClockEntriesViaPost POST /api/v1/time_tracking/clock_entries/delete Delete Timesheet Clock Entries
TimeTrackingApi deleteTimesheetHourEntriesViaPost POST /api/v1/time_tracking/hour_entries/delete Delete Timesheet Hour Entries
TimeTrackingApi getTimesheetEntries GET /api/v1/time_tracking/timesheet_entries Get Timesheet Entries
TrainingApi addNewEmployeeTrainingRecord POST /api/v1/training/record/employee/{employeeId} Create Employee Training Record
TrainingApi addTrainingCategory POST /api/v1/training/category Create Training Category
TrainingApi addTrainingType POST /api/v1/training/type Create Training Type
TrainingApi deleteEmployeeTrainingRecord DELETE /api/v1/training/record/{employeeTrainingRecordId} Delete Employee Training Record
TrainingApi deleteTrainingCategory DELETE /api/v1/training/category/{trainingCategoryId} Delete Training Category
TrainingApi deleteTrainingType DELETE /api/v1/training/type/{trainingTypeId} Delete Training Type
TrainingApi listEmployeeTrainings GET /api/v1/training/record/employee/{employeeId} Get Employee Trainings
TrainingApi listTrainingCategories GET /api/v1/training/category Get Training Categories
TrainingApi listTrainingTypes GET /api/v1/training/type Get Training Types
TrainingApi updateEmployeeTrainingRecord PUT /api/v1/training/record/{employeeTrainingRecordId} Update Employee Training Record
TrainingApi updateTrainingCategory PUT /api/v1/training/category/{trainingCategoryId} Update Training Category
TrainingApi updateTrainingType PUT /api/v1/training/type/{trainingTypeId} Update Training Type
WebhooksApi deleteWebhook DELETE /api/v1/webhooks/{id} Delete Webhook
WebhooksApi getMonitorFields GET /api/v1/webhooks/monitor_fields Get Monitor Fields
WebhooksApi getWebhook GET /api/v1/webhooks/{id} Get Webhook
WebhooksApi getWebhookList GET /api/v1/webhooks Get Webhooks
WebhooksApi getWebhookLogs GET /api/v1/webhooks/{id}/log Get Webhook Logs
WebhooksApi postWebhook POST /api/v1/webhooks Create Webhook
WebhooksApi putWebhook PUT /api/v1/webhooks/{id} Update Webhook

Models

Exceptions

Authorization

Authentication schemes defined for the API:

oauth

To authenticate with OAuth, use the withOAuth() method outlined in the Authentication Methods section.

Or use the withOAuthRefresh() method to enable automatic token refresh, as outlined in the OAuth Token Refresh section.

api key

To authenticate with an API key, use the withApiKey() method, as outlined in the Authentication Methods section.

Security Note: Store your API key securely and never expose it in client-side code.

Also refer to the getting started docs found here: https://documentation.bamboohr.com/docs/getting-started

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Generating SDK

This requires access to the BambooHR OpenAPI spec. The path to the spec file is specified by the OPENAPI_SPEC_PATH environment variable.

To generate the SDK, run:

Manual changes to the auto-generated code

If you need to make manual changes to the auto-generated code, update the corresponding template in the templates-php directory and run make generate to regenerate the SDK. We have updated most of the templates fairly extensively to conform to our coding standards.

Nearly all files under lib and test are generated by the make generate command, with the following exceptions and notes:

Custom descriptions for some API docs are added in the scripts/add_custom_headers_to_api_docs.sh script, which is run as part of the make generate command.

Note: regeneration will not force an overwrite of tests in the test directory, unless tests are deleted first.

Generating Error Documentation

The error documentation is automatically generated from the error messages defined in ApiErrorHelper.php. To update the documentation when error messages are added or modified, run:

Note that this script will also run as part of the make generate command.

This will:

  1. Regenerate the docs/Exceptions/Exceptions.md file with the latest error information
  2. Generate exception classes in lib/Exceptions/ for each error type
  3. Generate exception documentation in docs/Exceptions/Classes/

Data Handling

This SDK is a thin HTTP client for the BambooHR API. All data transits directly between your application and the BambooHR API over HTTPS — the SDK does not send telemetry, analytics, or data to any other destination.

Support

If you encounter any issues or need assistance with this SDK, please contact us through one of these channels:

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

Terms

Use of the BambooHR API is subject to the BambooHR Developer Terms of Service.

License

MIT


All versions of api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0
mustache/mustache Version ^2.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bamboohr/api contains the following files

Loading the files please wait ...