Harvest advanced filters

Starting from the end of February 2023, in addition to the date filters, Coupler.io allows you to filter Harvest data by almost any property. 

Content 

  1. Advanced filter structure
  2. Filters per data entity
  3. Combine a few filters
  4. Possible issues

Advanced filter structure

  • key (e.g. 'from')
  • value (e.g. '2023-01-01')

The  key means the field name which you want to apply the filter to.

The  value is the value to compare the key against.

Filters per data entity

Clients

Key Value Description
is_active Boolean:  true  or false  Pass  true to only return active clients and false to return inactive clients.

Example:

Client Contacts

Key Value Description
client_id Integer: Ex.:  12345678  
Only return contacts belonging to the client with the given ID.  

Example:

Estimates & Estimates with line items

Key Value Description
client_id Integer. Ex.:  12345678  Only return estimates belonging to the client with the given ID.
from Date. Ex:  2023-01-01  Only return estimates with an  issue_date on or after the given date
to Date. Ex:  2023-01-31  Only return estimates with an  issue_date on or before the given date.
state String:  draft ,sent ,accepted , or declined Only return estimates with a  state matching the value provided. You can only specify one value at a time (e.g. draft only or sent only, etc.)

Example:

Expenses

Key Value Description
user_id Integer. Ex.:  1234567890 
Only return expenses belonging to the user with the given ID.
client_id Integer. Ex.:  12345678  Only return expenses belonging to the client with the given ID.
is_billed Boolean:   true  or false 
Pass  true to only return expenses that have been invoiced and false to return expenses that have not been invoiced.
from Date. Ex:  2023-01-01  Only return expenses with a  spent_date on or after the given date.
to Date. Ex:  2023-01-31 Only return expenses with a  spent_date on or before the given date.

Example:

Expenses Categories

Key Value Description
is_active Boolean:  true  or false  Pass  true to only return active expense categories and false to return inactive expense categories.

Example: 

Invoices & Invoices with line items

Key Value Description
client_id Integer. Ex.:   12345678
Only return invoices belonging to the client with the given ID.
from Date. Ex:   2023-01-01  Only return invoices with an  issue_date on or after the given date.
to Date. Ex:   2023-01-31 Only return invoices with an  issue_date on or before the given date.
state String:   draft ,open ,paid , or closed Only return invoices with a  state matching the value provided. You can only specify one value at a time (e.g. draft only or open only, etc.)

Example: 

Projects

Key Value Description
is_active Boolean:  true  or false  Pass  true to only return active projects and false to return inactive projects.
client_id Integer. Ex.:   12345678 Only return projects belonging to the client with the given ID.

Example: 

Project task assignments

Key Value Description
is_active Boolean:  true  or false  Pass  true to only return active task assignments and false to return inactive task assignments.
Example: 

Project user assignments

Key Value Description
user_id Integer. Ex.:   1234567890 
Only return user assignments belonging to the user with the given ID.
is_active Boolean:  true  or false  Pass  true to only return active user assignments and false to return inactive user assignments.

Example: 

Tasks

Key Value Description
is_active Boolean:   true  or false 
Pass  true to only return active tasks and false to return inactive tasks.

Example: 

Time entries

Key Value Description
user_id Integer. Ex.:   1234567890 
Only return time entries belonging to the user with the given ID.
client_id Integer. Ex.:    12345678
Only return time entries belonging to the client with the given ID.
task_id Integer. Ex.:    12345678 Only return time entries belonging to the task with the given ID.
external_reference_id String Only return time entries with the given  external_reference ID.
is_billed Boolean:    true  or false 
Pass  true to only return time entries that have been invoiced and false to return time entries that have not been invoiced.
is_running Boolean:    true  or false 
Pass  true to only return running time entries and false to return non-running time entries.
from Date. Ex:    2023-01-01  Only return time entries with a  spent_date on or after the given date.
to Date. Ex:    2023-01-31 Only return time entries with a  spent_date on or before the given date.

Example: 

Users

Key Value Description
is_active Boolean:  true  or false  Pass  true to only return active users and false to return inactive users.

Example: 

Combine a few filters

It is possible to add several advanced filters. Their conditions will be applied using the AND logical operator:

This filter setup example returns time entries with a  spent_date from Jan. 1 to Jan. 31, 2022.

It's also possible to combine the advanced settings with the advanced filter if necessary:

This filter setup example above returns the unbilled time entries under the project with the specified ID.

Possible issues

Filter not working properly (Getting all data or no data): Harvest API does not return an error if there are invalid inputs in the advanced filters. It just ignores the inputs and returns all data or no data at all.

If you cannot set up the needed filter or are not sure if Harvest allows filtering by the needed property - write to our support team and we will help you! 
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.