Accounting

Query accounting records

Changed on

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_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.

get/v3/accounting/records

Request

  • Base URL
    https://api.brex.com
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://accounts-api.brex.com/oauth2/default/v1/authorize
      Token URLhttps://accounts-api.brex.com/oauth2/default/v1/token
      Scopesaccounting.record.read, accounting.record.write
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Query parameters

cursorstring

Cursor to start from. Omit to fetch the first page.

fromstring date-time

Inclusive start of the ERP posting date range - ISO 8601 UTC datetime format

tostring date-time

Inclusive end of the ERP posting date range - ISO 8601 UTC datetime format

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"
}
idsstring[]

Filter by accounting record IDs. ID size is limited to 500. Example: ids=accr_xxx&ids=accr_yyy

limitnumber

Items per page

review_status'PREPARE' | 'REVIEW' | 'EXPORTED' | 'READY_FOR_EXPORT'

Filter by review status. Supported values: PREPARE, REVIEW, EXPORTED, READY_FOR_EXPORT.

single_entryboolean

Whether to return single entry line items

source_type'CARD' | 'REIMBURSEMENT' | 'BILL'

Filter by accounting record source type. This is a high-level filter that maps to specific accounting record types. Example: source_type=BILL

gtstring date-time

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

gtestring date-time

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

ltstring date-time

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

ltestring date-time

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

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

has_next_pageboolean required

Whether there are more results available

next_cursorstring nullable required

The next cursor

total_countnumber nullable

Total count of records matching the query

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 query request parameter limit, default value was changed from 100 to 10

    • breaking

      for the query request parameter limit, the max was decreased from 500.00 to 100.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 to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the //// response's property type changed from no type to object for status

    • breaking

      the // response's property type changed from no type to object for status

    • breaking

      the // response's property type changed from no type to object for status

    • breaking

      the // response's property type changed from no type to object for status

    • warning

      for the query request parameter limit, the min was set to 1.00

    • warning

      added the new AMORTIZATION_PROVISIONING_FAILED enum value to the response property for the response status

    • warning

      added the new AMORTIZATION_PROVISIONING_FAILED enum value to the response property for the response status

    • warning

      added the new AMORTIZATION_PROVISIONING_FAILED enum value to the response property for the response status

    • warning

      added the new AMORTIZATION_PROVISIONING_FAILED enum value to the response property for the response status

    • info

      the endpoint scheme security bearer was added to the API

    • info

      api tag Accounting added

    • info

      api tag Accounting Records removed

    • info

      added the new optional query request parameter erp_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_page deprecated

    • info

      response property total_count deprecated

    • 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