Skip to content

Brex: List expenses

Brex expenses.expensesListExpenses: arguments, response, policy and SDK examples.

← Expenses operations · Get started

Operation brex.expenses_listexpenses

Provider route: GET /v1/expenses. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/brex with npm, or alter-sdk-brex with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { BrexIntegration } from "@alter-ai/brex";
async function execute(input: Parameters<BrexIntegration["expenses"]["expensesListExpenses"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new BrexIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.expenses.expensesListExpenses(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_brex import BrexIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = BrexIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.expenses.expenses_list_expenses(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.expand[]JSONOptional
query.expand[] (anyOf 1)arrayAlternative
query.expand[] (anyOf 1)[]stringEach item
query.expand[] (anyOf 2)nullAlternative
query.user_id[]JSONOptional
query.user_id[] (anyOf 1)arrayAlternative
query.user_id[] (anyOf 1)[]stringEach item
query.user_id[] (anyOf 2)nullAlternative
query.parent_expense_id[]JSONOptional
query.parent_expense_id[] (anyOf 1)arrayAlternative
query.parent_expense_id[] (anyOf 1)[]stringEach item
query.parent_expense_id[] (anyOf 2)nullAlternative
query.budget_id[]JSONOptional
query.budget_id[] (anyOf 1)arrayAlternative
query.budget_id[] (anyOf 1)[]stringEach item
query.budget_id[] (anyOf 2)nullAlternative
query.spending_entity_id[]JSONOptional
query.spending_entity_id[] (anyOf 1)arrayAlternative
query.spending_entity_id[] (anyOf 1)[]stringEach item
query.spending_entity_id[] (anyOf 2)nullAlternative
query.expense_type[]JSONOptional
query.expense_type[] (anyOf 1)arrayAlternative
query.expense_type[] (anyOf 1)[]stringEach itemOne of: CARD, BILLPAY, REIMBURSEMENT, CLAWBACK, UNSET
query.expense_type[] (anyOf 2)nullAlternative
query.status[]JSONOptional
query.status[] (anyOf 1)arrayAlternative
query.status[] (anyOf 1)[]stringEach itemOne of: DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED
query.status[] (anyOf 2)nullAlternative
query.payment_status[]JSONOptional
query.payment_status[] (anyOf 1)arrayAlternative
query.payment_status[] (anyOf 1)[]stringEach itemThe payment status of the expense. HELD means a bill payment is on hold until the vendor’s new payment method is approved. New values may be added to this enum, so handle unknown values.
One of: NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED, HELD
query.payment_status[] (anyOf 2)nullAlternative
query.compliance_status[]JSONOptional
query.compliance_status[] (anyOf 1)arrayAlternative
query.compliance_status[] (anyOf 1)[]stringEach itemOne of: DUE, OVERDUE, COMPLETED
query.compliance_status[] (anyOf 2)nullAlternative
query.derived_compliance_status[]JSONOptional
query.derived_compliance_status[] (anyOf 1)arrayAlternative
query.derived_compliance_status[] (anyOf 1)[]stringEach itemOne of: COMPLETED, DOCUMENTATION_DUE, REVIEW_DUE
query.derived_compliance_status[] (anyOf 2)nullAlternative
query.purchased_at_startJSONOptional
query.purchased_at_start (anyOf 1)stringAlternativeFormat: date-time
query.purchased_at_start (anyOf 2)nullAlternative
query.purchased_at_endJSONOptional
query.purchased_at_end (anyOf 1)stringAlternativeFormat: date-time
query.purchased_at_end (anyOf 2)nullAlternative
query.updated_at_startJSONOptional
query.updated_at_start (anyOf 1)stringAlternativeFormat: date-time
query.updated_at_start (anyOf 2)nullAlternative
query.updated_at_endJSONOptional
query.updated_at_end (anyOf 1)stringAlternativeFormat: date-time
query.updated_at_end (anyOf 2)nullAlternative
query.payment_posted_at_startJSONOptional
query.payment_posted_at_start (anyOf 1)stringAlternativeFormat: date-time
query.payment_posted_at_start (anyOf 2)nullAlternative
query.payment_posted_at_endJSONOptional
query.payment_posted_at_end (anyOf 1)stringAlternativeFormat: date-time
query.payment_posted_at_end (anyOf 2)nullAlternative
query.load_custom_fieldsJSONOptional
query.load_custom_fields (anyOf 1)booleanAlternative
query.load_custom_fields (anyOf 2)nullAlternative
query.load_expense_addendaJSONOptional
query.load_expense_addenda (anyOf 1)booleanAlternative
query.load_expense_addenda (anyOf 2)nullAlternative
query.cursorJSONOptional
query.cursor (anyOf 1)stringAlternative
query.cursor (anyOf 2)nullAlternative
query.limitJSONOptional
query.limit (anyOf 1)integerAlternativeFormat: int32
query.limit (anyOf 2)nullAlternative

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand List expenses — response body

Referenced models: List expenses — response body

49 more schemas are linked from the tables above, on the schema pages.

List expenses — response body
FieldTypePresenceDescription and constraints
$objectRoot
itemsarrayRequired within parent
items[]ModelEach itemExpand Get an expense — response body
next_cursorJSONOptional
next_cursor (anyOf 1)stringAlternative
next_cursor (anyOf 2)nullAlternative

Referenced models: Get an expense — response body

Get transfer — response body — amount
FieldTypePresenceDescription and constraints
$objectRoot
Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination
of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeThe amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.
Format: int64
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencyJSONOptional
currency (anyOf 1)stringAlternativeThe type of currency, in ISO 4217 format.
Default: USD
currency (anyOf 2)nullAlternative
Get an expense — response body — budget id, name id, name
FieldTypePresenceDescription and constraints
$objectRoot
idstringRequired within parent
Unique ID for the Budget.
namestringRequired within parent
Name for the Budget.
Get an expense — response body — category The category of expenses The category of expenses
FieldTypePresenceDescription and constraints
$stringRootThe category of expenses.
Known values: ADVERTISING_AND_MARKETING, GROCERY, TELEPHONY, OFFICE_SUPPLIES, PRIVATE_AIR_TRAVEL, CLOTHING, CAR_RENTAL, VEHICLE_EXPENSES, RESTAURANTS, GAMBLING, FLOWERS, ELECTRONICS, LEGAL_SERVICES, UTILITIES, FURNITURE, BARS_AND_NIGHTLIFE, LAUNDRY, EVENT_EXPENSES, SHIPPING, OTHER_TRAVEL_EXPENSES, CHARITY, SOFTWARE_NON_RECURRING, LODGING, FACILITIES_EXPENSES, SERVERS, CONFERENCES, FOOD_DELIVERY, RENT, AIRLINE_EXPENSES, OTHER_BUSINESS_EXPENSES, BANK_AND_FINANCIAL_FEES, BOOKS_AND_NEWSPAPERS, CONSULTANT_AND_CONTRACTOR, CORPORATE_INSURANCE, DIGITAL_GOODS, FEES_AND_LICENSES_AND_TAXES, GAS_AND_FUEL, GENERAL_MERCHANDISE, MEDICAL, MEMBERSHIPS_AND_CLUBS, PARKING_EXPENSES, POLITICAL_DONATIONS, PUBLIC_TRANSPORTATION, RECURRING_SOFTWARE_AND_SAAS, RIDESHARE_AND_TAXI, TOLL_AND_BRIDGE_FEES, TRAINING_AND_EDUCATION, TRAVEL_WIFI
Get an expense — response body — cost center The cost center associated with the expense The cost center associated with the expense
FieldTypePresenceDescription and constraints
$objectRootThe cost center associated with the expense.
idstringRequired within parentThe unique identifier for the cost center.
namestringRequired within parentThe name of the cost center.
Get user — response body — custom fields array item
FieldTypePresenceDescription and constraints
$objectRoot
display_nameJSONOptional
display_name (anyOf 1)stringAlternativeThe display name of the custom field.
display_name (anyOf 2)nullAlternative
keystringRequired within parentThe key of the custom field.
valueJSONRequired within parent
value (allOf 1)ModelAll variants applyExpand Get user — response body — custom fields array item value Base class for custom field values
value (allOf 2)JSONAll variants applyThe value of the custom field.
value (allOf 2) (anyOf 1)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field String value
value (allOf 2) (anyOf 2)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Decimal value
value (allOf 2) (anyOf 3)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Boolean value
value (allOf 2) (anyOf 4)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Enum value
value (allOf 2) (anyOf 5)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Timestamp value
value (allOf 2) (anyOf 6)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Date value
value (allOf 2) (anyOf 7)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Money value
value (allOf 2) (anyOf 8)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Option string value
value (allOf 2) (anyOf 9)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field String list value
value (allOf 2) (anyOf 10)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Decimal list value
value (allOf 2) (anyOf 11)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Boolean list value
value (allOf 2) (anyOf 12)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Enum list value
value (allOf 2) (anyOf 13)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Timestamp list value
value (allOf 2) (anyOf 14)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Date list value
value (allOf 2) (anyOf 15)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Money list value
value (allOf 2) (anyOf 16)ModelAlternativeExpand Get user — response body — custom fields array item value The value of the custom field Option string list value

Referenced models: Get user — response body — custom fields array item value The value of the custom field Boolean list value, Get user — response body — custom fields array item value The value of the custom field Boolean value, Get user — response body — custom fields array item value Base class for custom field values, Get user — response body — custom fields array item value The value of the custom field Date list value, Get user — response body — custom fields array item value The value of the custom field Date value, Get user — response body — custom fields array item value The value of the custom field Decimal list value, Get user — response body — custom fields array item value The value of the custom field Decimal value, Get user — response body — custom fields array item value The value of the custom field Enum list value, Get user — response body — custom fields array item value The value of the custom field Enum value, Get user — response body — custom fields array item value The value of the custom field Money list value, Get user — response body — custom fields array item value The value of the custom field Money value, Get user — response body — custom fields array item value The value of the custom field Option string list value, Get user — response body — custom fields array item value The value of the custom field Option string value, Get user — response body — custom fields array item value The value of the custom field String list value, Get user — response body — custom fields array item value The value of the custom field String value, Get user — response body — custom fields array item value The value of the custom field Timestamp list value, Get user — response body — custom fields array item value The value of the custom field Timestamp value

Get an expense — response body — location The location associated with the expense The location associated with the expense
FieldTypePresenceDescription and constraints
$objectRootThe location associated with the expense.
idstringRequired within parentThe unique identifier for the location.
namestringRequired within parentThe name of the location.

SDK function policy ID: brex.expenses_listexpenses. Catalog operation: expenses:listExpenses. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["expenses.card", "expenses.card.readonly"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.