API reference

Books

The books as one archive, restored into empty books with the same trial balance, and each month's share of work done unattended and how ready it is to close.

Guides: Close the month, Settings and your team

Export everything the books hold

GET/v1/books/archive

client.books.export()

Everything these books hold, as one JSON archive: the chart of accounts, dimensions, counterparties and every journal entry with its lines, in the order they were posted, with the trial balance they add up to and a checksum. Counterparties' tax IDs are included whole only for a caller with the sensitive-data permission. POST /v1/books/restore writes it into empty books.

Response

200BooksArchive-Output

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/books/archive" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Measure how much of the books' work ran without a person

GET/v1/books/autonomy

client.books.autonomy()

Per month: the economic events, the share decided with no person, a person's interventions per 1,000 events (all, founders, accountants), how often a person kept the model's category, and the questions asked.

Operational figures read as the rows stand now, not pinned to a posting sequence: a month's figures still move while its work is being done.

Parameters

NameTypeDescription
throughQuerystring or null

The last month to cover, as YYYY-MM. Defaults to the current month.

monthsQueryinteger

How many months to cover, ending with through.

Default 6

Response

200BooksAutonomyOut

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/books/autonomy" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

List what the books check every day, and the thresholds

GET/v1/books/checks

client.books.checks()

What the books check every day, while the month is open, and the thresholds each finding is held to. Each finding is an Inbox item of the check's kind; the checks only read the books, and never change them.

Response

200BooksCheckList

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/books/checks" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Read this week's digest of the books

GET/v1/books/digest

client.books.digest()

This week's "Your books" digest: last month closed or how ready it is, this month's readiness and what only you can answer, how much of last month ran without a person, cash and runway, and what the daily checks found that we are reviewing.

Computed as the books stand now, on the company's clock. The digest is sent to every member on Monday in the company's time zone, once a week; sent_at says whether this week's has gone out.

Response

200BooksDigestOut

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/books/digest" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Say how ready a month is to close, area by area

GET/v1/books/readiness

client.books.readiness()

How ready a month is to close, area by area: cash, cards, payroll, revenue, receivables and payables, schedules, documents, questions and transactions, each ready, in attention or not applicable, with how many items wait and on whom. The percentage counts the month's work done; the blockers are the close screen's own, so a month at 100% has nothing left but the order and the date to wait for.

Read-only, and open to viewers: it creates no period and raises no exception.

Parameters

NameTypeDescription
periodQuerystring or null

The month, as 2026-09. The current month when absent.

Response

200BooksReadinessOut

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/books/readiness" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Restore an archive into empty books

POST/v1/books/restore· Idempotent

client.books.restore()

Write an archive from GET /v1/books/archive into these books, which must hold no journal entry yet and keep the archive's currency. The chart, dimensions and counterparties come first (an account these books already have by the same code is made to match, and must be of the same type), then every entry in its order, held to every rule a new entry is, and last a check that the books match the archive's trial balance.

Everything that can refuse an archive is checked before anything is written, including that its entries add up to its own trial balance: unprocessable for an archive that does not hold together, conflict for books that already hold other entries. Entries are written in committed parts of 1,000; if a restore is cut off, send the same archive again and it carries on after the last entry written. A large archive takes minutes, so give the call a long timeout.

Request body

BooksArchive-Input

Response

201RestoreOut

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/books/restore" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"accounts":[{"code":"…","name":"…","type":"…"}],"company":{"currency":"…","fiscal_year_end_month":0,"name":"…"},"counterparties":[{"name":"…","ref":0,"slug":"…"}],"dimensions":[{"key":"…","name":"…"}],"entries":[{"description":"…","entry_date":"2026-09-30","lines":[{}],"number":0,"posted_at":"2026-09-30T12:00:00Z","ref":0,"source":"…","status":"…"}],"exported_at":"2026-09-30T12:00:00Z","through_sequence":0,"trial_balance":{"as_of":"2026-09-30","rows":[{}],"total_credits":0,"total_debits":0}}'

Objects

The objects these operations take and return.

BooksArchive-Output

Every entry in a set of books, with what they are posted to and the trial balance they add up to.

NameTypeDescription
accountsRequiredarray of ArchiveAccount
checksumstring or null

