get_all_expenses
Fetch and aggregate all expenses from Brex with automatic pagination, filtering by date range, amount, status, merchant, and other criteria to retrieve comprehensive expense data.
Instructions
Fetch all expenses across multiple pages with automatic pagination handling. Supports date range filtering, amount filtering, status filtering, and merchant search. Returns aggregated results with summary statistics. Use window_days to batch large date ranges.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_size | No | Number of items per page (default: 50, max: 100) | |
| max_items | No | Maximum total number of items to retrieve across all pages | |
| expense_type | No | Filter expenses by type | |
| status | No | Filter expenses by status | |
| payment_status | No | Filter expenses by payment status | |
| start_date | No | Filter expenses created on or after this date (ISO format: YYYY-MM-DD) | |
| end_date | No | Filter expenses created on or before this date (ISO format: YYYY-MM-DD) | |
| window_days | No | Optional batching window in days to split large date ranges | |
| min_amount | No | Client-side minimum purchased_amount.amount filter (in cents) | |
| max_amount | No | Client-side maximum purchased_amount.amount filter (in cents) | |
| expand | No | Fields to expand (e.g., merchant, receipts) |