Accounting periods
Closing and reopening periods.
Paths are relative to https://evenbooks.org/api/v1. How keys, errors, paging and versions work is in the guide; the whole reference is also an OpenAPI 3.1 document.
Administrator key marks endpoints that need a key with the admin role, Write access those a read-only key can’t call, and Idempotent those that accept an idempotency key.
List accounting periods
/periodsEvery period that was closed, by start date; status is open once it has been reopened.
Response 200
array of PeriodDto
Errors 400 · 401 · 403 · 404 · 409 · 429
Close an accounting period
/periodsAdministrators only. Locks the date range: nothing dated inside it can be posted, changed or reversed (409 period_locked) until the period is reopened. Drafts dated inside it stay drafts.
Request body
ClosePeriodInput
startDatestring · PlainDateStringrequiredendDatestring · PlainDateStringrequiredreasonstring
Response 200
PeriodDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Close a reopened accounting period
/periods/{id}/closeAdministrators only. Locks the period’s dates again after a reopen. Needs version from the last read (409 version_conflict otherwise).
Parameters
idstring (uuid)path · required
Request body
PostPeriodsIdCloseBody
versionintegerrequiredreasonstring
Response 200
PeriodDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Reopen an accounting period
/periods/{id}/reopenAdministrators only. Allows posting and changes dated inside the period again, until it is closed with POST /periods/{id}/close. The reason is kept in History. Needs version from the last read (409 version_conflict otherwise).
Parameters
idstring (uuid)path · required
Request body
ReopenPeriodInput
versionintegerrequiredreasonstringrequired
Response 200
PeriodDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Schemas
The types these endpoints take or return, by name. Type names above link here.
PeriodDto
idstringstartDatestring · PlainDateStringendDatestring · PlainDateStringstatusstringOne of:
openclosedclosedAtstring or nullclosedBystring or nullreopenedAtstring or nullreopenedBystring or nullreasonstring or nullversioninteger
PlainDateString
string