Filter invoices, bills, timeslips, contacts, etc by creation / updated date

I’m working on a FreeAgent API integration module for the Drupal CMS
(http://drupal.org/project/freeagent). Its primary aim is to download the
data via the API and store it locally for report generation. It’s designed
to pull data from FreeAgent on a daily basis using cron.

One of the really annoying things about the current API is the inability to
fetch just the new or updated timeslips, contacts, etc since the last time
cron ran. As it stands, I have to make multiple calls to the API to fetch
all the contacts, etc (allowing for multiple pagination requests) to ensure
the local records are kept up to date. This results in tens to hundreds of
unnecessary API calls on your service - and that’s just for one Drupal site
using the module. I dread to think of the load this may cause if this
module were to become widely used.

Could you add in a filter on the created_at / updated_at parameters? This
would reduce the number of API calls necessary.

Cheers,
Stella

Hi Harry,

Well that’s frustrating. It’s better than nothing, but the timeslip, bills
and expenses APIs need this sorting feature too in order to really cut down
on the number of requests. I’d still prefer a filter on created_at /
updated_at properties for true flexibility.

Cheers,
StellaOn Monday, July 21, 2014 3:48:34 PM UTC+1, Harry wrote:

Hi Stella,

We’ve recently added support for sorting by created_at and updated_at to
Contacts and Invoices. The details are documented fully on the API
documentation site (
https://dev.freeagent.com/docs/contacts#list-all-contacts for example)
but as a summary you just make your normal GET request for the list of the
tasks with an extra sort parameter set to the field you want to sort by. If
you want to sort descending prefix the field name with a hyphen, for
example:

GET https://api.freeagent.com/v2/contacts?sort=-updated_at

This makes it possible to order the contacts or invoices with the most
recently updated first and then iterate through until you reach one with an
updated_at that is before the last time you synced.

​We may add this to other endpoints in future but ​haven’t scheduled this
at the current time.


Regards,
Harry Mills

On Sun, Jul 20, 2014 at 12:00 AM, <ste...@annertech.com <javascript:>> wrote:

I’m working on a FreeAgent API integration module for the Drupal CMS (
http://drupal.org/project/freeagent). Its primary aim is to download
the data via the API and store it locally for report generation. It’s
designed to pull data from FreeAgent on a daily basis using cron.

One of the really annoying things about the current API is the inability
to fetch just the new or updated timeslips, contacts, etc since the last
time cron ran. As it stands, I have to make multiple calls to the API to
fetch all the contacts, etc (allowing for multiple pagination requests) to
ensure the local records are kept up to date. This results in tens to
hundreds of unnecessary API calls on your service - and that’s just for one
Drupal site using the module. I dread to think of the load this may cause
if this module were to become widely used.

Could you add in a filter on the created_at / updated_at parameters?
This would reduce the number of API calls necessary.

Cheers,
Stella


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_ap...@googlegroups.com <javascript:>.
To post to this group, send email to freeag...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Hi Stella,

We’ve recently added support for sorting by created_at and updated_at to
Contacts and Invoices. The details are documented fully on the API
documentation site (
https://dev.freeagent.com/docs/contacts#list-all-contacts for example) but
as a summary you just make your normal GET request for the list of the
tasks with an extra sort parameter set to the field you want to sort by. If
you want to sort descending prefix the field name with a hyphen, for
example:

GET https://api.freeagent.com/v2/contacts?sort=-updated_at

This makes it possible to order the contacts or invoices with the most
recently updated first and then iterate through until you reach one with an
updated_at that is before the last time you synced.

​We may add this to other endpoints in future but ​haven’t scheduled this
at the current time.

Regards,
Harry MillsOn Sun, Jul 20, 2014 at 12:00 AM, stella@annertech.com wrote:

I’m working on a FreeAgent API integration module for the Drupal CMS (
http://drupal.org/project/freeagent). Its primary aim is to download the
data via the API and store it locally for report generation. It’s designed
to pull data from FreeAgent on a daily basis using cron.

One of the really annoying things about the current API is the inability
to fetch just the new or updated timeslips, contacts, etc since the last
time cron ran. As it stands, I have to make multiple calls to the API to
fetch all the contacts, etc (allowing for multiple pagination requests) to
ensure the local records are kept up to date. This results in tens to
hundreds of unnecessary API calls on your service - and that’s just for one
Drupal site using the module. I dread to think of the load this may cause
if this module were to become widely used.

Could you add in a filter on the created_at / updated_at parameters? This
would reduce the number of API calls necessary.

Cheers,
Stella


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.