Viridem icon

Viridem

Interact's with Viridem

Actions77

Expenses → List Expense

AI-generated

Overview

This node operation lists expenses for a specified company with various filtering and pagination options. It is useful for retrieving expense records based on criteria such as date range, status, user, and ordering preferences. For example, a user can list all expenses for a company within a specific date range, filter by expense status, and paginate through the results.

Use Case Examples

  1. List all expenses for company ID 123 ordered by date descending.
  2. Retrieve expenses with status 'approved' or 'pending' for a specific user within a date range.
  3. Paginate through expenses 15 items per page for company ID 456.

Properties

Name Meaning
Company Id The ID of the company for which to list expenses. This is a required numeric input.
Order By Date The order in which to sort the expenses by date, e.g., ascending or descending.
Status In Filter expenses by their status, allowing multiple statuses to be specified as a JSON array.
Start Date The start date to filter expenses from (inclusive).
End Date The end date to filter expenses to (inclusive).
User Id Filter expenses by a specific user ID.
Page The page number for paginated results.
Per Page The number of expense items to return per page.

Output

JSON

  • expenses - An array of expense objects matching the filter criteria.
  • pagination
    • page - The current page number of the results.
    • per_page - The number of items returned per page.
    • total_pages - The total number of pages available.
    • total_items - The total number of expense items matching the criteria.

Dependencies

  • An API key credential for authentication with the Viridem API.

Troubleshooting

  • Ensure the Company Id is provided and valid, as it is required for the request.
  • Check that date filters (Start Date and End Date) are in the correct format if used.
  • Verify that the status filter is a valid JSON array if used.
  • If pagination parameters (Page and Per Page) are set, ensure they are positive integers.
  • If the API returns errors related to authentication, verify the API key credential is correctly configured.

Discussion