API reference

Journal entries

Posted entries in the ledger. Corrections are reversals, never edits.

Guides: Write and correct journal entries

List journal entries

GET/v1/journal_entries

client.journalEntries.list()

Newest first — the order a ledger is read in.

Parameters

NameTypeDescription
limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

account_idQuerystring or null

An id that starts with gla_.

party_idQuerystring or null

An id that starts with party_.

qQuerystring or null

Only entries whose description or memo contains this, ignoring case.

sinceQuerystring (date) or null
untilQuerystring (date) or null
viewQuerystring

current (the default) shows the treatment that stands; history adds every reversed entry and its reversal.

One of current, historyDefault current

Response

200EntryPage

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/journal_entries" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Post a journal entry

POST/v1/journal_entries· Idempotent

client.journalEntries.create()

Post a manual journal entry.

The request's Idempotency-Key, when sent, is kept on the entry: a retry with it and the same lines returns the same entry however long after, and reusing it for different lines is a 409 idempotency_key_reused.

Request body

NewEntry

Response

201EntryOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/journal_entries" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"description":"…","entry_date":"2026-09-30","lines":[{"account_id":"…","amount":0,"direction":"debit"}]}'

Post up to 1,000 journal entries at once

POST/v1/journal_entries/batch· Idempotent

client.journalEntries.createBatch()

Post up to 1,000 manual journal entries at once, all or none — for backfills and migrations. They take one contiguous run of posting sequences. A refusal names the entry it is about ("Entry 12 of the batch: …") and posts nothing.

Re-running a batch is safe: an entry whose idempotency key is already in the books is returned as it was posted, and one whose key was used for different content is a 409 idempotency_key_reused.

Request body

NewBatch

Response

201EntryBatch

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/journal_entries/batch" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"entries":[{"description":"…","entry_date":"2026-09-30","lines":[{}]}]}'

Get a journal entry

GET/v1/journal_entries/{entry_id}

client.journalEntries.get()

One journal entry with its lines, debits first.

Parameters

NameTypeDescription
entry_idPath · Requiredstring

An id that starts with je_.

Response

200EntryOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/journal_entries/{entry_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Edit a journal entry by replacing it

POST/v1/journal_entries/{entry_id}/replace· Idempotent

client.journalEntries.replace()

Edit a manual entry: reverse it and post the corrected one, together. Both land in the original's period, which has to be open. The original and its reversal stay in the history view; the current view shows the replacement alone.

Parameters

NameTypeDescription
entry_idPath · Requiredstring

An id that starts with je_.

Request body

ReplacementRequest

Response

201ReplacementOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/journal_entries/{entry_id}/replace" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"lines":[{"account_id":"…","amount":0,"direction":"debit"}],"reason":"…"}'

Reverse a journal entry

POST/v1/journal_entries/{entry_id}/reverse· Idempotent

client.journalEntries.reverse()

Undo an entry by posting its mirror image. Both stay in the books.

Refused with transaction_spread for the entry of a transaction spread over months: delete its schedule first, and with transaction_capitalized for the entry of a transaction a fixed asset was capitalized from: delete or dispose of the asset first. Refused with intercompany_refused for one side of an intercompany transaction: reverse the transaction, so both sets of books change. Reversing a fixed asset's disposal puts it back in service; its depreciation is refused with fixed_asset_not_disposable while it is disposed of.

Parameters

NameTypeDescription
entry_idPath · Requiredstring

An id that starts with je_.

Request body

ReversalRequest

Response

201EntryOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/journal_entries/{entry_id}/reverse" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"…"}'

Objects

The objects these operations take and return.

EntryPage

NameTypeDescription
currencyRequiredstring
dataRequiredarray of EntryOut
has_moreRequiredboolean
next_cursorRequiredstring or null

NewEntry

NameTypeDescription
descriptionRequiredstring
entry_dateRequiredstring (date)
linesRequiredarray of NewLine
memostring or null

EntryOut

NameTypeDescription
amountRequiredstring
created_atstring (date-time) or null

When the entry was posted.

descriptionRequiredstring
documentsarray of DocumentOut

The receipts and invoices attached to the transactions the entry was posted from, oldest first. Empty for an entry with no transaction behind it.

entry_dateRequiredstring (date)
entry_kindRequiredstring

What produced the entry: manual, system, adjusting, opening, closing or reversal.

entry_noRequiredinteger
idRequiredstring

An id that starts with je_.

importedEntryImportOut or null

Where the entry's transactions were imported from and who brought them in. Null for an entry with no imported transaction behind it.

linesRequiredarray of LineOut
memoRequiredstring or null
originsarray of EntryOriginOut

What the entry was posted from. Empty for an entry written by hand, an opening or closing entry, and a reversal.

periodstring or null

The accounting period the entry is in, as YYYY-MM.

replaced_by_entry_idstring or null

An id that starts with je_.

replaced_by_entry_nointeger or null

That replacement's number, as people cite it.

replaces_entry_idRequiredstring or null

An id that starts with je_.

replaces_entry_nointeger or null

The number of the entry this one replaced, as people cite it.

reversed_by_entry_idstring or null

An id that starts with je_.

reversed_by_entry_nointeger or null

That reversal's number, as people cite it.

reverses_entry_idRequiredstring or null

An id that starts with je_.

reverses_entry_nointeger or null

The number of the entry a reversal undoes, as people cite it.

sourceRequiredstring
statusRequiredstringOne of posted, reversed

NewBatch

NameTypeDescription
entriesRequiredarray of NewBatchEntry

Up to 1000 entries, posted together or not at all.

EntryBatch

NameTypeDescription
currencyRequiredstring
dataRequiredarray of EntryOut

ReplacementRequest

NameTypeDescription
descriptionstring or null

Defaults to the original's.

entry_datestring (date) or null

Defaults to the original's date.

linesRequiredarray of NewLine
memostring or null

Defaults to the original's. An empty string clears it.

reasonRequiredstring

ReplacementOut

NameTypeDescription
replacementRequiredEntryOut
reversalRequiredEntryOut

ReversalRequest

NameTypeDescription
entry_datestring (date) or null
reasonRequiredstring

NewLine

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

amountRequirednumber | string
dimensionsarray of LineDimensionIn

At most one value per dimension. Refused with dimension_required when the account requires a dimension the line leaves out, and dimension_invalid when a value is not of the dimension named.

directionRequiredstringOne of debit, credit
foreignForeignIn or null

For a line that moved in another currency: that currency, the amount in it and the rate. amount must be that amount at that rate, to the books' minor unit; refused with foreign_amount_mismatch otherwise.

memostring or null
party_idstring or null

An id that starts with party_.

DocumentOut

NameTypeDescription
content_typeRequiredstring or null
created_atRequiredstring (date-time)
idRequiredstring

An id that starts with doc_.

kindRequiredstring
sourceRequiredstring
storedRequiredboolean
urlRequiredstring or null

EntryImportOut

Where the transactions behind an entry were brought in from, and by whom: the answer to "imported from where?".

NameTypeDescription
actor_avatar_urlstring or null

That member's profile picture, when they have one.

actor_emailstring or null

That member's email, while they are still in the books.

actor_idstring or null

An id that starts with usr_.

actor_kindRequiredstring

user when a member brought it in, system when a connection synced it.

One of user, system, model
actor_namestring or null

That member's name, when known.

labelstring or null

The import's own name: an uploaded file's name.

sourceRequiredstring

The connector it came from, such as stripe, or the format of a statement file a person uploaded, such as csv.

LineOut

NameTypeDescription
account_codeRequiredstring
account_idRequiredstring

An id that starts with gla_.

account_nameRequiredstring
amountRequiredstring
dimensionsarray of LineDimensionOut

The line's value for each dimension it names, by key.

directionRequiredstringOne of debit, credit
foreignForeignOut or null

What the line moved in, when not the books' own currency.

idRequiredstring

An id that starts with jel_.

memoRequiredstring or null
party_idstring or null

An id that starts with party_.

party_logo_urlstring or null

The party's logo, square PNG; null for none.

party_namestring or null

The party's name.

EntryOriginOut

What an entry was posted from: the step back from the books toward the evidence.

NameTypeDescription
descriptionRequiredstring
idRequiredstring

The transaction's id, or the schedule's.

kindRequiredstring

transaction: a bank, card or processor movement that was filed. schedule: one period of a recognition schedule.

One of transaction, schedule

NewBatchEntry

NameTypeDescription
descriptionRequiredstring
entry_dateRequiredstring (date)
idempotency_keystring or null

Posts this entry once, however many batches send it: the source object's own id is a good key for a backfill. Defaults to one derived from the request's Idempotency-Key and the entry's place.

linesRequiredarray of NewLine
memostring or null

LineDimensionIn

NameTypeDescription
dimension_idRequiredstring

An id that starts with dim_.

value_idRequiredstring

A value of that dimension.

ForeignIn

NameTypeDescription
amountRequirednumber | string

The amount in that currency, unsigned like amount.

currencyRequiredstring

The currency the line moved in, ISO 4217.

rateRequirednumber | string

One unit of it in the books' currency, as booked.

LineDimensionOut

NameTypeDescription
dimension_idRequiredstring

An id that starts with dim_.

dimension_keyRequiredstring

The dimension's key, e.g. department.

dimension_nameRequiredstring
value_codeRequiredstring
value_idRequiredstring

An id that starts with dimv_.

value_nameRequiredstring

ForeignOut

NameTypeDescription
amountRequiredstring
currencyRequiredstring
rateRequiredstring or null

The rate it was booked at; null on a revaluation line.