get_all_expenses
Retrieve paginated expense data from Brex with filters for status, amount, date range, and type to analyze spending patterns and track financial transactions.
Instructions
LIST: Paginated expenses with filters. Returns complete expense objects. Example: {"page_size":5,"max_items":5,"status":["APPROVED"],"window_days":7,"min_amount":100}
Input Schema
Name | Required | Description | Default |
---|---|---|---|
end_date | No | Filter expenses created on or before this date (ISO format) | |
expand | No | Fields to expand (e.g., merchant, receipts) | |
expense_type | No | Filter expenses by type | |
max_amount | No | Client-side maximum purchased_amount.amount filter | |
max_items | No | Maximum total number of items to retrieve across all pages | |
min_amount | No | Client-side minimum purchased_amount.amount filter | |
page_size | No | Number of items per page (default: 50, max: 100) | |
payment_status | No | Filter expenses by payment status | |
start_date | No | Filter expenses created on or after this date (ISO format) | |
status | No | Filter expenses by status | |
window_days | No | Optional batching window in days to split large date ranges |
Input Schema (JSON Schema)
{
"properties": {
"end_date": {
"description": "Filter expenses created on or before this date (ISO format)",
"type": "string"
},
"expand": {
"description": "Fields to expand (e.g., merchant, receipts)",
"items": {
"type": "string"
},
"type": "array"
},
"expense_type": {
"description": "Filter expenses by type",
"items": {
"enum": [
"CARD",
"BILLPAY",
"REIMBURSEMENT",
"CLAWBACK",
"UNSET"
],
"type": "string"
},
"type": "array"
},
"max_amount": {
"description": "Client-side maximum purchased_amount.amount filter",
"type": "number"
},
"max_items": {
"description": "Maximum total number of items to retrieve across all pages",
"type": "number"
},
"min_amount": {
"description": "Client-side minimum purchased_amount.amount filter",
"type": "number"
},
"page_size": {
"description": "Number of items per page (default: 50, max: 100)",
"type": "number"
},
"payment_status": {
"description": "Filter expenses by payment status",
"items": {
"enum": [
"NOT_STARTED",
"PROCESSING",
"CANCELED",
"DECLINED",
"CLEARED",
"REFUNDING",
"REFUNDED",
"CASH_ADVANCE",
"CREDITED",
"AWAITING_PAYMENT",
"SCHEDULED"
],
"type": "string"
},
"type": "array"
},
"start_date": {
"description": "Filter expenses created on or after this date (ISO format)",
"type": "string"
},
"status": {
"description": "Filter expenses by status",
"items": {
"enum": [
"DRAFT",
"SUBMITTED",
"APPROVED",
"OUT_OF_POLICY",
"VOID",
"CANCELED",
"SPLIT",
"SETTLED"
],
"type": "string"
},
"type": "array"
},
"window_days": {
"description": "Optional batching window in days to split large date ranges",
"type": "number"
}
},
"type": "object"
}