Skip to content

AccountingComponents

Defined in: src/accounting/types.gen.ts:149

headers: never

Defined in: src/accounting/types.gen.ts:680


parameters: never

Defined in: src/accounting/types.gen.ts:678


pathItems: never

Defined in: src/accounting/types.gen.ts:681


requestBodies: never

Defined in: src/accounting/types.gen.ts:679


responses: never

Defined in: src/accounting/types.gen.ts:677


schemas: object

Defined in: src/accounting/types.gen.ts:150

AccountingErrorDetails: object

optional current_status?: string

Current status of the integration when the error occurred

DISABLED
AccountingErrorDetails.duplicate_accounting_record_ids?
Section titled “AccountingErrorDetails.duplicate_accounting_record_ids?”

optional duplicate_accounting_record_ids?: string[]

Accounting record IDs that triggered the error

[
"accr_abc123",
"accr_def456"
]
AccountingErrorDetails.existing_integration_id?
Section titled “AccountingErrorDetails.existing_integration_id?”

optional existing_integration_id?: string

ID of the existing active integration

int_abc123

optional existing_vendor?: string

Vendor of the existing integration

ERP_A

optional integration_id?: string

Integration ID associated with the error

int_abc123
AccountingErrorDetails.not_found_export_entry_source_ids?
Section titled “AccountingErrorDetails.not_found_export_entry_source_ids?”

optional not_found_export_entry_source_ids?: string[]

Accounting record IDs that could not be found

[
"accr_ghi789"
]
AccountingErrorDetails.not_ready_for_export_accounting_record_ids?
Section titled “AccountingErrorDetails.not_ready_for_export_accounting_record_ids?”

optional not_ready_for_export_accounting_record_ids?: string[]

Accounting record IDs that are not ready for export

[
"accr_ghi789"
]

optional requested_vendor?: string

Vendor that was requested to be created

ERP_B

AccountingErrorResponse: object

optional details?: object & object | null

Additional error context

error_code: "ACTIVE_INTEGRATION_EXISTS" | "FORBIDDEN" | "INTEGRATION_NOT_ACTIVE" | "INTERNAL_ERROR" | "INVALID_REQUEST" | "NOT_FOUND" | "UNAUTHORIZED" | "DUPLICATE_ACCOUNTING_RECORD_IDS" | "ACCOUNTING_RECORD_NOT_READY_FOR_EXPORT" | "VENDOR_ACCOUNT_ID_MISMATCH"

Machine-readable error code

INVALID_REQUEST
@enum {string}

message: string

Human-readable error message

The request is malformed or contains invalid data.

AccountingFieldValue: object

brex_field_id: string

Brex internal field identifier

ef_123

brex_field_value_id: string

Brex internal field value identifier

efo_123

remote_field_id: string | null

Remote system field identifier

1
AccountingFieldValue.remote_field_value_id
Section titled “AccountingFieldValue.remote_field_value_id”

remote_field_value_id: string | null

Remote system field value identifier

123

AccountingRecordDetailed: object

amount: object

Amount of the accounting record

amount: number

The amount

100

currency: string

The currency

USD

optional due_at?: string | null

Format: date-time

Source due at in UTC timezone. For bills only

erp_posting_date: string

Format: date-time

ERP impact date in UTC timezone

id: string

Unique identifier for the accounting record

accr_abc123

optional invoice_number?: string | null

Invoice number. For bills only

line_items: object[]

Line items for double-entry bookkeeping

optional memo?: string | null

Memo/description

optional original_amount?: { amount: number; currency: string; } | null

{ amount: number; currency: string; }

amount: number

The amount

100

currency: string

The currency

USD

null

Original amount if different from current

posted_at: string

Format: date-time

Source posted date in UTC timezone

optional receipts?: object[] | null

Associated receipts

review_status: "PREPARE" | "REVIEW" | "READY_FOR_EXPORT" | "EXPORTED"

Current review status of the record in the accounting review lifecycle: PREPAREREVIEWREADY_FOR_EXPORTEXPORTED.

optional source_id?: string | null

Source transaction ID

source_type: "CARD" | "REIMBURSEMENT" | "BILL"

Source type

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"

Types of accounting records representing different financial transactions:

