AccountingRecords
Defined in: src/accounting/client.gen.ts:87
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AccountingRecords(
_core):AccountingRecords
Defined in: src/accounting/client.gen.ts:88
Parameters
Section titled “Parameters”Returns
Section titled “Returns”AccountingRecords
Methods
Section titled “Methods”get(
recordId,query?,options?):Promise<{amount: {amount:number;currency:string; };due_at?:string|null;erp_posting_date:string;id:string;invoice_number?:string|null;line_items:object[];memo?:string|null;original_amount?: {amount:number;currency:string; } |null;posted_at:string;receipts?:object[] |null;review_status:"PREPARE"|"REVIEW"|"READY_FOR_EXPORT"|"EXPORTED";source_id?:string|null;source_type:"CARD"|"REIMBURSEMENT"|"BILL";type:"CARD_EXPENSE_POST"|"CARD_EXPENSE_REPAYMENT"|"REIMBURSEMENT_EXPENSE_REPAYMENT"|"REIMBURSEMENT_EXPENSE_APPROVAL"|"REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYOUT"|"REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYIN"|"REIMBURSEMENT_EXPENSE_POST"|"CARD_PAYMENT"|"REWARD_REDEMPTION"|"REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_REFUND"|"CARD_EXPENSE_REFUND"|"CARD_PAYMENT_REFUND"|"REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYOUT_REVERSAL"|"INVOICE"|"INVOICE_PAYMENT"|"BILL_EXPENSE"|"BILL_EXPENSE_PAYMENT"|"BILL_EXPENSE_CARD_PAYMENT"|"BILL_MONEY_MOVEMENT_PAYIN";updated_at:string;user?: {department_id?:string;department_name?:string;string;first_name:string;id:string;last_name:string;location_id?:string;location_name?:string;manager_first_name?:string;manager_id?:string;manager_last_name?:string;manager_title_id?:string;manager_title_name?:string;role:"ACCOUNT_ADMIN"|"AP_CLERK"|"BOOKKEEPER"|"CARD_ADMIN"|"EMPLOYEE"|"EMPLOYEE_WITHOUT_CORP_CARDS"|"EXPENSE_ADMIN"|"SUPER_ADMIN"|"USER_MANAGEMENT_ADMIN";status:"ACTIVE"|"DISABLED"|"ARCHIVED"|"DELETED"|"INACTIVE"|"INVITED"|"PENDING_ACTIVATION";title_id?:string;title_name?:string; } |null;vendor?: {contact_name?:string|null;email?:string|null;id:string;name:string;phone?:string|null;website?:string|null; } |null;version:number; }>
Defined in: src/accounting/client.gen.ts:97
Get accounting record by ID
Retrieve a single accounting record by its unique identifier
GET /v3/accounting/records/{record_id} — requires OAuth scope: accounting.record.read, accounting.record.write
Parameters
Section titled “Parameters”recordId
Section titled “recordId”string
query?
Section titled “query?”single_entry?
Section titled “single_entry?”boolean
Description
Toggles the response format between single-entry and double-entry bookkeeping. Set to true to filter out offsetting ledger entries and return only the core cash-flow or economic-impact line items. Defaults to false.
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ amount: { amount: number; currency: string; }; due_at?: string | null; erp_posting_date: string; id: string; invoice_number?: string | null; line_items: object[]; memo?: string | null; original_amount?: { amount: number; currency: string; } | null; posted_at: string; receipts?: object[] | null; review_status: "PREPARE" | "REVIEW" | "READY_FOR_EXPORT" | "EXPORTED"; source_id?: string | null; source_type: "CARD" | "REIMBURSEMENT" | "BILL"; type: "CARD_EXPENSE_POST" | "CARD_EXPENSE_REPAYMENT" | "REIMBURSEMENT_EXPENSE_REPAYMENT" | "REIMBURSEMENT_EXPENSE_APPROVAL" | "REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYOUT" | "REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYIN" | "REIMBURSEMENT_EXPENSE_POST" | "CARD_PAYMENT" | "REWARD_REDEMPTION" | "REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_REFUND" | "CARD_EXPENSE_REFUND" | "CARD_PAYMENT_REFUND" | "REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYOUT_REVERSAL" | "INVOICE" | "INVOICE_PAYMENT" | "BILL_EXPENSE" | "BILL_EXPENSE_PAYMENT" | "BILL_EXPENSE_CARD_PAYMENT" | "BILL_MONEY_MOVEMENT_PAYIN"; updated_at: string; user?: { department_id?: string; department_name?: string; email: string; first_name: string; id: string; last_name: string; location_id?: string; location_name?: string; manager_first_name?: string; manager_id?: string; manager_last_name?: string; manager_title_id?: string; manager_title_name?: string; role: "ACCOUNT_ADMIN" | "AP_CLERK" | "BOOKKEEPER" | "CARD_ADMIN" | "EMPLOYEE" | "EMPLOYEE_WITHOUT_CORP_CARDS" | "EXPENSE_ADMIN" | "SUPER_ADMIN" | "USER_MANAGEMENT_ADMIN"; status: "ACTIVE" | "DISABLED" | "ARCHIVED" | "DELETED" | "INACTIVE" | "INVITED" | "PENDING_ACTIVATION"; title_id?: string; title_name?: string; } | null; vendor?: { contact_name?: string | null; email?: string | null; id: string; name: string; phone?: string | null; website?: string | null; } | null; version: number; }>
query()
Section titled “query()”query(
query?,options?):PagePromise<{has_next_page:boolean;items:object[];next_cursor?:string|null;total_count?:number|null; }>
Defined in: src/accounting/client.gen.ts:126
Query accounting records
Query 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_statusis only supported with CARD and REIMBURSEMENT source types
GET /v3/accounting/records — requires OAuth scope: accounting.record.read, accounting.record.write
Await for a single page, or for await to iterate items across all pages.
Parameters
Section titled “Parameters”query?
Section titled “query?”cursor?
Section titled “cursor?”string
Description
Cursor for pagination
string[]
Description
Filter by accounting record IDs. ID size is limited to 500. Example: ids=accr_xxx&ids=accr_yyy
limit?
Section titled “limit?”number
Description
Maximum number of records to return. Defaults to 100. The maximum is 500; requests with a higher value are rejected with a 400 error.
review_status?
Section titled “review_status?”"PREPARE" | "REVIEW" | "READY_FOR_EXPORT" | "EXPORTED"
Description
Filter by review status. Tracks a record’s stage in the accounting review lifecycle, which progresses in this order: PREPARE (the record is being prepared and is not yet ready for review) → REVIEW (the record is ready to be reviewed) → READY_FOR_EXPORT (the record has been reviewed and is queued for export to your ERP) → EXPORTED (the record has been exported).
single_entry?
Section titled “single_entry?”boolean
Description
Toggles the response format between single-entry and double-entry bookkeeping. Set to true to filter out offsetting ledger entries and return only the core cash-flow or economic-impact line items. Defaults to false.
source_type?
Section titled “source_type?”"CARD" | "REIMBURSEMENT" | "BILL"
Description
Filter by accounting record source type. This is a high-level filter that maps to specific accounting record types. Example: source_type=BILL
updated_at?
Section titled “updated_at?”{ gt?: string; gte?: string; lt?: string; lte?: string; }
Description
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
updated_at.gt?
Section titled “updated_at.gt?”string
Format: date-time
Description
Minimum value to filter by (exclusive) - ISO 8601 format
Example
2025-01-01T00:00:00Zupdated_at.gte?
Section titled “updated_at.gte?”string
Format: date-time
Description
Minimum value to filter by (inclusive) - ISO 8601 format
Example
2025-01-01T00:00:00Zupdated_at.lt?
Section titled “updated_at.lt?”string
Format: date-time
Description
Maximum value to filter by (exclusive) - ISO 8601 format
Example
2025-01-01T00:00:00Zupdated_at.lte?
Section titled “updated_at.lte?”string
Format: date-time
Description
Maximum value to filter by (inclusive) - ISO 8601 format
Example
2025-01-01T23:59:59.999Zoptions?
Section titled “options?”Returns
Section titled “Returns”PagePromise<{ has_next_page: boolean; items: object[]; next_cursor?: string | null; total_count?: number | null; }>
reportAccountingExportResults()
Section titled “reportAccountingExportResults()”reportAccountingExportResults(
body,options?):Promise<{updated_accounting_record_ids:string[]; }>
Defined in: src/accounting/client.gen.ts:144
Report accounting export results
Report export success or failure for accounting records.
POST /v3/accounting/records/export-results — requires OAuth scope: accounting.record.write
Parameters
Section titled “Parameters”results
Section titled “results”({ accounting_record_id: string; failure: { error_message: string; }; } | { accounting_record_id: string; success: { deep_link_url?: string; reference_id?: string | null; }; })[]
Description
Array of export results (must contain at least one result)
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ updated_accounting_record_ids: string[]; }>