Accounts

Chart of accounts.

List accounts

GET /accounts

Sends Vortex-Entity.

Requires ledger:read.

Parameters

NameInTypeAbout
limitqueryinteger
starting_afterquerystring
typequeryAccountType
include_inactivequeryboolean

Answers

  • 200 any. A page of accounts.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Create an account

POST /accounts

Sends Vortex-Entity and Idempotency-Key.

Requires accounts:write.

Body

AccountCreate

Answers

  • 201 Account. The account.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Get an account

GET /accounts/{account_id}

Sends Vortex-Entity.

Parameters

NameInTypeAbout
account_id requiredpathstring

Answers

  • 200 Account. The account.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Update an account

PATCH /accounts/{account_id}

Sends Vortex-Entity.

Renames, re-maps or deactivates an account. The account type cannot change once the account has postings, and accounts are never deleted. Requires accounts:write.

Parameters

NameInTypeAbout
account_id requiredpathstring

Body

AccountUpdate

Answers

  • 200 Account. The account.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

List posting mappings

GET /posting-mappings

Sends Vortex-Entity.

The entity's posting rules: which account each role, category, tax jurisdiction, card processor, payroll tax or deduction posts to. Requires ledger:read.

Parameters

NameInTypeAbout
kindqueryPostingMappingKind

Answers

  • 200 object. The mappings.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Create or change a posting mapping

POST /posting-mappings

Sends Vortex-Entity and Idempotency-Key.

Upserts by kind and key. The account must be active and of a type that suits the mapping (422 wrong_account_type); a role must be one SYNC's posting rules use (422 unknown_role). Future events post differently; posted entries don't change, and events held for review wait to be re-posted. The change is written to the audit log. Requires accounts:write, which platform keys can't hold.

Body

PostingMappingUpsert

Answers

  • 200 PostingMapping. The mapping.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what