sha256 of everything else, as checksum_of writes it. When present, a restore refuses an archive that no longer matches it.

companyRequiredArchiveCompany
counterpartiesRequiredarray of ArchiveCounterparty
dimensionsRequiredarray of ArchiveDimension
entriesRequiredarray of ArchiveEntry-Output

In the order they were posted.

exported_atRequiredstring (date-time)
formatstring

Always ledgerit.books.

Default ledgerit.books
through_sequenceRequiredinteger

The last posting sequence the archive holds; 0 for none.

trial_balanceRequiredArchiveTrialBalance-Output

What the entries add up to on the date of the last of them. A restore is undone unless the books it writes say the same.

versioninteger

The archive's shape. This API writes 1.

Default 1

BooksAutonomyOut

How much of the books' work ran without a person, month by month.

NameTypeDescription
monthsRequiredarray of AutonomyMonthOut

One entry per month, oldest first.

throughRequiredstring

The last month covered, as YYYY-MM.

BooksCheckList

NameTypeDescription
dataRequiredarray of BooksCheckOut
every_hoursRequiredinteger

How often the checks run over every set of books.

BooksDigestOut

This week's digest, as the books stand now.

NameTypeDescription
autonomyRequiredDigestAutonomyOut

How much of last month ran without a person.

current_monthRequiredDigestMonthOut

This month, so far.

idRequiredstring or null

An id that starts with digest_.

previous_monthRequiredDigestMonthOut

Last month: closed, or how ready it is.

reviewingRequiredarray of DigestReviewingOut

The newest 5 of them.

reviewing_countRequiredinteger

Open findings of the daily books checks: what we are reviewing.

runwayRequiredDigestRunwayOut

Cash and runway.

sent_atRequiredstring (date-time) or null

When this week's digest went out, or null while it has not. It goes out on Monday in the company's time zone, once a week.

timezoneRequiredstring

The IANA time zone the week is read in: the company's (PATCH /company), or UTC.

weekRequiredstring

The ISO week, as 2026-W40, on the company's clock.

week_starts_onRequiredstring (date)

The week's Monday.

BooksReadinessOut

NameTypeDescription
amount_openRequiredstring or null

What is at stake in the month: the transactions behind every area in attention, each counted once however many areas name it, in currency. Null unless every area in attention has an amount, so it is never a whole that leaves work out. Like the areas' amounts, it includes earlier months' open work.

areasRequiredarray of ReadinessAreaOut

Each area of the books, always all nine, in the order a month shows them.

blockersRequiredarray of ReadinessBlockerOut

What stands in the way of the close: the same list the close screen shows.

can_closeRequiredboolean

Whether closing the month would succeed without an override: exactly what the close screen says.

currencyRequiredstring

The books' currency, ISO 4217, that every amount is in.

ends_onRequiredstring (date)

The month's last day.

needs_personRequiredinteger

The sum of the counts of the areas in attention.

percentRequiredstring

How much of the month's work is done, 0 to 100 to one place: units_done of units_total, rounded down. 100 does not mean the month may close: it may not have ended, or an earlier month may be open (see can_close).

period_keyRequiredstring

The month, as 2026-09.

period_statusRequiredstring

open, soft_closed or locked.

starts_onRequiredstring (date)

The month's first day.

units_doneRequiredinteger

Units of the month's work done.

units_totalRequiredinteger

Units of the month's work: its transactions (and earlier ones still undecided), the accounts with a statement, the blocking checklist tasks, the account reviews, the connections that must be current, each open blocking exception, and the trial balance.

BooksArchive-Input

Every entry in a set of books, with what they are posted to and the trial balance they add up to.

NameTypeDescription
accountsRequiredarray of ArchiveAccount
checksumstring or null

sha256 of everything else, as checksum_of writes it. When present, a restore refuses an archive that no longer matches it.

companyRequiredArchiveCompany
counterpartiesRequiredarray of ArchiveCounterparty
dimensionsRequiredarray of ArchiveDimension
entriesRequiredarray of ArchiveEntry-Input

In the order they were posted.

exported_atRequiredstring (date-time)
formatstring

Always ledgerit.books.

Default ledgerit.books
through_sequenceRequiredinteger

The last posting sequence the archive holds; 0 for none.