**Card-related transactions:**
- `CARD_EXPENSE_POST`: Records when a card expense is posted and settled
- `CARD_EXPENSE_REFUND`: Records when a merchant issues a refund for a card transaction
- `CARD_EXPENSE_REPAYMENT`: Records when an employee repays money to the company for a card expense
- `CARD_PAYMENT`: Records payments from customer to Brex for card balances
- `CARD_PAYMENT_REFUND`: Records refunds from Brex to customer for overpayments
- `REWARD_REDEMPTION`: Records when a reward is redeemed
**Bill-related transactions:**
- `BILL_EXPENSE`: Records when a bill expense is created
- `BILL_EXPENSE_PAYMENT`: Records when a bill is paid through ACH/wire transfer
- `BILL_EXPENSE_CARD_PAYMENT`: Records when a bill is paid using a Brex card
**Reimbursement-related transactions:**
- `REIMBURSEMENT_EXPENSE_APPROVAL`: Records approval of reimbursement (accrual basis)
- `REIMBURSEMENT_EXPENSE_POST`: Records when reimbursement is fulfilled (cash basis)
- `REIMBURSEMENT_EXPENSE_REPAYMENT`: Records repayment of a reimbursement expense
- `REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYOUT`: Records payout to employee/third party
- `REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYOUT_REVERSAL`: Records reversal of payout
- `REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_PAYIN`: Records payment from customer to Brex
- `REIMBURSEMENT_EXPENSE_MONEY_MOVEMENT_REFUND`: Records refund to customer's bank

updated_at: string

Format: date-time

Last update timestamp in UTC timezone

optional 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

{ 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; }

optional department_id?: string

The ID of the user’s department

VXNlcjpjdXVzZXJfMTIzNA==

optional department_name?: string

The user’s department name

Engineering

email: string

The user’s email address

john.doe@example.com

first_name: string

The user’s first name

John

id: string

The ID of the user

VXNlcjpjdXVzZXJfMTIzNA==

last_name: string

The user’s last name

Doe

optional location_id?: string

The ID of the user’s location

VXNlcjpjdXVzZXJfMTIzNA==

optional location_name?: string

The user’s location name

San Francisco

optional manager_first_name?: string

The user’s manager first name

Jane

optional manager_id?: string

The ID of the user’s manager

VXNlcjpjdXVzZXJfMTIzNA==

optional manager_last_name?: string

The user’s manager last name

Smith

optional manager_title_id?: string

The user’s manager title ID

VGl0bGU6dGl0bGVfMTIzNA==

optional manager_title_name?: string

The user’s manager title display name

Engineering Manager

role: "ACCOUNT_ADMIN" | "AP_CLERK" | "BOOKKEEPER" | "CARD_ADMIN" | "EMPLOYEE" | "EMPLOYEE_WITHOUT_CORP_CARDS" | "EXPENSE_ADMIN" | "SUPER_ADMIN" | "USER_MANAGEMENT_ADMIN"

The user’s role in the system

CARD_ADMIN
@enum {string}

status: "ACTIVE" | "DISABLED" | "ARCHIVED" | "DELETED" | "INACTIVE" | "INVITED" | "PENDING_ACTIVATION"

The user’s status in the system

ACTIVE
@enum {string}

optional title_id?: string

The user’s title ID

VGl0bGU6dGl0bGVfMTIzNA==

optional title_name?: string

The user’s title display name

Software Engineer

null

User associated with the record

optional vendor?: { contact_name?: string | null; email?: string | null; id: string; name: string; phone?: string | null; website?: string | null; } | null

{ contact_name?: string | null; email?: string | null; id: string; name: string; phone?: string | null; website?: string | null; }

optional contact_name?: string | null

The name of the contact for the vendor

Jane Smith

optional email?: string | null

The email for the vendor

contact@acme.com

id: string

The unique identifier for the vendor

vendor_123

name: string

The name of the vendor

Acme Corp

optional phone?: string | null

The phone number for the vendor

+1-555-123-4567

optional website?: string | null

The website of the vendor

https://acme.com

null

Vendor information

version: number

Version number

AccountingRecordLineItem: object

AccountingRecordLineItem.accounting_field_values
Section titled “AccountingRecordLineItem.accounting_field_values”

accounting_field_values: object[]

Accounting field mappings

amount: object

Amount for this line item. Amount is always positive for AccountingRecordLineItem.

amount: number

The amount

100

currency: string

The currency

USD

id: string

Unique identifier for the line item

arli_abc123

optional memo?: string | null

Memo/description

optional original_amount?: { amount: number; currency: string; } | null

{ amount: number; currency: string; }

amount: number

The amount

100

currency: string

The currency

USD

null

Original amount for this line item. Amount is always positive for AccountingRecordLineItem.

type: "CREDIT" | "DEBIT"

Type of line item

AccountingRecordsResponse: object

has_next_page: boolean

Whether there are more results available

items: object[]

List of accounting records

optional next_cursor?: string | null

Cursor for the next page of results

optional total_count?: number | null

Format: int32

Total count of records matching the query

Amount: object

amount: number

The amount

100

currency: string

The currency

USD

CreateIntegrationRequest: object

vendor: string

The accounting vendor/system. ERP partners must request Brex to create a vendor ID for them to use this field.

ERP_A
CreateIntegrationRequest.vendor_account_id
Section titled “CreateIntegrationRequest.vendor_account_id”

vendor_account_id: string

The vendor account ID to tie this integration to

vendor_account_id

ExportFailureDetails: object

error_message: string

Human-readable explanation of the failure

Invalid GL account

ExportResultsResponse: object

