Imports
Importing history from another app.
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 ledger imports
/imports/ledgerThe 100 most recent, newest first, without their accounts and entries.
Response 200
array of LedgerImportDto
Errors 400 · 401 · 403 · 404 · 409 · 429
Upload a general ledger CSV
/imports/ledgerAdministrators only. Step 1 of importing history from another accounting app: stores the file, detects its columns (Wave exports are recognized) and returns a previewed import with each source account and the entries found. Nothing is posted yet: set columns and accounts with PATCH /imports/ledger/{id}, then POST /imports/ledger/{id}/commit.
Request body
CreateLedgerImportInput
fileNamestringrequiredcontentstringrequired
Response 200
LedgerImportDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Get a ledger import
/imports/ledger/{id}A previewed import is analyzed again against the current accounts, entries and closed periods, with its source accounts and entries (problems first, capped).
Parameters
idstring (uuid)path · required
Response 200
LedgerImportDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Change a ledger import
/imports/ledger/{id}Administrators only. Set the column mapping, map source account names to Evenbooks accounts (accountMap, merged into the saved map; null clears one), or set cash-basis amounts per settlement (cashOverrides; a new mapping clears them). Only while previewed (409 invalid_state). Returns the new preview.
Parameters
idstring (uuid)path · required
Request body
UpdateLedgerImportInput
mappingLedgerCsvMappingInputShow 9 fields
datestring · CsvColumnNamerequiredaccountstring · CsvColumnNamerequireddescriptionstring · CsvColumnName or nullmemostring · CsvColumnName or nullreferencestring · CsvColumnName or nullgroupstring · CsvColumnName or nullgroupingstring or nullOne of:
sequencedate-descriptionamountsobjectrequiredShow 4 fields
amountstring · CsvColumnName or nulldebitstring · CsvColumnName or nullcreditstring · CsvColumnName or nullinvertboolean
dateOrderstringOne of:
YMDMDYDMY
cashOverridesmap of array of ImportCashComponentInputShow 2 fields of each value
accountIdstring · Uuidrequiredamountstring · DecimalStringrequired
accountMapmap of string · Uuid
Response 200
LedgerImportDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Post a ledger import
/imports/ledger/{id}/commitAdministrators only. Posts every ready entry as a journal entry, in date order; entries with errors (including those dated in a closed period) and duplicates are skipped and counted. Every source account the ready entries use must be mapped, and every settlement that needs a cash-basis review must have one (400 validation). Refused when the same file was imported before (409 duplicate). An import already committed is returned unchanged. Idempotent with idempotencyKey.
Parameters
idstring (uuid)path · required
Request body
CommitLedgerImportInput
idempotencyKeystring · IdempotencyKey
Response 200
LedgerImportDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Discard a ledger import
/imports/ledger/{id}/discardAdministrators only. Only while previewed (409 invalid_state); entries already imported are reversed one by one from the journal instead. Returns no content.
Parameters
idstring (uuid)path · required
Response 204
Done; no body
No body.
Errors 400 · 401 · 403 · 404 · 409 · 429
Schemas
The types these endpoints take or return, by name. Type names above link here.
CsvColumnName
string
DecimalString
decimal string
string
IdempotencyKey
string
ImportCashComponentInput
accountIdstring · Uuidrequiredamountstring · DecimalStringrequired
ImportCashComponentInputOutput
accountIdstring · Uuidamountstring · DecimalString
LedgerCsvMapping
datestring · CsvColumnNameaccountstring · CsvColumnNamedescriptionstring · CsvColumnName or nulloptionalmemostring · CsvColumnName or nulloptionalreferencestring · CsvColumnName or nulloptionalgroupstring · CsvColumnName or nulloptionalgroupingstring or nulloptionalOne of:
sequencedate-descriptionamountsobjectShow 4 fields
amountstring · CsvColumnName or nulloptionaldebitstring · CsvColumnName or nulloptionalcreditstring · CsvColumnName or nulloptionalinvertbooleanoptional
dateOrderstringOne of:
YMDMDYDMY
LedgerCsvMappingInput
datestring · CsvColumnNamerequiredaccountstring · CsvColumnNamerequireddescriptionstring · CsvColumnName or nullmemostring · CsvColumnName or nullreferencestring · CsvColumnName or nullgroupstring · CsvColumnName or nullgroupingstring or nullOne of:
sequencedate-descriptionamountsobjectrequiredShow 4 fields
amountstring · CsvColumnName or nulldebitstring · CsvColumnName or nullcreditstring · CsvColumnName or nullinvertboolean
dateOrderstringOne of:
YMDMDYDMY
LedgerImportAccountDto
sourcestringlineCountintegerdebitTotalstring · DecimalStringcreditTotalstring · DecimalStringaccountIdstring or nullproblemstring or null
LedgerImportDto
idstringfileNamestringstatusstringOne of:
previewedcommitteddiscardedmappingLedgerCsvMapping or nullrowCountintegerentryCountintegerreadyCountintegerimportedCountintegerduplicateCountintegererrorCountintegerwindowStartstring · PlainDateString or nullwindowEndstring · PlainDateString or nullcreatedAtstringcommittedAtstring or nullheadersarray of stringoptionalrecognizedFormatstring or nulloptionalOne of:
wave_transactionswave_ledgeralreadyCommittedbooleanoptionalaccountsarray of LedgerImportAccountDtooptionalentriesarray of LedgerImportEntryDtooptionalentriesTruncatedbooleanoptional
LedgerImportEntryDto
keystringcashKeystring or nullcashReviewRequiredbooleancashComponentsarray of ImportCashComponentInputOutput or nullrowNosarray of integerdatestring · PlainDateString or nulldescriptionstringreferencestring or nullstatusstringOne of:
okduplicateerrorerrorstring or nulllinesarray of objectShow 5 fields of each item
rowNointegeraccountstringdebitstring · DecimalStringcreditstring · DecimalStringmemostring or null
PlainDateString
string
Uuid
string (uuid)