The development crew here has been busy improving our API and the tools for accessing it. We have much more planned, but wanted to announce the immediate availability of toolkit downloads for those PHP and Perl developers out there. These toolkits make accessing your TSheets data and doing things like clock-ins, clock-outs and job-code management a breeze.
Simple PHP Clock-in Example ∞
require_once('tsheets.inc.php'); $tsheets = new TSheetsRestClient($url, $api_key, $username, $password); $json = $tsheets->request('clock_in', array('job_code_id' => 12345678));
Simple Perl Clock-in Example ∞
require("HtGet.pm"); require("TSheetsRestClient.pm"); $tsheets = TSheetsRestClient->new($url, $api_key, $username, $password); %params = ('job_code_id' => '12345678'); $json = $tsheets->request('clock_in', \%params);
What else can the API Do? ∞
The full list is documented on the API page. A few examples:
- Find out if you’re on the clock or not
- Load a list of users on-the-clock
- Clock-in, clock-out & switch job-codes
- Add, edit, list & delete users
- Add, edit, list & delete job-codes
- Get day and week totals for hours logged
Download ∞
Please download these from the API Toolkit Downloads page.
Future Plans ∞
We actually have a number of enhancements to the API coming in the near future. A few worth mentioning are the ability to work with “manual” time entries (entries with no in/out times) and better reporting options. Enjoy what’s there and keep the stream of requests coming, it helps us prioritize what happens first.
Holiday cheer from the TSheets crew :)
Employees!TM

4 Responses to API Toolkits for PHP & Perl
Is the app available for blackberry? does the gps portion cause the battery to run down?
[Reply]
Hi Justin, we don’t have a Blackberry app yet. It’s planned for 2011. In the mean time if you access your TSheets account via the Blackberry browser it will give you a light version of the web-app that loads quickly.
[Reply]
Any plans to have ASP.NET API ? if so i am sold
[Reply]
Justin, to be honest we don’t have anyone here who’s any good at ASP.NET yet. If you wanted to tackle porting our PHP class to ASP.NET I’d be happy to work with you on it. I imagine it could be done in one or two evenings because it’s pretty simple code.
[Reply]