trial_balanceRequiredArchiveTrialBalance-Input

What the entries add up to on the date of the last of them. A restore is undone unless the books it writes say the same.

versioninteger

The archive's shape. This API writes 1.

Default 1

RestoreOut

NameTypeDescription
accounts_createdRequiredinteger

Accounts the archive had and these books did not.

as_ofRequiredstring (date)

The day the trial balance was compared on: the archive's last entry's.

counterparties_createdRequiredinteger
dimensions_createdRequiredinteger
entriesRequiredinteger

Entries written, reversals and replacements included.

linesRequiredinteger
total_creditsRequiredstring
total_debitsRequiredstring

The restored trial balance's debits, equal to the archive's.

ArchiveAccount

NameTypeDescription
codeRequiredstring
control_rolestring or null

ar, ap or processor_clearing.

currencystring or null

ISO 4217; null means the books' own.

is_activebooleanDefault true
is_postablebooleanDefault true
nameRequiredstring
parent_codestring or null

The header account it sits under.

required_dimensionsarray of string

Keys of the dimensions every line on it names.

rolestring or null
typeRequiredstring

asset, liability, equity, income or expense.

ArchiveCompany

NameTypeDescription
books_start_onstring (date) or null

The first day the books cover, when one was set.

currencyRequiredstring

ISO 4217. A restore needs books in the same currency.

fiscal_year_end_monthRequiredinteger

1–12: the month the fiscal year ends in.

nameRequiredstring

The name the books were kept under.

ArchiveCounterparty

NameTypeDescription
countrystring or null
default_account_codestring or null
emailstring or null
is_customerbooleanDefault false
is_vendorbooleanDefault false
merged_into_refinteger | string or null

The ref of the counterparty this one was merged into; posted lines may still name it.

nameRequiredstring
notesstring or null
payment_terms_daysinteger or null
refRequiredinteger | string

What lines in this archive call it by.

regionstring or null
rolesarray of ArchivePartyRole

What they are to these books. An archive written before roles has none here, and is_customer and is_vendor say.

slugRequiredstring
tax_classificationstring or null
tax_idstring or null

Whole only when the exporter holds sensitive.read; otherwise left out.

w9_received_onstring (date) or null
websitestring or null

ArchiveDimension

NameTypeDescription
keyRequiredstring
nameRequiredstring
valuesarray of ArchiveDimensionValue

ArchiveEntry-Output

NameTypeDescription
descriptionRequiredstring
entry_dateRequiredstring (date)
linesRequiredarray of ArchiveLine-Output
memostring or null
numberRequiredinteger

Its number in the books it came from.

posted_atRequiredstring (date-time)

When it was posted in the books it came from.

refRequiredinteger | string

What reversals and replacements in this archive call it by.

replaces_refinteger | string or null
reverses_refinteger | string or null
sourceRequiredstring

What wrote it: manual, ingest, opening, closing, reversal or schedule.

statusRequiredstring

posted, or reversed when a later entry undid it.

ArchiveTrialBalance-Output

NameTypeDescription
as_ofRequiredstring (date)
rowsRequiredarray of ArchiveTrialBalanceRow-Output
total_creditsRequiredstring
total_debitsRequiredstring

AutonomyMonthOut

One month of the books' autonomy figures.

NameTypeDescription
accountant_interventionsRequiredinteger

Interventions by an accountant of these books or by an accounting firm's staff.

accountant_interventions_per_1000Requiredstring or null

Accountant interventions per 1,000 events, to one place; null when there are no events.

ai_acceptance_rateRequiredstring or null

ai_approved / (ai_approved + ai_corrected), from 0 to 1, to four places; null when a person reviewed none.

ai_approvedRequiredinteger

The model's categories a person reviewed and kept.

ai_correctedRequiredinteger

The model's categories a person reviewed and changed.

autonomousRequiredinteger

Of those, the ones a rule or the model decided (or that needed no category) and that are in the books or ready to post, with no person ever filing them.

autonomous_rateRequiredstring or null

autonomous / events, from 0 to 1, to four places; null when there are no events.

ends_onRequiredstring (date)

The month's last day.

eventsRequiredinteger

