Developer Tips
Before you dive into development, take a look at the list of commonly overlooked issues, or features, of FreshBooks and the API.
Things you should know before developing with the FreshBooks API
- ‘Draft’ status invoices should not be counted as actual invoices.
- ‘Partial’ status invoices are marked as ‘Draft’ in the api and should be checked for. These invoices will have a non-zero ‘amount_outstanding’ value.
- FreshBooks supports multiple currencies, so invoices may be in different currencies within a single account.
- There are two types of users in FreshBooks, admin and staff. Be sure to verify that the add-on functions for both admin and staff tokens.
- Customers may have multiple FreshBooks accounts.
- Results from ‘.list’ calls are paginated to 100 results at a time. You will need to page through the results if there are more than 100 items.
- Deleted items are not available through the api.
- FreshBooks offers two methods of authenticating with the API; OAuth and token authentication. All new add-ons to the FreshBooks directory require OAuth authentication through the api. The token method will be reserved strictly for personal api development.
- Clients may have the same email addresses.
- There are two second level domains (xxxx.freshbooks.com, xxxx.billingarm.com) It’s wise to accept subdomains with this regexp:subdomain = /(?:https?://)?([^.]+?)(?:[.](?:freshbooks|billingarm)[.]com)?/i