Skip to Main Content
Official App
Free – Google Play
FreshBooks is Loved by American Small Business Owners
FreshBooks is Loved by Canadian Small Business Owners
FreshBooks is Loved by Small Business Owners in the UK
Dev Blog

A forgotten feature: Setting staff_ids on time entries

by Sunir on August 6/2010

For a long time, FreshBooks has actually supported the ability for administrators to set staff_ids on when calling time_entry.create and time_entry.update. Due to an oversight, we have not documented this fact until now.

Using staff_ids to simplify your add-on

As we mention in the documentation, only administrators can set or change the staff_id of a time entry through the API. However, we provided this ability to greatly simplify how third party time tracking applications work with FreshBooks. One big usability problem we kept encountering was that every user had to provide their FreshBooks API credentials to the third party applicaftion separately. Now, you only need to grab the administrator’s credentials once and use those credentials for every user. Just explicitly set the appropriate staff_id when creating time_entries.

The only caveat is determining which staff_id to pick. Staff.current will no longer be valuable if you follow this scheme. However, presumably in your application you already have the current user’s email address. Just match that field against the staff list you get from staff.list.

It is true, however, that unfortunately at this time you cannot yet filter staff.list by email address, so you’ll have to download the entire list to search it in memory.