Esc

↑↓ move↵ openIndex · Pagefind
REST reference · Accounting · Reporting and close

Trial Balance

Review account balances and drill into the entries behind them. Every operation below is generated from the published OpenAPI contract. Paths are company-scoped; read the Accounting API guide for scopes, step-up and permissions, and the Trial Balance guide for the workflow.

1 operationsCompany moduleAll Accounting apps →
  1. GET /rest/v1.0/companies/{company_id}/accounting/trial_balanceTrial balance

Accounting / Trial Balance

GET /rest/v1.0/companies/{company_id}/accounting/trial_balance

Trial balance

Debit and credit totals and the net balance per account from posted lines up to as_of (default today), optionally from from. Split by a dimension with group_by (entity, project, department, cost_code), or restrict to one entity, project or department. Net debit and net credit totals are always equal. Requires the accounting:read scope.

v1.0Implemented

Parameters

  • company_id
    integerpathrequired
    Company id; must be the token's company
  • as_of
    string (date)query
    Inclusive end date (default today)
  • from
    string (date)query
    Inclusive start date (activity only)
  • entity_id
    integerquery
    One entity
  • project_id
    integerquery
    One project
  • department_id
    integerquery
    One department
  • group_by
    stringquery
    Split rows by a dimension. `dimension:<code>` groups by a user-defined dimension: dimension_id on each row is then the value id (null = lines with no value), rolled up by dimension_level; the rows of each account sum to its ungrouped balance.
  • dimension_level
    integerquery
    With group_by=dimension:<code>: roll values up to this hierarchy level (1 = top-level values); omitted = the posted value.
  • dimension_value_ids
    stringquery
    Comma-separated dimension value ids: lines carrying one of them or a child value (values of one dimension OR, dimensions AND).
  • include_zero
    anyquery
    Also list postable accounts with no activity One of: true, false.

Response · 200 · object

  • as_of
    string (date)required
  • from
    string | null (date)required
  • entity_id
    integer | nullrequired
  • group_by
    anyrequired
    One of: entity, project, department, cost_code, null.
  • rows
    object[]required
  • rows[].account_id
    integerrequired
  • rows[].account_number
    stringrequired
  • rows[].account_name
    stringrequired
  • rows[].account_type
    anyrequired
    One of: bank, cash, accounts_receivable, retainage_receivable, contract_asset, other_current_asset, inventory, fixed_asset, accumulated_depreciation, other_asset, accounts_payable, retainage_payable, contract_liability, credit_card, payroll_liability, sales_tax_payable, other_current_liability, long_term_liability, equity, retained_earnings, income, other_income, cost_of_revenue, expense, other_expense.
  • rows[].normal_balance
    anyrequired
    One of: debit, credit.
  • rows[].dimension_id
    integer | nullrequired
  • rows[].debit
    stringrequired
    Decimal amount as a string, 2 dp
  • rows[].credit
    stringrequired
    Decimal amount as a string, 2 dp
  • rows[].net_debit
    stringrequired
    Decimal amount as a string, 2 dp
  • rows[].net_credit
    stringrequired
    Decimal amount as a string, 2 dp
  • totals
    objectrequired
  • totals.debit
    stringrequired
    Decimal amount as a string, 2 dp
  • totals.credit
    stringrequired
    Decimal amount as a string, 2 dp
  • totals.net_debit
    stringrequired
    Decimal amount as a string, 2 dp
  • totals.net_credit
    stringrequired
    Decimal amount as a string, 2 dp

Errors

  • 401Missing or invalid bearer token
  • 403No accounting access, missing permission, wrong company, or read-only workspace
  • 404Not found in this company
  • 422Validation failed (field errors) or the ledger refused the change (message list)
  • 429Company heavy-read budget spent (ACCT_HEAVY_BUDGET units per minute); retry after the Retry-After seconds

Example request

Generated from the contractcurl
curl -X GET "https://app.os.construction/rest/v1.0/companies/1/accounting/trial_balance" \
  -H "Authorization: Bearer $OS_ACCESS_TOKEN"

Ask the OS

Reading this page

Ask anything about this page. Answers use what you're reading as context.

Suggested

    AI · may be imperfect · sample data where shown

    Open file