FreshBooks is a web based accounting application that makes it easy for you to track the time you spend on projects and invoice your clients. The company behind it is very web savvy and has managed to deliver a well documented, easy to use API for third party integration. This module aims to provide a full integration of the FreshBooks API for use by this and other Drupal modules.
This module requires PHP5 with SimpleXML and cURL support.
The only thing you need to do to get started is get your API credentials by browsing to the "Enable FreshBooks API" settings page in your account. Once you agree to the terms of service, an API URL and authentication token will be displayed. These must be plugged into the settings form at Administer > Settings > FreshBooks.
Once your API credentials have been entered, you can browse to the simple test page to make sure you can make the connection. The test attempts to establish a connection to FreshBooks and displays an appropriate message depending on whether or not your credentials authenticate.
NOTE: Version 2.x of the FreshBooks API module is a rewrite that wraps around the FreshBooks PHP library by Milan Rukavina. Its interface is not compatible with modules and site code that was written for version 1.x.
- Download the zip file for version 1.2 of the FreshBooks PHP library by Milan Rukavina. Later versions may be compatible, but have not been tested.
- Under your Drupal site folder, create a
- Extract the contents of the
library/FreshBooksfolder from the zip file into
libraries/freshbooks-php. When done, the path from the root of the Drupal install to the file
HttpClient.phpshould be something like
- Install the Libraries API module.
- Install the 2.x FreshBooks API module.
- Visit Administer > Site Configuration > FreshBooks to supply and test your FreshBooks API access credentials.
API Integration Status
The following FreshBooks API requests are currently supported:
- Client requests - client.create, client.update, client.get, client.delete, client.list
The DrupalFreshBooks class also defines a custom method used to verify a set of API credentials.
The FreshBooks PHP library natively supports almost all of the FreshBooks API that was published on http://developers.freshbooks.com as of February 2, 2010.
FreshBooks Extended API
In addition, enabling the included "FreshBooks Extended API" sub-module adds support for features FreshBooks added on February 23, 2010, including auto-billing, webhooks, client "view links", and the following additional calls:
As of June 2010, the following API call is known to be unsupported:
If there is an API call that the FreshBooks API supports that this module does not appear to support, please open a feature request.
FreshBooks Webhooks API
Enabling the included "FreshBooks Webhooks API" sub-module (which depends upon the "FreshBooks Extended API" sub-module) enables a Drupal site to respond to Webhooks call-backs by implementing special Drupal hooks. See
freshbooks_webhooks/hooks.php for examples and documentation on all currently known webhooks hook implementations.
The callback URI on the FreshBooks site should be set to the menu path
freshbooks/callback on the Drupal site (i.e.
http://www.example.com/freshbooks/callback). The FreshBooks Webhooks API module will automatically verify the callback with FreshBooks using the
callback.verify API call. Incoming Webhooks callbacks should also generate entries in the watchdog log.
Development by rszrama.
If you like version 2.x of this module, please consider making a donation to Red Bottle Design, LLC.
- Maintenance status: Minimally maintained
- Development status: Under active development
- Module categories: Commerce/Advertising, Developer, E-commerce, Third-party Integration
- Reported installs: 14 sites currently report using this module. View usage statistics.
- Downloads: 1,466
- Last modified: April 7, 2011