Esc

↑↓ move↵ openIndex · Pagefind
REST reference · Accounting · Books and controls

General Ledger

Trace balances and posted transactions to their source records. 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 General Ledger guide for the workflow.

1 operationsCompany moduleAll Accounting apps →
  1. GET /rest/v1.0/companies/{company_id}/accounting/general_ledgerGeneral ledger detail

Accounting / General Ledger

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

General ledger detail

Posted lines between from (default the start of the fiscal year holding to) and to (default today) in posting order. With account_id the response also carries the opening balance, a running balance per line and the closing balance (debit positive). Filter by entity, project, department or cost code. Requires the accounting:read scope. Deep reads should page by keyset: pass the previous response’s next_cursor as cursor (the running balance travels in the cursor, so no earlier line is re-summed); page is then ignored and the response carries no Link page header. Cursors are at most 512 characters; a longer or malformed one returns 422.

v1.0Implemented

Parameters

  • company_id
    integerpathrequired
    Company id; must be the token's company
  • account_id
    integerquery
    One account (enables running balances)
  • from
    string (date)query
    Inclusive start (default the fiscal year start for `to`)
  • to
    string (date)query
    Inclusive end
  • entity_id
    integerquery
    Entity
  • project_id
    integerquery
    Project
  • department_id
    integerquery
    Department
  • 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). Opening, closing and running balances follow the filter.
  • cost_code_id
    integerquery
    Cost code
  • party_id
    integerquery
    Lines whose vendor or customer is this company vendor. Narrows the lines only: opening, closing and running balance are null.
  • source_type
    stringquery
    Lines of this source type (manual, ap_bill, ar_invoice, payroll_run, intercompany for generated due-to/due-from lines…). Narrows the lines only: opening, closing and running balance are null.
  • page
    integerquery
  • per_page
    integerquery
  • cursor
    stringquery
    Opaque keyset cursor from `next_cursor` of the previous page; when set, `page` is ignored

Response · 200 · object

  • next_cursor
    string | nullrequired
    Cursor for the next page (null on the last page)
  • account_id
    integer | nullrequired
  • from
    string (date)required
  • to
    string (date)required
  • opening_balance
    string | nullrequired
    Decimal amount as a string, 2 dp
  • closing_balance
    string | nullrequired
    Decimal amount as a string, 2 dp
  • total_debit
    stringrequired
    Decimal amount as a string, 2 dp
  • total_credit
    stringrequired
    Decimal amount as a string, 2 dp
  • rows
    object[]required
  • rows[].line_id
    integerrequired
  • rows[].entry_id
    integerrequired
  • rows[].entry_number
    string | nullrequired
  • rows[].entry_status
    anyrequired
    One of: posted, reversed.
  • rows[].posting_date
    string (date)required
  • rows[].journal
    anyrequired
    One of: GJ, AP, AR, PR, CM, JC, FA, CL, IC, WIP.
  • rows[].entry_memo
    string | nullrequired
  • rows[].account_id
    integerrequired
  • rows[].account_number
    stringrequired
  • rows[].account_name
    stringrequired
  • rows[].memo
    string | nullrequired
  • rows[].debit
    stringrequired
    Decimal amount as a string, 2 dp
  • rows[].credit
    stringrequired
    Decimal amount as a string, 2 dp
  • rows[].running_balance
    string | nullrequired
    Decimal amount as a string, 2 dp
  • rows[].entity_id
    integerrequired
  • rows[].project_id
    integer | nullrequired
  • rows[].cost_code_id
    integer | nullrequired
  • rows[].department_id
    integer | nullrequired
  • rows[].vendor_id
    integer | nullrequired
  • rows[].customer_id
    integer | nullrequired
  • rows[].source_type
    stringrequired
  • rows[].source_id
    integer | nullrequired

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)

Example request

Generated from the contractcurl
curl -X GET "https://app.os.construction/rest/v1.0/companies/1/accounting/general_ledger" \
  -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