Productive icon

Productive

Interact with the Productive API

Actions508

Expenses → Get expenses

AI-generated

Summary

Retrieve a list of expenses from the Productive API, optionally applying filters, pagination, and sorting to control the results.

Inputs

  • Return All — Whether to return all expense records (true) or limit the number of results and paginate (false). Defaults to false.
  • Limit — The maximum number of expense records to return when not returning all. Minimum 1. Defaults to 50.
  • Page Number — Page number to retrieve when pagination is used, 1-based. Defaults to 1.
  • Page Size — Number of expense records to retrieve per page when pagination is used. Minimum 1, maximum 200. Defaults to 30.
  • Filter Query String — A raw filter query string to override all other filters. If provided, it is sent as-is to the API to filter expenses.
  • Filters — A collection of filter criteria on specific expense fields, such as Amount, Approval Status, Date, Vendor ID, etc. Ignored if Filter Query String is set. Supports operations like equals, contains, greater than, and others.
  • Sort By — Field to sort the expense results by, including Amount, Date, Name, Paid On, or related deal/company fields.
  • Sort Order — Sort direction: ascending or descending. Defaults to ascending.

Output shape

a list of expense objects matching the specified filter, pagination, and sorting criteria

If 'Return All' is true, all available expenses are returned without pagination. If false, results respect the provided limit, page number, and page size. When a Filter Query String is provided, all other filters are ignored. Errors will be returned as per node's continueOnFail settings.

Examples

Example 1: Retrieve all expenses without filters

Set 'Return All' to true; ignore paging and filters.

Example 2: Get first 50 expenses sorted by date descending

Set 'Return All' to false, 'Limit' to 50, 'Sort By' to 'Date', and 'Sort Order' to 'Descending'.

Example 3: Filter expenses with Amount greater than 100

Use 'Filters' with 'Filter Field' set to 'Amount', 'Operation' set to 'Greater Than', and 'Value' set to '100'.

Discussion