Skip to content

Brex: Get accounting record by ID

Brex accounting.accountingGetAccountingRecord: arguments, response, policy and SDK examples.

← Accounting operations · Get started

Operation brex.accounting_getaccountingrecord

Provider route: GET /v3/accounting/records/{record_id}. 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["accounting"]["accountingGetAccountingRecord"]>[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.accounting.accountingGetAccountingRecord(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.accounting.accounting_get_accounting_record(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.record_idstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.single_entrybooleanOptional

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Get accounting record by ID — response body

Referenced models: Get accounting record by ID — response body

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

Get accounting record by ID — response body
FieldTypePresenceDescription and constraints
$objectRoot
amountJSONRequired within parentAmount of the accounting record
amount (allOf 1)ModelAll variants applyExpand Get accounting record by ID — response body — amount amount, currency
billing_amountJSONOptional
billing_amount (anyOf 1)objectAlternativeBilling/settlement amount in the account's home currency. For multi-currency transactions (e.g., EUR bill paid from USD account), this represents the actual amount debited. Use billing_amount / original_amount to derive the effective FX rate.
billing_amount (anyOf 1) (allOf 1)ModelAll variants applyExpand Get accounting record by ID — response body — amount amount, currency
billing_amount (anyOf 2)nullAlternative
due_atJSONOptional
due_at (anyOf 1)stringAlternativeSource due at in UTC timezone. For bills only
Format: date-time
due_at (anyOf 2)nullAlternative
erp_posting_datestringRequired within parentERP impact date in UTC timezone
Format: date-time
idstringRequired within parentUnique identifier for the accounting record
invoice_numberJSONOptional
invoice_number (anyOf 1)stringAlternativeInvoice number. For bills only
invoice_number (anyOf 2)nullAlternative
line_itemsarrayRequired within parentLine items for double-entry bookkeeping
line_items[]ModelEach itemExpand Get accounting record by ID — response body — line items item
memoJSONOptional
memo (anyOf 1)stringAlternativeMemo/description
memo (anyOf 2)nullAlternative
original_amountJSONOptional
original_amount (anyOf 1)objectAlternativeOriginal amount if different from current
original_amount (anyOf 1) (allOf 1)ModelAll variants applyExpand Get accounting record by ID — response body — amount amount, currency
original_amount (anyOf 2)nullAlternative
posted_atstringRequired within parentSource posted date in UTC timezone
Format: date-time
receiptsJSONOptional
receipts (anyOf 1)arrayAlternativeAssociated receipts
receipts (anyOf 1)[]ModelEach itemExpand Get accounting record by ID — response body — receipts Associated receipts item
receipts (anyOf 2)nullAlternative
review_statusstringRequired within parentReview status
Known values: READY_FOR_EXPORT, PREPARE, REVIEW, EXPORTED
source_idJSONOptional
source_id (anyOf 1)stringAlternativeSource transaction ID
source_id (anyOf 2)nullAlternative
source_typestringRequired within parentSource type
Known values: CARD, REIMBURSEMENT, BILL
statusJSONOptional
status (anyOf 1)stringAlternativeThe source expense's approval/lifecycle status. For bills this reflects the bill's approval state (e.g. SUBMITTED = pending approval, APPROVED = approved), which is not derivable from review_status (always READY_FOR_EXPORT when polling).
Known values: APPROVED, CANCELED, DRAFT, OUT_OF_POLICY, SETTLED, SPLIT, SUBMITTED, VOID
status (anyOf 2)nullAlternative
typestringRequired within parentTypes 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
Known values: 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_atstringRequired within parentLast update timestamp in UTC timezone
Format: date-time
userJSONOptional
user (anyOf 1)objectAlternativeUser associated with the record
user (anyOf 1) (allOf 1)ModelAll variants applyExpand Get accounting record by ID — response body — user User associated with the record account id, brex assistant, department id, department name, email, first name, id, last name, location id, location name, manager first name, manager id, manager last name, manager title id, manager title name, metadata, notification preferences, phone number, role, status, title id, title name
user (anyOf 2)nullAlternative
vendorJSONOptional
vendor (anyOf 1)objectAlternativeVendor information
vendor (anyOf 1) (allOf 1)ModelAll variants applyExpand Get accounting record by ID — response body — vendor Vendor information contact name, customer account id, customer dba name, email, id, name, payment config, phone, rail account details, website
vendor (anyOf 2)nullAlternative
versionJSONRequired within parent
version (anyOf 1)numberAlternativeVersion number
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get accounting record by ID — response body — receipts Associated receipts item, Get accounting record by ID — response body — line items item, Get accounting record by ID — response body — amount amount, currency, Get accounting record by ID — response body — user User associated with the record account id, brex assistant, department id, department name, email, first name, id, last name, location id, location name, manager first name, manager id, manager last name, manager title id, manager title name, metadata, notification preferences, phone number, role, status, title id, title name, Get accounting record by ID — response body — vendor Vendor information contact name, customer account id, customer dba name, email, id, name, payment config, phone, rail account details, website

Get accounting record by ID — response body — receipts Associated receipts item
FieldTypePresenceDescription and constraints
$objectRoot
download_urisJSONOptional
download_uris (anyOf 1)arrayAlternativeSigned URLs to download receipt files (expire in 15 minutes)
download_uris (anyOf 1)[]stringEach item
download_uris (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the receipt
Get accounting record by ID — response body — amount amount, currency
FieldTypePresenceDescription and constraints
$objectRoot
amountJSONRequired within parent
amount (anyOf 1)numberAlternativeThe amount
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencystringRequired within parentThe currency
Get accounting record by ID — response body — line items item amortization amortization end date, amortization start date, amortization template amortization end date, amortization start date, amortization template
FieldTypePresenceDescription and constraints
$objectRoot
amortization_end_dateJSONOptional
amortization_end_date (anyOf 1)stringAlternativeAmortization period end date, as an ISO 8601 date (YYYY-MM-DD). Null when unset.
amortization_end_date (anyOf 2)nullAlternative
amortization_start_dateJSONOptional
amortization_start_date (anyOf 1)stringAlternativeAmortization period start date, as an ISO 8601 date (YYYY-MM-DD). Null when unset.
amortization_start_date (anyOf 2)nullAlternative
amortization_templateJSONOptional
amortization_template (anyOf 1)objectAlternativeThe selected amortization template (identifier + display name), when set. Null for GL-based ERPs with no template concept, or when unset.
amortization_template (anyOf 1) (allOf 1)ModelAll variants applyExpand Get accounting record by ID — response body — line items item amortization amortization end date, amortization start date, amortization template amortization end date, amortization start date, amortization template amortization template display name, id, remote id display name, id, remote id
amortization_template (anyOf 2)nullAlternative

Referenced models: Get accounting record by ID — response body — line items item amortization amortization end date, amortization start date, amortization template amortization end date, amortization start date, amortization template amortization template display name, id, remote id display name, id, remote id

SDK function policy ID: brex.accounting_getaccountingrecord. Catalog operation: accounting:getAccountingRecord. 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: ["accounting.record.read", "accounting.record.write"]

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.