New Version released ! Get it Here.

I’ve been making enhancements since the initial release of the PHP Wrapper Library for the Harvest API, that I first released a week ago in my entry PHP Wrapper Library for the Harvest API. This 0.2 version of the wrapper library contains bug fixes for some issues that Jesse Mortenson of Supermega Design found, as well as implementation of the full API for Projects, Clients, and Client Contacts. Create and Delete functionality has been included for all other Harvest Objects but is currently untested.

Example Setup

  1. Require the HarvestAPI main class
    require_once( dirname(__FILE__) . '/HarvestAPI.php' );
  2. Register the Auto Loader
    spl_autoload_register(array('HarvestAPI', 'autoload') );
  3. Set Account & User information
    $api = new HarvestAPI();
    $api->setUser( "user@email.com" );
    $api->setPassword( "password" );
    $api->setAccount( "account" );

Example: Create a new Client

  1. Initialize and populate your Client Object
    $client = new Harvest_Client();
    $client->set( "name", "New Client" );
    $client->set( "details", "Our new Client" );
  2. Call create method
    $result = $api->createClient( $client );
  3. Check if request was successfull
    if( $result->isSuccess() ) {
      ...
    }
  4. If successful you will be returned the new Client’s Harvest ID
    $client_id = $result->data;

Example: Toggle a Projects active state

  1. Call toggle method with the Project’s Harvest ID
    $result = $api->toggleProject( $project_id );
  2. Check if request was successfull
    if( $result->isSuccess() ) {
      ...
    }

Contact

If you encounter bugs, or issues with the library please contact me with the details. I hope that you will find this useful and if you do feel free to leave a comment.

Download

Resources

, , ,

UPDATE: Current Release details and download available here

Harvest Users may or may not be familiar with the Harvest API that can be used to access and manipulate timesheets, clients, projects, tasks, and more. Since Harvests creation they have been integrating with other 3rd party applications and to communicate information across channels they created the Harvest API.

Harvest users can use this same API to utilize information in their Harvest account in their own applications.  Currently their is an open-sourced Harvest Ruby wrapper that can be from github. But as I prefer to utilize PHP I have created a PHP Wrapper Library for the Harvest API.  Currently the API requires cURL support and can be utilized to obtain information from your harvest account but not modification of data. Over the next few months I will be expanding this to include the rest of the functionality of the API.

Example Usage

  1. Require the HarvestAPI main class
    require_once( dirname(__FILE__) . '/HarvestAPI.php' );
  2. Register the Auto Loader
    spl_autoload_register(array('HarvestAPI', 'autoload') );
  3. Set Account & User information
    $api = new HarvestAPI();
    $api->setUser( "user@email.com" );
    $api->setPassword( "password" );
    $api->setAccount( "account" );
  4. Query the API for desired information
    $result = $api->getClient( 1-----  );
    $result = $api->getProjects();
  5. Check if request was successfull
    if( $result->isSuccess() ) {
      ...
    }
  6. If successful use the information
    $project = $result->data;
    echo "Name: " . $project->name;
    echo "Id: " . $project->id;
    echo "Active: " . $project->active;

Contact

Currently the library is in its first phase so you may encounter some bugs, or issues If you do so please contact me with the details. Also if you find that you need a particular feature of the Harvest API that is currently not supported please also let me know so I can know where to focus my development efforts. I hope that you will find this useful and if you do feel free to leave a comment.

Download

Resources

, , ,

What is Harvest?

Harvest is, simply put, an online time tracking application. Harvest works on the basic concept that your time is recorded on a per project basis and that each project belongs to a client. This allows you to easily generate an invoice for a project or at the client level depending on your own billing needs. In addition your time can be recorded against tasks to get detailed reports on where your time is spent on a project.  Some of the key features of Harvest are outline below.

Features

  • Time Tracking
    Harvest has an online interface for entering your time as well as desktop applications.
  • Budgets
    Harvest
    allows you to set budgets on a project or for specific tasks. Allowing you to easily see what projects are over budget or determining what tasks are consistently over budget to determine if you need to allocate more resources or take further action
  • Reports
    Harvest has various reports from project statuses, invoices, expenses, and detailed time tracking of users, tasks, and projects.
  • Quickbooks Integration
    Harvest has the built in ability to export time sheets to Quickbooks if you use it for billing and reporting
  • Basecamp Integration
    built in integration with basecamp project management software
  • API
    Harvest provides both a Time Tracking API and an extended REST API for easily accessing and managing data. Allowing Harvest Users to easily integrate harvest reports or account management into their own applications.

Summary

Harvest is available with 3 different pricing plans, ranging in price from $12 to $90 per month.  For those just starting out they offer a 30 day free trial and a free account that allows you to track 4 active clients and 2 active projects.  Visit Harvest’s website to learn more and sign-up today.

,