Ledger
16 operations. All areas
- POST /v1/accounts
- GET /v1/accounts
- POST /v1/accounts/{code}/update
- POST /v1/accounts/defaults
- GET /v1/starter-charts
- POST /v1/accounts/starter-chart
- POST /v1/periods
- GET /v1/periods
- POST /v1/periods/{id}/status
- GET /v1/journal-entries/{id}
- POST /v1/journal-entries/propose
- POST /v1/journal-entries/{id}/reverse
- POST /v1/classes
- GET /v1/classes
- POST /v1/fiscal-years/periods
- POST /v1/fiscal-years/status
POST/v1/accounts
Add an account to the chart of accounts
- Operation
createAccount - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Request body
codestring, requirednamestring, requiredtype"asset" | "liability" | "equity" | "income" | "expense", requiredsubtypestringparent_codestringcontrol"ar" | "ap" Make it an AR (asset) or AP (liability) control account; fixed at creation
- Responses
201Created (object)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
GET/v1/accounts
List the chart of accounts, with the default income and expense accounts for new documents
- Operation
listAccounts - Scope: read
- Read
- Parameters
include_inactivequery, booleaninclude_balancesquery, booleanas_ofquery, string
- Responses
200Accounts (object)- Errors
400,401,403,429,500(Error:error.type,message)
POST/v1/accounts/{code}/update
Rename an account, or deactivate or reactivate it. Codes, types and the AR/AP designation never change; accounts are never deleted. Deactivation is refused (account_protected) for an AR/AP control account, a bank account's ledger account, an active sales-tax rate's payable account, an active item's account, a default account and a parent with active sub-accounts. Audited; dry_run previews.
- Operation
updateAccount - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Parameters
codepath, string, required
- Request body
namestringactivebooleanreasonstringdry_runboolean
- Responses
200Updated (or, with dry_run, what it would be) (object)- Errors
400,401,403,404,409,422,429,500(Error:error.type,message)
POST/v1/accounts/defaults
Set the default income account (invoices, credit memos, sales receipts, estimates) and expense account (bills, vendor credits) new document lines start on; null clears one. Audited.
- Operation
setDefaultAccounts - Scope: admin
- Write: sets a value, no Idempotency-Key needed
- Request body
incomestring | nullexpensestring | null
- Responses
200The defaults (object)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
GET/v1/starter-charts
Starter charts of accounts a company can begin with (each account, and the default income and expense accounts)
- Operation
listStarterCharts - Scope: read
- Read
- Responses
200Templates (object)- Errors
400,401,403,429,500(Error:error.type,message)
POST/v1/accounts/starter-chart
Apply a starter chart to a company whose chart of accounts is still empty (otherwise chart_not_empty). Every account is audited, then the template; the defaults are set. dry_run previews.
- Operation
applyStarterChart - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Request body
template"general" | "services" | "retail" | "empty", required Starter chart of accounts: general small business (default), services/agency, retail/product, or empty (migrations bring their own chart).dry_runboolean
- Responses
200Dry run: what would be created (object)201Applied (object)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
POST/v1/periods
Create an accounting period
- Operation
createPeriod - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Request body
start_datestring, required Calendar date, YYYY-MM-DD.end_datestring, required Calendar date, YYYY-MM-DD.
- Responses
201Created (object)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
GET/v1/periods
List periods and their lock status
- Operation
listPeriods - Scope: read
- Read
- Responses
200Periods (object)- Errors
400,401,403,429,500(Error:error.type,message)
POST/v1/periods/{id}/status
Lock or unlock a period (reopening a hard lock needs a human and a reason)
- Operation
setPeriodStatus - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Parameters
idpath, string, required
- Request body
status"open" | "soft_locked" | "hard_locked", requiredreasonstring
- Responses
200Updated (object)- Errors
400,401,403,404,409,422,429,500(Error:error.type,message)
GET/v1/journal-entries/{id}
One posted journal entry. Posted entries are immutable: there is no update or delete; reverse instead.
- Operation
getJournalEntry - Scope: read
- Read
- Parameters
idpath, string, required
- Responses
200Entry (object)- Errors
400,401,403,404,429,500(Error:error.type,message)
POST/v1/journal-entries/propose
Propose a journal entry. Agents: auto-posts within policy, otherwise queues for approval. dry_run=true previews without writing.
- Operation
proposeJournalEntry - Scope: propose
- Write: needs Idempotency-Key (or dry_run)
- Request body
entry_datestring, required Calendar date, YYYY-MM-DD.memostringlinesarray of DraftLine, requireddry_runbooleanconfidencenumbersoft_lock_override_reasonstring
- Responses
200Dry run: the exact entry, policy verdict and affected balances; nothing written (ProposeResult)201Posted (ProposeResult)202Queued for approval (ProposeResult)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
POST/v1/journal-entries/{id}/reverse
Correct a posted entry by posting its exact reversal
- Operation
reverseJournalEntry - Scope: approve
- Write: needs Idempotency-Key (or dry_run)
- Parameters
idpath, string, required
- Request body
entry_datestring Calendar date, YYYY-MM-DD.memostringsoft_lock_override_reasonstring
- Responses
201Reversal posted (object)- Errors
400,401,403,404,409,422,429,500(Error:error.type,message)
POST/v1/classes
Create a class (reporting dimension for journal lines)
- Operation
createClass - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Request body
namestring, required Class name (reporting dimension).
- Responses
201Created (object)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
GET/v1/classes
List classes
- Operation
listClasses - Scope: read
- Read
- Responses
200Classes (object)- Errors
400,401,403,429,500(Error:error.type,message)
POST/v1/fiscal-years/periods
Create the monthly periods of a fiscal year that do not exist yet (named by the year it ends)
- Operation
createFiscalYearPeriods - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Request body
fiscal_yearinteger, required
- Responses
201Periods (FiscalYearPeriods)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
POST/v1/fiscal-years/status
Lock (or reopen) every period of a fiscal year; each change is audited (reopening a hard lock needs a person and a reason)
- Operation
setFiscalYearStatus - Scope: admin
- Write: needs Idempotency-Key (or dry_run)
- Request body
fiscal_yearinteger, requiredstatus"open" | "soft_locked" | "hard_locked", requiredreasonstring
- Responses
200Periods (FiscalYearPeriods)- Errors
400,401,403,409,422,429,500(Error:error.type,message)