API
Tabular Data
Some data in the BambooHR system is stored as a two dimensional grid for each employee. The tables API allows you to grab tabular data for the various tables in BambooHR. For standard tables, a series of fields will be outlined below. API Support for custom tables will be added in a future release.
Supported standard tables
The following standard tables can be used with the tables API:
| Table | Columns |
|---|---|
| jobInfo |
|
| employmentStatus |
|
| compensation |
|
| dependents |
|
| emergencyContacts (or "contacts") |
|
* Comment fields bypass the normal permissions system. They are never accessible to self-service users. They are always accessible to full users as long as those users are allowed to see a given employee.
Get a table
| HTTP Method: | GET |
|---|---|
| Path: | /api/gateway.php/{company}/v1/employees/{employee id}/tables/{table name} |
| Sample request: | GET /employees/1/tables/jobInfo/ |
| Sample response: | |
<table> <row id="1"> <field name="date">2010-06-01</field> <field name="location">New York Office</field> <field name="division">Sprockets</field> <field name="department">Research and Development</field> <field name="jobTitle">Machinist</field> <field name="reportsTo">John Smith</field> </row> <row id="2"> <field name="date">2009-03-01</field> <field name="location">New York Office</field> <field name="division">Sprockets</field> <field name="department">Sales</field> <field name="jobTitle">Salesman</field> <field name="reportsTo">Jane Doe</field> </row> </table> |
|
Update a row
| HTTP Method: | POST |
|---|---|
| Path: | /api/gateway.php/{company}/v1/employees/{employee id}/tables/{table name}/{row id} |
| Sample post data: | |
<row> <field name="date">2010-06-01</field> <field name="location">New York Office</field> <field name="division">Sprockets</field> <field name="department">Research and Development</field> <field name="jobTitle">Machinist</field> <field name="reportsTo">John Smith</field> </row> |
|
Add a row
| HTTP Method: | POST |
|---|---|
| Path: | /api/gateway.php/{company}/v1/employees/{employee id}/tables/{table name} |
| Sample post data: | |
<row> <field name="date">2010-06-01</field> <field name="location">New York Office</field> <field name="division">Sprockets</field> <field name="department">Research and Development</field> <field name="jobTitle">Machinist</field> <field name="reportsTo">John Smith</field> </row> |
|
Have more questions? We're here to help, so please contact us.