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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.record_id | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.single_entry | boolean | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get accounting record by ID — response body |
Referenced models: Get accounting record by ID — response body
Schemas
Section titled “Schemas”20 more schemas are linked from the tables above, on the schema pages.
Get accounting record by ID — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | Amount of the accounting record |
amount (allOf 1) | Model | All variants apply | Expand Get accounting record by ID — response body — amount amount, currency |
billing_amount | JSON | Optional | |
billing_amount (anyOf 1) | object | Alternative | Billing/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) | Model | All variants apply | Expand Get accounting record by ID — response body — amount amount, currency |
billing_amount (anyOf 2) | null | Alternative | |
due_at | JSON | Optional | |
due_at (anyOf 1) | string | Alternative | Source due at in UTC timezone. For bills only Format: date-time |
due_at (anyOf 2) | null | Alternative | |
erp_posting_date | string | Required within parent | ERP impact date in UTC timezone Format: date-time |
id | string | Required within parent | Unique identifier for the accounting record |
invoice_number | JSON | Optional | |
invoice_number (anyOf 1) | string | Alternative | Invoice number. For bills only |
invoice_number (anyOf 2) | null | Alternative | |
line_items | array | Required within parent | Line items for double-entry bookkeeping |
line_items[] | Model | Each item | Expand Get accounting record by ID — response body — line items item |
memo | JSON | Optional | |
memo (anyOf 1) | string | Alternative | Memo/description |
memo (anyOf 2) | null | Alternative | |
original_amount | JSON | Optional | |
original_amount (anyOf 1) | object | Alternative | Original amount if different from current |
original_amount (anyOf 1) (allOf 1) | Model | All variants apply | Expand Get accounting record by ID — response body — amount amount, currency |
original_amount (anyOf 2) | null | Alternative | |
posted_at | string | Required within parent | Source posted date in UTC timezone Format: date-time |
receipts | JSON | Optional | |
receipts (anyOf 1) | array | Alternative | Associated receipts |
receipts (anyOf 1)[] | Model | Each item | Expand Get accounting record by ID — response body — receipts Associated receipts item |
receipts (anyOf 2) | null | Alternative | |
review_status | string | Required within parent | Review status Known values: READY_FOR_EXPORT, PREPARE, REVIEW, EXPORTED |
source_id | JSON | Optional | |
source_id (anyOf 1) | string | Alternative | Source transaction ID |
source_id (anyOf 2) | null | Alternative | |
source_type | string | Required within parent | Source type Known values: CARD, REIMBURSEMENT, BILL |
status | JSON | Optional | |
status (anyOf 1) | string | Alternative | The 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) | null | Alternative | |
type | string | Required within parent | 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 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_at | string | Required within parent | Last update timestamp in UTC timezone Format: date-time |
user | JSON | Optional | |
user (anyOf 1) | object | Alternative | User associated with the record |
user (anyOf 1) (allOf 1) | Model | All variants apply | Expand 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) | null | Alternative | |
vendor | JSON | Optional | |
vendor (anyOf 1) | object | Alternative | Vendor information |
vendor (anyOf 1) (allOf 1) | Model | All variants apply | Expand 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) | null | Alternative | |
version | JSON | Required within parent | |
version (anyOf 1) | number | Alternative | Version number |
version (anyOf 2) | string | Alternative | Pattern: ^-?[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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
download_uris | JSON | Optional | |
download_uris (anyOf 1) | array | Alternative | Signed URLs to download receipt files (expire in 15 minutes) |
download_uris (anyOf 1)[] | string | Each item | |
download_uris (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier for the receipt |
Get accounting record by ID — response body — amount amount, currency
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | number | Alternative | The amount |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
currency | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amortization_end_date | JSON | Optional | |
amortization_end_date (anyOf 1) | string | Alternative | Amortization period end date, as an ISO 8601 date (YYYY-MM-DD). Null when unset. |
amortization_end_date (anyOf 2) | null | Alternative | |
amortization_start_date | JSON | Optional | |
amortization_start_date (anyOf 1) | string | Alternative | Amortization period start date, as an ISO 8601 date (YYYY-MM-DD). Null when unset. |
amortization_start_date (anyOf 2) | null | Alternative | |
amortization_template | JSON | Optional | |
amortization_template (anyOf 1) | object | Alternative | The 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) | Model | All variants apply | Expand 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) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"]