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.
- GET
/v1/books/archiveExport everything the books hold - GET
/v1/books/autonomyMeasure how much of the books' work ran without a person - GET
/v1/books/checksList what the books check every day, and the thresholds - GET
/v1/books/digestRead this week's digest of the books - GET
/v1/books/readinessSay how ready a month is to close, area by area - POST
/v1/books/restoreRestore an archive into empty books
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
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 "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
| Name | Type | Description |
|---|---|---|
throughQuery | string or null | The last month to cover, as |
monthsQuery | integer | How many months to cover, ending with |
Response
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 "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
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 "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
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 "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
| Name | Type | Description |
|---|---|---|
periodQuery | string or null | The month, as |
Response
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 "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
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 -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.
| Name | Type | Description |
|---|---|---|
accountsRequired | array of ArchiveAccount | |
checksum | string or null | sha256 of everything else, as |
companyRequired | ArchiveCompany | |
counterpartiesRequired | array of ArchiveCounterparty | |
dimensionsRequired | array of ArchiveDimension | |
entriesRequired | array of ArchiveEntry-Output | In the order they were posted. |
exported_atRequired | string (date-time) | |
format | string | Always |
through_sequenceRequired | integer | The last posting sequence the archive holds; 0 for none. |
trial_balanceRequired | ArchiveTrialBalance-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. |
version | integer | The archive's shape. This API writes 1. |
BooksAutonomyOut
How much of the books' work ran without a person, month by month.
| Name | Type | Description |
|---|---|---|
monthsRequired | array of AutonomyMonthOut | One entry per month, oldest first. |
throughRequired | string | The last month covered, as |
BooksCheckList
| Name | Type | Description |
|---|---|---|
dataRequired | array of BooksCheckOut | |
every_hoursRequired | integer | How often the checks run over every set of books. |
BooksDigestOut
This week's digest, as the books stand now.
| Name | Type | Description |
|---|---|---|
autonomyRequired | DigestAutonomyOut | How much of last month ran without a person. |
current_monthRequired | DigestMonthOut | This month, so far. |
idRequired | string or null | An id that starts with |
previous_monthRequired | DigestMonthOut | Last month: closed, or how ready it is. |
reviewingRequired | array of DigestReviewingOut | The newest 5 of them. |
reviewing_countRequired | integer | Open findings of the daily books checks: what we are reviewing. |
runwayRequired | DigestRunwayOut | Cash and runway. |
sent_atRequired | string (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. |
timezoneRequired | string | The IANA time zone the week is read in: the company's ( |
weekRequired | string | The ISO week, as |
week_starts_onRequired | string (date) | The week's Monday. |
BooksReadinessOut
| Name | Type | Description |
|---|---|---|
amount_openRequired | string 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 |
areasRequired | array of ReadinessAreaOut | Each area of the books, always all nine, in the order a month shows them. |
blockersRequired | array of ReadinessBlockerOut | What stands in the way of the close: the same list the close screen shows. |
can_closeRequired | boolean | Whether closing the month would succeed without an override: exactly what the close screen says. |
currencyRequired | string | The books' currency, ISO 4217, that every amount is in. |
ends_onRequired | string (date) | The month's last day. |
needs_personRequired | integer | The sum of the counts of the areas in attention. |
percentRequired | string | How much of the month's work is done, 0 to 100 to one place: |
period_keyRequired | string | The month, as |
period_statusRequired | string |
|
starts_onRequired | string (date) | The month's first day. |
units_doneRequired | integer | Units of the month's work done. |
units_totalRequired | integer | 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.
| Name | Type | Description |
|---|---|---|
accountsRequired | array of ArchiveAccount | |
checksum | string or null | sha256 of everything else, as |
companyRequired | ArchiveCompany | |
counterpartiesRequired | array of ArchiveCounterparty | |
dimensionsRequired | array of ArchiveDimension | |
entriesRequired | array of ArchiveEntry-Input | In the order they were posted. |
exported_atRequired | string (date-time) | |
format | string | Always |
through_sequenceRequired | integer | The last posting sequence the archive holds; 0 for none. |
trial_balanceRequired | ArchiveTrialBalance-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. |
version | integer | The archive's shape. This API writes 1. |
RestoreOut
| Name | Type | Description |
|---|---|---|
accounts_createdRequired | integer | Accounts the archive had and these books did not. |
as_ofRequired | string (date) | The day the trial balance was compared on: the archive's last entry's. |
counterparties_createdRequired | integer | |
dimensions_createdRequired | integer | |
entriesRequired | integer | Entries written, reversals and replacements included. |
linesRequired | integer | |
total_creditsRequired | string | |
total_debitsRequired | string | The restored trial balance's debits, equal to the archive's. |
ArchiveAccount
| Name | Type | Description |
|---|---|---|
codeRequired | string | |
control_role | string or null |
|
currency | string or null | ISO 4217; null means the books' own. |
is_active | boolean | Default true |
is_postable | boolean | Default true |
nameRequired | string | |
parent_code | string or null | The header account it sits under. |
required_dimensions | array of string | Keys of the dimensions every line on it names. |
role | string or null | |
typeRequired | string |
|
ArchiveCompany
| Name | Type | Description |
|---|---|---|
books_start_on | string (date) or null | The first day the books cover, when one was set. |
currencyRequired | string | ISO 4217. A restore needs books in the same currency. |
fiscal_year_end_monthRequired | integer | 1–12: the month the fiscal year ends in. |
nameRequired | string | The name the books were kept under. |
ArchiveCounterparty
| Name | Type | Description |
|---|---|---|
country | string or null | |
default_account_code | string or null | |
email | string or null | |
is_customer | boolean | Default false |
is_vendor | boolean | Default false |
merged_into_ref | integer | string or null | The |
nameRequired | string | |
notes | string or null | |
payment_terms_days | integer or null | |
refRequired | integer | string | What lines in this archive call it by. |
region | string or null | |
roles | array of ArchivePartyRole | What they are to these books. An archive written before roles has none here, and |
slugRequired | string | |
tax_classification | string or null | |
tax_id | string or null | Whole only when the exporter holds |
w9_received_on | string (date) or null | |
website | string or null |
ArchiveDimension
| Name | Type | Description |
|---|---|---|
keyRequired | string | |
nameRequired | string | |
values | array of ArchiveDimensionValue |
ArchiveEntry-Output
| Name | Type | Description |
|---|---|---|
descriptionRequired | string | |
entry_dateRequired | string (date) | |
linesRequired | array of ArchiveLine-Output | |
memo | string or null | |
numberRequired | integer | Its number in the books it came from. |
posted_atRequired | string (date-time) | When it was posted in the books it came from. |
refRequired | integer | string | What reversals and replacements in this archive call it by. |
replaces_ref | integer | string or null | |
reverses_ref | integer | string or null | |
sourceRequired | string | What wrote it: |
statusRequired | string |
|
ArchiveTrialBalance-Output
| Name | Type | Description |
|---|---|---|
as_ofRequired | string (date) | |
rowsRequired | array of ArchiveTrialBalanceRow-Output | |
total_creditsRequired | string | |
total_debitsRequired | string |
AutonomyMonthOut
One month of the books' autonomy figures.
| Name | Type | Description |
|---|---|---|
accountant_interventionsRequired | integer | Interventions by an accountant of these books or by an accounting firm's staff. |
accountant_interventions_per_1000Required | string or null | Accountant interventions per 1,000 events, to one place; null when there are no events. |
ai_acceptance_rateRequired | string or null |
|
ai_approvedRequired | integer | The model's categories a person reviewed and kept. |
ai_correctedRequired | integer | The model's categories a person reviewed and changed. |
autonomousRequired | integer | 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_rateRequired | string or null |
|
ends_onRequired | string (date) | The month's last day. |
eventsRequired | integer | Economic events dated in the month: transactions, without authorisations, the excluded twin of a transfer or duplicate, and rows the provider removed. |
founder_interventionsRequired | integer | Interventions by an owner or admin of these books. |
founder_interventions_per_1000Required | string or null | Founder interventions per 1,000 events, to one place; null when there are no events. |
interventionsRequired | integer | 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_1000Required | string or null | Interventions per 1,000 events, to one place; null when there are no events. |
other_interventionsRequired | integer | Interventions by anyone else: members, viewers, people no longer in the books. |
period_keyRequired | string | The month, as |
questions_askedRequired | integer | Questions asked in the month (UTC). |
questions_removed_by_policyRequired | integer | Questions not sent in the month because a rule — often one an earlier answer wrote — already covered the transaction, and filed it. |
repeated_questionsRequired | integer | Of those, the ones about a transaction whose counterparty an earlier question, in any month, was already about. |
starts_onRequired | string (date) | The month's first day. |
BooksCheckOut
| Name | Type | Description |
|---|---|---|
ask_reasonRequired | string | Why an item it raises needs a person. needs_category, needs_receipt, needs_match, needs_business_intent, needs_approval, data_problem |
kindRequired | string | The check, named by the kind of Inbox item it raises: unusual_amount, stale_clearing, unmatched_transfer, possible_repeat, account_swing, missing_accrual |
thresholdsRequired | array of ThresholdOut | What a finding is held to. |
tolerableRequired | boolean | Whether a vendor's tolerance can widen it ( |
DigestAutonomyOut
| Name | Type | Description |
|---|---|---|
autonomousRequired | integer | Of those, the ones decided with no person. |
autonomous_rateRequired | string or null |
|
eventsRequired | integer | Economic events dated in the month. |
founder_interventions_per_1000Required | string or null | An owner's or admin's interventions per 1,000 events; null with no events. |
interventions_per_1000Required | string or null | A person's interventions per 1,000 events; null with no events. |
period_keyRequired | string | The month the figures are for: last month, which is complete. |
DigestMonthOut
| Name | Type | Description |
|---|---|---|
can_closeRequired | boolean | Whether closing the month would succeed without an override. |
closedRequired | boolean | True once the month is closed ( |
needs_personRequired | integer | Items in attention, whoever they wait on. |
needs_youRequired | integer | Of those, the ones only the business can answer: a question asked of it, a connection that needs it to sign in. |
percentRequired | string | How much of the month's work is done, 0 to 100 to one place, as |
period_keyRequired | string | The month, as |
period_statusRequired | string |
|
starts_onRequired | string (date) | The month's first day. |
DigestReviewingOut
| Name | Type | Description |
|---|---|---|
amountRequired | string or null | The figure that tripped it, when it has one. |
currencyRequired | string or null | That figure's currency. |
idRequired | string | The Inbox item the daily check raised. |
kindRequired | string | The check that found it: |
raised_atRequired | string (date-time) | When the check raised it. |
DigestRunwayOut
| Name | Type | Description |
|---|---|---|
as_ofRequired | string (date) | The day cash is read at: today on the company's clock. |
burningRequired | boolean | Whether the trailing net burn is above zero. |
cashRequired | string | Cash in the books' currency. |
currencyRequired | string | The books' currency, ISO 4217. |
runway_monthsRequired | string or null | Months of cash at that burn, to one place; null when the books are not burning cash. |
trailing_net_burnRequired | string or null | Average net burn of the last complete months (up to 3); null with no history. |
ReadinessAreaOut
| Name | Type | Description |
|---|---|---|
amountRequired | string or null | What is at stake, in the books' |
areaRequired | string |
|
countRequired | integer | How many items in it wait on a person: 0 when ready or not applicable. |
inbox_itemsRequired | integer | How many of |
inbox_ownerRequired | string or null | Whom the most pressing of those |
ownerRequired | string or null | Who the area falls to: |
stateRequired | string |
|
ReadinessBlockerOut
| Name | Type | Description |
|---|---|---|
countRequired | integer | How many of it: transactions, months, tasks, reviews or exceptions. |
kindRequired | string | What stands in the way of the close: |
severityRequired | string |
|
ArchiveEntry-Input
| Name | Type | Description |
|---|---|---|
descriptionRequired | string | |
entry_dateRequired | string (date) | |
linesRequired | array of ArchiveLine-Input | |
memo | string or null | |
numberRequired | integer | Its number in the books it came from. |
posted_atRequired | string (date-time) | When it was posted in the books it came from. |
refRequired | integer | string | What reversals and replacements in this archive call it by. |
replaces_ref | integer | string or null | |
reverses_ref | integer | string or null | |
sourceRequired | string | What wrote it: |
statusRequired | string |
|
ArchiveTrialBalance-Input
| Name | Type | Description |
|---|---|---|
as_ofRequired | string (date) | |
rowsRequired | array of ArchiveTrialBalanceRow-Input | |
total_creditsRequired | number | string | |
total_debitsRequired | number | string |
ArchivePartyRole
| Name | Type | Description |
|---|---|---|
form_1099_category | string or null | |
is_1099_eligible | boolean | Default false |
roleRequired | string | customer, vendor, employee, investor, lender or founder. |
ArchiveDimensionValue
| Name | Type | Description |
|---|---|---|
codeRequired | string | |
nameRequired | string | |
parent_code | string or null |
ArchiveLine-Output
| Name | Type | Description |
|---|---|---|
account_codeRequired | string | |
amountRequired | string | Unsigned; |
dimensions | map of string | Dimension key → value code. |
directionRequired | string | One of debit, credit |
memo | string or null | |
party_ref | integer | string or null | The |
ArchiveTrialBalanceRow-Output
| Name | Type | Description |
|---|---|---|
codeRequired | string | |
creditRequired | string | |
debitRequired | string |
ThresholdOut
| Name | Type | Description |
|---|---|---|
nameRequired | string | What it measures, such as |
valueRequired | string | Its default, before any vendor's tolerance widens it. |
ArchiveLine-Input
| Name | Type | Description |
|---|---|---|
account_codeRequired | string | |
amountRequired | number | string | Unsigned; |
dimensions | map of string | Dimension key → value code. |
directionRequired | string | One of debit, credit |
memo | string or null | |
party_ref | integer | string or null | The |
ArchiveTrialBalanceRow-Input
| Name | Type | Description |
|---|---|---|
codeRequired | string | |
creditRequired | number | string | |
debitRequired | number | string |