Docs

REST surface for Yoke Ledger — accounts, journal entries (with post and reverse), posting rules, the sources catalogue, and the three financial statements.

API reference

Every endpoint is tenant-scoped. The platform derives the tenant_id from the JWT; you never pass it in the body or in a path segment.

Auth and gating

  • Auth: tenant JWT in Authorization: Bearer ….
  • Gating: the tenant must hold the fastyoke.yoke-ledger entitlement. Install auto-grants it for free; immediately after uninstall a request can return 402 not_entitled with the listing slug in the body.

Accounts

MethodPathPurpose
GET/api/v1/tenant/gl/accountsList the Chart of Accounts.
POST/api/v1/tenant/gl/accountsCreate an account (code + name + type).
PATCH/api/v1/tenant/gl/accounts/:codeRename, recategorize, or deactivate.

Wrong-case account types (asset instead of Asset) and duplicate codes are validation errors on create and patch.

Entries

MethodPathPurpose
GET/api/v1/tenant/gl/entriesList entries. Filterable by state and date range.
POST/api/v1/tenant/gl/entriesCreate a draft entry with one or more lines.
GET/api/v1/tenant/gl/entries/:idRead one entry with its lines.
POST/api/v1/tenant/gl/entries/:id/postTransition draft → posted.
POST/api/v1/tenant/gl/entries/:id/reverseWrite a mirror entry that reverses a posted one.

Validation: POST /entries and POST /entries/:id/post return unbalanced when the lines don't sum to a balanced entry. POST /entries/:id/post and POST /entries/:id/reverse return immutable when called against an entry in a state that doesn't allow the transition.

Posting rules

MethodPathPurpose
GET/api/v1/tenant/gl/posting-rulesList your tenant's rules.
POST/api/v1/tenant/gl/posting-rulesCreate a rule.
GET/api/v1/tenant/gl/posting-rules/sourcesCatalogue of source kinds available to your tenant.

Reports

MethodPathPurpose
GET/api/v1/tenant/reports/trial-balanceTrial Balance over an optional date range.
GET/api/v1/tenant/reports/pnlProfit & Loss over an optional period.
GET/api/v1/tenant/reports/balance-sheetBalance Sheet as of an optional date.

Error codes you'll see

CodeMeaningReturned by
unbalancedLines don't sum to a balanced entry.POST /entries, POST /entries/:id/post
not_entitledTenant doesn't hold fastyoke.yoke-ledger.Any endpoint, immediately after uninstall.
immutableTried to mutate a posted entry.Edit / delete of a posted entry, double-post, post-after-reverse.

See also