Acreum Docs
General ledger

Accounting

List chart of accounts

GET
/v1/accounting/accounts

Results are always returned in chart-of-accounts tree order (depth-first by report_order then code); there is no sort parameter. Use cursor/limit to page through the tree.

Required scope: accounting:read

Pagination: cursor

Error codes: INVALID_CURSOR, VALIDATION_FAILED

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

search?string
account_type_code?string
is_active?boolean
cursor?string
limit?number

1..100, default 50

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting/accounts'
{  "data": [    {      "account_detail_type_code": "string",      "account_detail_type_name": "string",      "account_type_code": "string",      "account_type_name": "string",      "cash_flow_category": "operating",      "cash_flow_category_derived": "operating",      "code": "string",      "created_at": "2019-08-24T14:15:22Z",      "depth": 0,      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "is_active": true,      "is_ancestor_only": true,      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "name": "string",      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",      "parent_account_id": "7e844708-6009-4228-8705-850fbc3ccfd3",      "system_role": "string"    }  ],  "meta": {    "api_version": "2026-04-23",    "limit": 50,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}

Create account

POST
/v1/accounting/accounts

Required scope: accounting:write

Plannable: yes. An agent can use this operation as a step in a plan.

Error codes: VALIDATION_FAILED, CONFLICT, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
account_detail_type_code*string
account_type_code*string
code*string
Length1 <= length <= 64
is_active?boolean
Defaulttrue
legal_entity_id?|

Optional legal entity scope. When omitted or null, the account is org-wide.

Formatuuid
name*string
Length1 <= length <= 200
parent_account_id?|
Formatuuid

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/accounting/accounts' \  -H 'Content-Type: application/json' \  -d '{  "account_detail_type_code": "string",  "account_type_code": "string",  "code": "string",  "name": "string"}'
{  "data": {    "account_detail_type_code": "string",    "account_type_code": "string",    "cash_flow_category": "operating",    "cash_flow_category_derived": "operating",    "code": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_active": true,    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "name": "string",    "parent_account_id": "7e844708-6009-4228-8705-850fbc3ccfd3",    "system_role": "string"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/accounting/accounts/meta

Required scope: accounting:read

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

account_type_code?string

Response Body

application/json
  1. response
data*
meta*
curl -X GET 'https://api.acreum.io/v1/accounting/accounts/meta'
{  "data": {    "account_detail_types": [      {        "account_type_code": "string",        "code": "string",        "description": "string",        "name": "string"      }    ],    "account_types": [      {        "code": "string",        "financial_statement": "string",        "name": "string",        "normal_balance": "debit"      }    ],    "system_roles": [      {        "code": "string",        "description": "string",        "label": "string"      }    ]  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Get account by id

GET
/v1/accounting/accounts/{id}

Required scope: accounting:read

Error codes: NOT_FOUND

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X GET 'https://api.acreum.io/v1/accounting/accounts/string'
{  "data": {    "account_detail_type_code": "string",    "account_type_code": "string",    "cash_flow_category": "operating",    "cash_flow_category_derived": "operating",    "code": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_active": true,    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "name": "string",    "parent_account_id": "7e844708-6009-4228-8705-850fbc3ccfd3",    "system_role": "string"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Update account

PATCH
/v1/accounting/accounts/{id}

Updates the editable per-account fields (name, is_active). system_role is managed via PUT /v1/accounting/system-roles/:role to preserve a single audited reassignment path; code, type, detail type, and parent are locked once an account exists to keep the general ledger interpretable.

Required scope: accounting:write

Plannable: yes. An agent can use this operation as a step in a plan.

Error codes: NOT_FOUND, VALIDATION_FAILED, CASH_FLOW_CATEGORY_REQUIRES_ASSET, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
cash_flow_category?|

Cash-flow classification override; send null to revert to derived.

Value in"operating""investing""financing""cash"
is_active?boolean
name?string
Length1 <= length <= 200

Response Body

application/json
  1. response
data*
meta*
curl -X PATCH 'https://api.acreum.io/v1/accounting/accounts/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "account_detail_type_code": "string",    "account_type_code": "string",    "cash_flow_category": "operating",    "cash_flow_category_derived": "operating",    "code": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_active": true,    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "name": "string",    "parent_account_id": "7e844708-6009-4228-8705-850fbc3ccfd3",    "system_role": "string"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/accounting/gl-activity

Lists journal lines with debit/credit totals over the whole filtered set (meta.totals), cursor-paged. With basis=accrual (the default) the rows are the posted journal lines. With basis=cash the rows are exactly the ones the cash-basis P&L (GET /v1/reports/pl?basis=cash) sums for the same account, date range and legal entity — so a P&L figure drilled into here lists the rows that make it up. See the basis parameter for what a cash row is and what the cash basis refuses.

Required scope: accounting:read

Pagination: cursor

Error codes: INVALID_CURSOR, VALIDATION_FAILED, LEGAL_ENTITY_NOT_IN_SCOPE, GL_ACTIVITY_CASH_BASIS_PARAMETER_UNSUPPORTED, GL_ACTIVITY_CASH_BASIS_ACCOUNT_NOT_INCOME_STATEMENT

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

from_date?string
Formatdate
to_date?string
Formatdate
legal_entity_id?string
Formatuuid
account_id?string
Formatuuid
document_id?string

Exact document_id (uuid) match — scopes to the GL lines posted from a single source document

Formatuuid
search?string
basis?string

accrual (default): the posted journal lines, as this endpoint has always listed them. cash: exactly the rows GET /v1/reports/pl?basis=cash sums for the same account_id, from_date/to_date and legal_entity_id — income-statement accounts only. An invoice or bill line is listed when a payment applied to it, dated on the payment, as the share of the line that payment recognizes; the row carries the payment's journal entry and the invoice/bill line it pays. Refund payments and debt-service interest are listed the same way. Applications are read as they stand now, so applying or unapplying a payment re-categorizes past rows. A payment's unapplied remainder (the P&L's Uncategorized row) is not listed. On cash, sort=created_at/-created_at and document_id are refused (GL_ACTIVITY_CASH_BASIS_PARAMETER_UNSUPPORTED), a balance-sheet account_id is refused (GL_ACTIVITY_CASH_BASIS_ACCOUNT_NOT_INCOME_STATEMENT), and with no legal_entity_id managed legal entities are excluded, as on the P&L. A cursor is valid only on the basis that issued it.

Default"accrual"
Value in"accrual""cash"
cursor?string
limit?number

1..100, default 50

sort?string

Default: -entry_date

Value in"-entry_date""entry_date""-created_at""created_at"

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting/gl-activity'
{  "data": [    {      "account_code": "string",      "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",      "account_name": "string",      "credit": "string",      "customer_vendor": "string",      "date": "2019-08-24",      "debit": "string",      "doc_num": "string",      "journal_entry_id": "6652a24b-55f1-423a-bf69-8d8966f301ed",      "journal_line_id": "0037d581-383e-4457-9c0d-c60ad65177dc",      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "legal_entity_name": "string",      "memo": "string",      "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",      "transaction_type": "string"    }  ],  "meta": {    "api_version": "2026-04-23",    "basis": "accrual",    "limit": 0,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "totals": {      "credit": "string",      "debit": "string"    }  }}
GET
/v1/accounting/reconciliation

Answers, per legal entity: does the sum of what customers owe us on the invoice list equal the AR balance in the general ledger — and if not, by how much? Same question for AP and vendors. Read-only; it reports a variance and never adjusts anything.

Compares the subledger AS IT STANDS NOW against every posted journal line to date. It takes no period or as-of parameter on purpose: document balances are current mutable state with no history, so pairing a past period of GL against today's balances would report two different instants as one variance.

The difference is reported in three terms, not one. variance is the raw subledger-minus-GL difference and is normally large. unrepresentable_gl_movement is the part of it that no document could ever account for — manual journal entries posted straight at the control account, and settled-on-creation types such as expense and deposit whose balance is always zero. residual_variance is the two added together, and it is the number that should be zero: it is the only one of the three worth investigating.

Required scope: accounting:read

Pagination: none

Error codes: VALIDATION_FAILED, LEGAL_ENTITY_NOT_IN_SCOPE

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

legal_entity_id?string

Restrict to one legal entity. Omit for every legal entity.

Formatuuid
subledger?string

Which subledger to tie out. Omit for both. ar compares open invoices and credit memos against the accounts_receivable control account; ap compares bills and vendor credits against accounts_payable.

Value in"ar""ap"

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting/reconciliation'
{  "data": [    {      "control_account_ids": [        "8af1713a-e1f0-4fe8-a75f-d271fdf11df7"      ],      "control_account_total": "1234.50",      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "legal_entity_name": "string",      "residual_variance": "1234.50",      "subledger": "ar",      "subledger_total": "1234.50",      "unperioded_line_count": 0,      "unrepresentable_gl_movement": "1234.50",      "variance": "1234.50"    }  ],  "meta": {    "api_version": "2026-04-23",    "computed_at": "2026-09-12T14:03:27.115Z",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
GET
/v1/accounting/system-roles

Returns one entry per system role, including its label, description, compatible account types, and the accounts currently holding the role (org-wide and any LE-scoped overrides). Use this to render the Default Accounts settings page.

Required scope: accounting:read

Pagination: none

Authorization

access-token
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting/system-roles'
{  "data": [    {      "assignments": [        {          "account_type_code": "string",          "code": "string",          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "is_active": true,          "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",          "name": "string"        }      ],      "compatible_account_types": [        "string"      ],      "description": "string",      "label": "string",      "role": "accounts_receivable"    }  ],  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
PUT
/v1/accounting/system-roles/{role}

Atomically reassigns a system_role within a bucket (org-wide or a specific legal entity). The role is cleared from any previous holder and applied to the target account in one transaction. Set account_id to null to clear the role entirely.

Required scope: accounting:write

Plannable: yes. An agent can use this operation as a step in a plan.

Error codes: NOT_FOUND, VALIDATION_FAILED, SYSTEM_ROLE_TAKEN, SYSTEM_ROLE_INCOMPATIBLE_TYPE, SYSTEM_ROLE_INCOMPATIBLE_DETAIL_TYPE, SYSTEM_ROLE_HOLDER_HAS_BALANCE, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

role*string

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
account_id*|

Account that should hold the role in the requested bucket. null clears the role.

Formatuuid
legal_entity_id?|

Bucket to manage. null or omitted means the org-wide default. When non-null, the target account must be scoped to this legal entity.

Formatuuid

Response Body

application/json
  1. response
data*
meta*
curl -X PUT 'https://api.acreum.io/v1/accounting/system-roles/string' \  -H 'Content-Type: application/json' \  -d '{  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65"}'
{  "data": {    "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",    "current": {      "account_type_code": "string",      "code": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "is_active": true,      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "name": "string"    },    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "previous": {      "account_type_code": "string",      "code": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "is_active": true,      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "name": "string"    },    "role": "accounts_receivable"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}