New API Features debuting September 21
Hi there FreshBooks integrators and other generally interested parties!
As of today, we have some new API features to announce. The keen-eyed among you may have already noticed
some new elements in the xml we send in response to various API calls. If you didn’t, don’t sweat it, I’ll tell you
about them now:
Within the FreshBooks web UI, many items can have a visibility status of Active, Archived, or Deleted. For the purposes of
the API, we decided to call those three states “folders” and we now provide a <folder> element to indicate which
of the three states the object is in. Yes, that’s right. You can now list deleted items through the API.
That’s not really the cool part though. You can also now filter on the folder when you make a request to any of the *.list
methods, and specify which folder you’d want to get objects from:
<!--List only active invoices--> <?xml version="1.0" encoding="utf-8"> <request method="invoice.list"> <folder>active</folder> </request>
Note that this means that by specifying <folder>deleted</folder>, you can now access deleted items via the API (yay!),
something that wasn’t possible before. Also note that only the .list methods have changed.
If you request a deleted object with one of the .get methods, you will still get nada, nor will
you be able to update deleted items via the API.
The affected methods:
Lastly, the default behavior hasn’t changed. If you omit the <folder> element from your .list
requests, the API will return both Active and Archived items, as it always has.
Client Statment links
We now include direct links the clients’ statements in the <links>
section of the <client> output from both client.list and client.get.
And there was much rejoicing.