Flow
ServicesAccounting Service

API

HTTP endpoints and error contracts for the accounting service.

Ops

PathMethodNotes
/healthzGETLiveness
/readyzGETReadiness (Postgres ping)

Versioned API

PathMethodNotes
/v1/accountsPOSTCreate account; requires Idempotency-Key

Raw JSON Success responses return the account body directly — not the template envelope.

Unguarded Requires Authorization: Bearer <jwt> once JWT middleware ships. Until then, local dev may use X-Dev-Actor as a temporary stand-in (not authentication). See docs/decisions/0013-jwt-validated-in-each-service.md.

Request body

FieldRequiredNotes
chart_codeYesWhich chart (e.g. us)
codeYesAccount code unique within chart
nameYesDisplay name
classificationYesasset, liability, equity, revenue, expense
is_postableYesWhether journal lines may reference this account
parent_codeNoParent account code in same chart
whyNoAudit context propagated to the event

Errors

Failures use RFC 9457 problem JSON (application/problem+json), unlike template's enveloped errors.

Planned

List and get endpoints (GET /v1/accounts, GET /v1/accounts/{id}) are designed in domain docs but not implemented yet.

OpenAPI: services/accounting/openapi.yaml.

On this page