Query accounting records
Changed onQuery accounting records by IDs or with filters for polling. When building integrations with Brex accounting workflow, use filter-based polling as a fallback mechanism. Suggested cadence is 1 hour.
For card and reimbursement records: Use review_status to filter by accounting workflow stage (e.g., READY_FOR_EXPORT, EXPORTED).
For bill records: Use source_type=BILL with updated_at[gt] to poll for updated bill records.
Filter Constraints:
- review_status is only supported with CARD and REIMBURSEMENT source types
Filtering by ERP Posting Date: Use erp_posting_date[from] and erp_posting_date[to] with ISO 8601 UTC datetimes to retrieve records for a specific accounting period based on their ERP impact date. The range is inclusive. REST clients should convert local accounting period boundaries to UTC before calling this endpoint.
Request
- Base URLhttps://api.brex.com
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://accounts-api.brex.com/oauth2/default/v1/authorizeToken URLhttps://accounts-api.brex.com/oauth2/default/v1/tokenScopesaccounting.record.read, accounting.record.write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Cursor to start from. Omit to fetch the first page.
Filter by erp_posting_date (ERP impact date) inclusive range in UTC. Accepts from and to as ISO 8601 UTC datetimes. Example: erp_posting_date[from]=2025-01-01T00:00:00Z
{
"from": "2025-01-01T00:00:00Z",
"to": "2025-12-31T23:59:59.999Z"
}Filter by accounting record IDs. ID size is limited to 500. Example: ids=accr_xxx&ids=accr_yyy
Items per page
Filter by review status. Supported values: PREPARE, REVIEW, EXPORTED, READY_FOR_EXPORT.
Whether to return single entry line items
Filter by accounting record source type. This is a high-level filter that maps to specific accounting record types. Example: source_type=BILL
Filter by updated_at timestamp range in UTC. Accepts gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal). Example: updated_at[gte]=2025-01-01
{
"gt": "2025-01-01T00:00:00Z",
"gte": "2025-01-01T00:00:00Z",
"lt": "2025-01-01T00:00:00Z",
"lte": "2025-01-01T23:59:59.999Z"
}Response
Query accounting records response
Example response
{
"items": [
{
"amount": {
"amount": 100,
"currency": "USD"
},
"billing_amount": {
"amount": 100,
"currency": "USD"
},
"id": "accr_abc123",
"line_items": [
{
"accounting_field_values": [
{
"brex_field_id": "ef_123",
"brex_field_value_id": "efo_123",
"field_name": "Accounting Entity",
"field_value_name": "Test USA Inc.",
"remote_field_id": "1",
"remote_field_value_id": "123",
"set_by_details": {
"rule_id": "rule_abc123",
"type": "CUSTOM_RULE"
}
}
],
"amortization": {
"amortization_template": {
"display_name": "Annual Prepaid Insurance",
"id": "efo_123",
"remote_id": "12345"
}
},
"amount": {
"amount": 100,
"currency": "USD"
},
"billing_amount": {
"amount": 100,
"currency": "USD"
},
"id": "arli_abc123",
"original_amount": {
"amount": 100,
"currency": "USD"
}
}
],
"original_amount": {
"amount": 100,
"currency": "USD"
},
"user": {
"account_id": "cuacc_1234",
"brex_assistant": {
"disabled_reason": "USER_DISABLED",
"experience": "IAF",
"is_enabled": true
},
"department_id": "cudmnt_1234",
"department_name": "Engineering",
"email": "john.doe@example.com",
"first_name": "John",
"id": "cuuser_1234",
"last_name": "Doe",
"location_id": "culoc_1234",
"location_name": "San Francisco",
"manager_first_name": "Jane",
"manager_id": "cuuser_1234",
"manager_last_name": "Smith",
"manager_title_id": "ti_1234",
"manager_title_name": "Engineering Manager",
"notification_preferences": {
"preferred_channels": [
{
"channel": "WHATSAPP",
"reply_mode": "TWO_WAY"
}
],
"text": "SMS"
},
"phone_number": "+14155551234",
"role": "CARD_ADMIN",
"status": "ACTIVE",
"title_id": "ti_1234",
"title_name": "Software Engineer"
},
"vendor": {
"contact_name": "Jane Smith",
"customer_account_id": "cuaac_123",
"customer_dba_name": "Acme Corporation",
"email": "contact@acme.com",
"id": "LF5tfXg4ZzNFcy1EVXFwe2dKKV4oXj9IPFIjQHFJOzg",
"name": "Acme Corp",
"phone": "+1-555-123-4567",
"rail_account_details": [
{
"bank_account_class": "BUSINESS",
"bank_name": "Chase Bank",
"beneficiary_type": "BUSINESS",
"display_name": "Main Business Checking",
"id": "rad_abc123",
"inserted_at": "2024-01-15T10:30:00Z",
"properties": {
"routingNumber": "121000248",
"accountNumber": "****1234"
},
"rail": {
"type": "US_ACH"
},
"status": "ACTIVE",
"target_country": "US",
"target_currency": {
"code": "USD"
},
"updated_at": "2024-01-15T10:30:00Z"
}
],
"website": "https://acme.com"
}
}
]
}Changes
- breaking
for the
queryrequest parameterlimit, default value was changed from100to10 - breaking
for the
queryrequest parameterlimit, the max was decreased from500.00to100.00 - breaking
the response property
//////became nullable for the status - breaking
the response property
///////became optional for the status - breaking
the
response's property type changed from no type toobjectfor status - breaking
the
response's property type changed from no type toobjectfor status - breaking
the
response's property type changed from no type toobjectfor status - breaking
the
response's property type changed from no type toobjectfor status - breaking
the
////response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - warning
for the
queryrequest parameterlimit, the min was set to1.00 - warning
added the new
AMORTIZATION_PROVISIONING_FAILEDenum value to theresponse property for the response status - warning
added the new
AMORTIZATION_PROVISIONING_FAILEDenum value to theresponse property for the response status - warning
added the new
AMORTIZATION_PROVISIONING_FAILEDenum value to theresponse property for the response status - warning
added the new
AMORTIZATION_PROVISIONING_FAILEDenum value to theresponse property for the response status - info
the endpoint scheme security
bearerwas added to the API - info
api tag
Accountingadded - info
api tag
Accounting Recordsremoved - info
added the new optional
queryrequest parametererp_posting_date - info
added the optional property
//to the response with the status - info
added the optional property
//////to the response with the status - info
added the optional property
//////to the response with the status - info
added the optional property
//////to the response with the status - info
added the optional property
//////to the response with the status - info
added the optional property
////to the response with the status - info
added the optional property
////to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
the response property
became required for the status - info
response property
has_next_pagedeprecated - info
response property
total_countdeprecated - info
added the required property
//////to the response with the status - info
added the required property
//////to the response with the status - info
added the required property
///////to the response with the status - info
added the required property
///////to the response with the status - info
added the required property
///////to the response with the status
- breaking