ExportResultsResponse.updated_accounting_record_ids
Section titled “ExportResultsResponse.updated_accounting_record_ids”

updated_accounting_record_ids: string[]

Accounting record ids that were updated by the request

[
"accr_abc123",
"accr_def456"
]

ExportSuccessDetails: object

optional deep_link_url?: string

URL pointing to the record in the external system

https://erp.com/transactions/456789

optional reference_id?: string | null

External system identifier assigned to the exported record

erp_txn_456789

FailedExportResult: object

accounting_record_id: string

ID of the accounting record the export outcome applies to

accr_abc123

failure: object

Details for a failed export

error_message: string

Human-readable explanation of the failure

Invalid GL account

Integration: object

created_at: string

Format: date-time

Timestamp when the integration was created

2025-08-15T10:00:00Z

integration_id: string

Unique identifier for the integration

int_abc123

status: "ACTIVE" | "DISABLED"

Current status of the integration

ACTIVE
@enum {string}

vendor: string

The accounting vendor/system. ERP partners must request Brex to create a vendor ID for them to use this field.

vendor_account_id: string

The vendor account ID this integration is tied to

customer_account_id

Receipt: object

optional download_uris?: string[] | null

Presigned S3 URLs to download receipt files (expire in 15 minutes)

id: string

Unique identifier for the receipt

ReportExportResultsRequest: object

results: ({ accounting_record_id: string; failure: { error_message: string; }; } | { accounting_record_id: string; success: { deep_link_url?: string; reference_id?: string | null; }; })[]

Array of export results (must contain at least one result)

SuccessfulExportResult: object

SuccessfulExportResult.accounting_record_id
Section titled “SuccessfulExportResult.accounting_record_id”

accounting_record_id: string

ID of the accounting record the export outcome applies to

accr_abc123

success: object

Details for a successful export

Section titled “SuccessfulExportResult.success.deep_link_url?”

optional deep_link_url?: string

URL pointing to the record in the external system

https://erp.com/transactions/456789
SuccessfulExportResult.success.reference_id?
Section titled “SuccessfulExportResult.success.reference_id?”

optional reference_id?: string | null

External system identifier assigned to the exported record

erp_txn_456789

UpdatedAtFilter: object

optional gt?: string

Format: date-time

Minimum value to filter by (exclusive) - ISO 8601 format

2025-01-01T00:00:00Z

optional gte?: string

Format: date-time

Minimum value to filter by (inclusive) - ISO 8601 format

2025-01-01T00:00:00Z

optional lt?: string

Format: date-time

Maximum value to filter by (exclusive) - ISO 8601 format

2025-01-01T00:00:00Z

optional lte?: string

Format: date-time

Maximum value to filter by (inclusive) - ISO 8601 format

2025-01-01T23:59:59.999Z

User: object

optional department_id?: string

The ID of the user’s department

VXNlcjpjdXVzZXJfMTIzNA==

optional department_name?: string

The user’s department name

Engineering

email: string

The user’s email address

john.doe@example.com

first_name: string

The user’s first name

John

id: string

The ID of the user

VXNlcjpjdXVzZXJfMTIzNA==

last_name: string

The user’s last name

Doe

optional location_id?: string

The ID of the user’s location

VXNlcjpjdXVzZXJfMTIzNA==

optional location_name?: string

The user’s location name

San Francisco

optional manager_first_name?: string

The user’s manager first name

Jane

optional manager_id?: string

The ID of the user’s manager

VXNlcjpjdXVzZXJfMTIzNA==

optional manager_last_name?: string

The user’s manager last name

Smith

optional manager_title_id?: string

The user’s manager title ID

VGl0bGU6dGl0bGVfMTIzNA==

optional manager_title_name?: string

The user’s manager title display name

Engineering Manager

role: "ACCOUNT_ADMIN" | "AP_CLERK" | "BOOKKEEPER" | "CARD_ADMIN" | "EMPLOYEE" | "EMPLOYEE_WITHOUT_CORP_CARDS" | "EXPENSE_ADMIN" | "SUPER_ADMIN" | "USER_MANAGEMENT_ADMIN"

The user’s role in the system

CARD_ADMIN
@enum {string}

status: "ACTIVE" | "DISABLED" | "ARCHIVED" | "DELETED" | "INACTIVE" | "INVITED" | "PENDING_ACTIVATION"

The user’s status in the system

ACTIVE
@enum {string}

optional title_id?: string

The user’s title ID

VGl0bGU6dGl0bGVfMTIzNA==

optional title_name?: string

The user’s title display name

Software Engineer

Vendor: object

optional contact_name?: string | null

The name of the contact for the vendor

Jane Smith

optional email?: string | null

The email for the vendor

contact@acme.com

id: string

The unique identifier for the vendor

vendor_123

name: string

The name of the vendor

Acme Corp

optional phone?: string | null

The phone number for the vendor

+1-555-123-4567

optional website?: string | null

The website of the vendor

https://acme.com