Accountancy Practice API - Changes to the clients endpoint

Hi everyone,

We have made some changes to the accountancy practice clients endpoint. These changes will allow you to sort and filter the results to get exactly what’s needed.

Removed fields

The following fields will no longer be returned by the clients endpoint:

  • locked_attributes
  • currency
  • mileage_units
  • initially_on_frs
  • short_date_format
  • vat_first_return_period_ends_on
  • supports_auto_sales_tax_on_purchases
  • sales_tax_rates
  • second_sales_tax_rates (for non uk companies)

Sort fields

We have added the ability to sort by the following fields:

  • created_at: sort by the time the client was created (default)
  • updated_at: sort by the time the client was last updated

eg. /v2/clients?sort=created_at

By default both of these sort in ascending order.
To sort in descending order, the sort parameter can be prefixed with a hyphen.

eg. /v2/clients?sort=-created_at

Filters

We have added some filters to allow you to retrieve a subset of clients based on the created_at date, as well as one for retrieving only recently updated clients.

  • from_date: only get clients created on or after the provided date
  • to_date: only get clients created on or before the provided date
  • updated_since: only get clients which have been updated since the provided date

eg. /v2/clients?from_date=2020-01-01&to_date=2021-03-31 or /v2/clients?updated_since=2021-05-22T09:00:00.000Z

If you have any questions or concerns regarding this change, please do let us know.

All the best,
Natasha

1 Like