Skip to content

Stubbs/bhr-api-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bhr-api-php

A PHP wrapper for the BambooHR API

Quick Start

You will need two pieces of information to get started.

  1. The company subdomain of your BambooHR account. If you access bamboo at hamsterfarm.bamboohr.com, this is "hamsterfarm"
  2. An API key. You can find instructions on obtaining an API key here

Once you have that, the following code will get a directory of employees (as long as your user is able to access the directory)

<?php
include "BambooHR/API/API.php";

use \BambooHR\API\BambooAPI;

$bhr = new API("<company_subdomain>");
$bhr->setSecretKey("<bar>");
$response = $bhr->getDirectory();
if($response->isError()) {
   trigger_error("Error communicating with BambooHR: " . $response->getErrorMessage());
}
$simplexml = $response->getContent();
...
?>

After that, you may want to explore the employee api, or just look through the wrapper code.

About

PHP wrapper for the BambooHR API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%