Economic events dated in the month: transactions, without authorisations, the excluded twin of a transfer or duplicate, and rows the provider removed.

founder_interventionsRequiredinteger

Interventions by an owner or admin of these books.

founder_interventions_per_1000Requiredstring or null

Founder interventions per 1,000 events, to one place; null when there are no events.

interventionsRequiredinteger

A person's counted work on the month's records (accounting contributions with weight above zero): a transaction by its date, an entry by its date, anything else by the day it was done.

interventions_per_1000Requiredstring or null

Interventions per 1,000 events, to one place; null when there are no events.

other_interventionsRequiredinteger

Interventions by anyone else: members, viewers, people no longer in the books.

period_keyRequiredstring

The month, as YYYY-MM.

questions_askedRequiredinteger

Questions asked in the month (UTC).

questions_removed_by_policyRequiredinteger

Questions not sent in the month because a rule — often one an earlier answer wrote — already covered the transaction, and filed it.

repeated_questionsRequiredinteger

Of those, the ones about a transaction whose counterparty an earlier question, in any month, was already about.

starts_onRequiredstring (date)

The month's first day.

BooksCheckOut

NameTypeDescription
ask_reasonRequiredstring

Why an item it raises needs a person.

One of needs_category, needs_receipt, needs_match, needs_business_intent, needs_approval, data_problem
kindRequiredstring

The check, named by the kind of Inbox item it raises: unusual_amount, stale_clearing, unmatched_transfer, possible_repeat, account_swing or missing_accrual.

One of unusual_amount, stale_clearing, unmatched_transfer, possible_repeat, account_swing, missing_accrual
thresholdsRequiredarray of ThresholdOut

What a finding is held to.

tolerableRequiredboolean

Whether a vendor's tolerance can widen it (/qa_tolerances): true for the checks about one vendor.

DigestAutonomyOut

NameTypeDescription
autonomousRequiredinteger

Of those, the ones decided with no person.

autonomous_rateRequiredstring or null

autonomous / events, 0 to 1 to four places; null with no events.

eventsRequiredinteger

Economic events dated in the month.

founder_interventions_per_1000Requiredstring or null

An owner's or admin's interventions per 1,000 events; null with no events.

interventions_per_1000Requiredstring or null

A person's interventions per 1,000 events; null with no events.

period_keyRequiredstring

The month the figures are for: last month, which is complete.

DigestMonthOut

NameTypeDescription
can_closeRequiredboolean

Whether closing the month would succeed without an override.

closedRequiredboolean

True once the month is closed (soft_closed or locked).

needs_personRequiredinteger

Items in attention, whoever they wait on.

needs_youRequiredinteger

Of those, the ones only the business can answer: a question asked of it, a connection that needs it to sign in.

percentRequiredstring

How much of the month's work is done, 0 to 100 to one place, as /books/readiness counts it.

period_keyRequiredstring

The month, as 2026-09.

period_statusRequiredstring

open, soft_closed or locked.

starts_onRequiredstring (date)

The month's first day.

DigestReviewingOut

NameTypeDescription
amountRequiredstring or null

The figure that tripped it, when it has one.

currencyRequiredstring or null

That figure's currency.

idRequiredstring

The Inbox item the daily check raised.

kindRequiredstring

The check that found it: unusual_amount, stale_clearing, unmatched_transfer, possible_repeat, account_swing or missing_accrual.

raised_atRequiredstring (date-time)

When the check raised it.

DigestRunwayOut

NameTypeDescription
as_ofRequiredstring (date)

The day cash is read at: today on the company's clock.

burningRequiredboolean

Whether the trailing net burn is above zero.

cashRequiredstring

Cash in the books' currency.

currencyRequiredstring

The books' currency, ISO 4217.

runway_monthsRequiredstring or null

Months of cash at that burn, to one place; null when the books are not burning cash.

trailing_net_burnRequiredstring or null

Average net burn of the last complete months (up to 3); null with no history.

ReadinessAreaOut

NameTypeDescription
amountRequiredstring or null

What is at stake, in the books' currency: the sum, unsigned, of the transactions behind the area's items, each counted once. documents is the spend still missing its receipt, cards the charges not approved at their source, transactions the undecided transactions and those with a blocking item open. Items that are not a transaction (a connection, an account off its statement, a bill to enter, a schedule, a question) add nothing, so cash, payroll, revenue, receivables_payables, schedules and questions are always null. A foreign transaction converts at the rate in force on the month's last day; null when one has no rate yet, or when cards also has a connection or account issue open, rather than a sum that leaves it out. Includes earlier months' open work, as the counts do. Null when ready or not applicable.

areaRequiredstring

cash, cards, payroll, revenue, receivables_payables, schedules, documents, questions or transactions.

countRequiredinteger

How many items in it wait on a person: 0 when ready or not applicable.

inbox_itemsRequiredinteger

How many of count are items of the exception queue that wait on a person. The rest are connection problems, accounts off their statements, bills to enter, undecided transactions, and items the agent is still working. 0 when ready or not applicable.

inbox_ownerRequiredstring or null

Whom the most pressing of those inbox_items waits on: owner, reviewer or third_party, in that order. Unlike owner it leaves connections out, and it is always the items' own waiting_on, with or without an accountant. Null when inbox_items is 0.

ownerRequiredstring or null

Who the area falls to: reviewer (the accountant's work), owner (only the business owner can act: a sign-in, a question asked of them, an item escalated to them) or third_party (someone outside the books, such as a cardholder asked for a receipt). payroll, revenue and documents are whoever is most pressing among their connection and their items, in that order: owner, reviewer, third party. In books with no accountant and no accounting firm, the reviewer's work is owner. Null when not applicable.

stateRequiredstring

ready when nothing in it waits on anyone, attention when something does, not_applicable when the books have nothing of the kind (no payroll connection, no schedule).

ReadinessBlockerOut

NameTypeDescription
countRequiredinteger

How many of it: transactions, months, tasks, reviews or exceptions.

kindRequiredstring

What stands in the way of the close: period_not_over, earlier_period_open, undecided_transactions, checklist_incomplete, accounts_unreviewed, or an exception kind.

severityRequiredstring

warning or error.

ArchiveEntry-Input

NameTypeDescription
descriptionRequiredstring
entry_dateRequiredstring (date)
linesRequiredarray of ArchiveLine-Input
memostring or null
numberRequiredinteger

Its number in the books it came from.

posted_atRequiredstring (date-time)

When it was posted in the books it came from.

refRequiredinteger | string

What reversals and replacements in this archive call it by.

replaces_refinteger | string or null
reverses_refinteger | string or null
sourceRequiredstring

What wrote it: manual, ingest, opening, closing, reversal or schedule.

statusRequiredstring

posted, or reversed when a later entry undid it.

ArchiveTrialBalance-Input

NameTypeDescription
as_ofRequiredstring (date)
rowsRequiredarray of ArchiveTrialBalanceRow-Input
total_creditsRequirednumber | string
total_debitsRequirednumber | string

ArchivePartyRole

NameTypeDescription
form_1099_categorystring or null
is_1099_eligiblebooleanDefault false
roleRequiredstring

customer, vendor, employee, investor, lender or founder.

ArchiveDimensionValue

NameTypeDescription
codeRequiredstring
nameRequiredstring
parent_codestring or null

ArchiveLine-Output

NameTypeDescription
account_codeRequiredstring
amountRequiredstring

Unsigned; direction carries the sign.

dimensionsmap of string

Dimension key → value code.

directionRequiredstringOne of debit, credit
memostring or null
party_refinteger | string or null

The ref of a counterparty in this archive.

ArchiveTrialBalanceRow-Output

NameTypeDescription
codeRequiredstring
creditRequiredstring
debitRequiredstring

ThresholdOut

NameTypeDescription
nameRequiredstring

What it measures, such as multiple_of_median or days. Amounts are in the books' own currency.

valueRequiredstring

Its default, before any vendor's tolerance widens it.

ArchiveLine-Input

NameTypeDescription
account_codeRequiredstring
amountRequirednumber | string

Unsigned; direction carries the sign.

dimensionsmap of string

Dimension key → value code.

directionRequiredstringOne of debit, credit
memostring or null
party_refinteger | string or null

The ref of a counterparty in this archive.

ArchiveTrialBalanceRow-Input

NameTypeDescription
codeRequiredstring
creditRequirednumber | string
debitRequirednumber | string