API reference
Transactions
Money that moved at a bank, card or processor, and what it was filed as.
- GET
/v1/transactionsList transactions - POST
/v1/transactions/categorizeFile several transactions under one GL account - GET
/v1/transactions/{event_id}Get a transaction with its raw source data - PATCH
/v1/transactions/{event_id}Rename a transaction, move its date or keep a note with it - GET
/v1/transactions/{event_id}/capital_optionsList what a transaction could be as owner or financing money - POST
/v1/transactions/{event_id}/capitalizeCapitalize a purchase as a fixed asset - POST
/v1/transactions/{event_id}/cash_linkLink a transaction to the financing or intercompany entry that holds its cash - GET
/v1/transactions/{event_id}/categorizationsList every decision about what a transaction is - POST
/v1/transactions/{event_id}/categorizeFile a transaction to an account - POST
/v1/transactions/{event_id}/counterpartySay who a transaction is with - POST
/v1/transactions/{event_id}/dimensionsSay which department a transaction is for - POST
/v1/transactions/{event_id}/excludeExclude a transaction from the books - POST
/v1/transactions/{event_id}/matchMatch two transactions as one transfer - GET
/v1/transactions/{event_id}/match_candidatesList what a transaction could be matched to as a transfer - POST
/v1/transactions/{event_id}/owner_moneyFile a transaction as money between the company and its owners - GET
/v1/transactions/{event_id}/receiptsGet a transaction's receipts, checked, with the ones that might be its - POST
/v1/transactions/{event_id}/reopenSend a transaction back to review - POST
/v1/transactions/{event_id}/settleSay a transaction pays open invoices or bills - GET
/v1/transactions/{event_id}/settlementSee which invoices or bills a transaction pays, or could - POST
/v1/transactions/{event_id}/splitFile a transaction across several GL accounts - GET
/v1/transactions/{event_id}/suggestionsList the accounts a transaction probably belongs in - POST
/v1/transactions/{event_id}/transferFile a transaction as a transfer from an account that is not connected - POST
/v1/transactions/{event_id}/unmatchUndo a transaction's match
Guides: Review and file transactions
List transactions
GET/v1/transactions
client.transactions.list()
Transactions from every bank, card, processor and statement, newest
first, with what each was filed to or matched with. Filter by status for
the review queue, or by kind for the transfers.
Parameters
| Name | Type | Description |
|---|---|---|
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
statusQuery | array of string or null | Any of needs_review, ready, posted, excluded. Repeat it to match several: the review queue is |
account_idQuery | string or null | An id that starts with |
counterparty_idQuery | string or null | An id that starts with |
category_account_idQuery | string or null | An id that starts with |
rule_idQuery | string or null | An id that starts with |
qQuery | string or null | Only transactions whose description contains this, ignoring case. |
sinceQuery | string (date) or null | |
untilQuery | string (date) or null | |
kindQuery | transfer or null |
|
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/transactions" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"File several transactions under one GL account
POST/v1/transactions/categorize· Idempotent
client.transactions.categorizeMany()
File several transactions under one account, as a person, in one request.
Each is filed exactly as transactions.categorize files one, and judged
on its own: one that cannot be filed there (the wrong side of the income
statement, a closed month, a matched twin, not in these books) is left as
it was and named in refused with the code it would have had alone,
while the rest are filed. The whole request shares one request id on the
audit trail.
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/categorize" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"category_account_id":"…","event_ids":["…"]}'Get a transaction with its raw source data
GET/v1/transactions/{event_id}
client.transactions.get()
One transaction, with the raw row its source sent and every record the source keeps about it (a card program's expense: approval, category, spender, original currency, a link), each with its past readings. What to look at when a figure seems wrong.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts 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/transactions/{event_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Rename a transaction, move its date or keep a note with it
PATCH/v1/transactions/{event_id}· Idempotent
client.transactions.update()
Correct a transaction: rename it, move its date or keep a note with it.
What the source sent is kept as it was (source_description and the raw
data); this changes what these books call it. A rename or a note changes
nothing in the books: an entry already posted keeps the words it was
posted with, and a note is the memo of the entry it posts next. A new
date on a transaction in the books posts it again on that day, by
reversing its entry in the old month, so the correction is on the
record. Refused, with the books left as they were: period_closed while
either month is closed, transaction_spread for one a schedule spreads,
transaction_settles for one that pays invoices or bills,
transaction_reconciled for one matched to a bank statement, and
transaction_not_reposted when it would not post on the new day.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X PATCH "https://api.ledgerit.ai/v1/transactions/{event_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'List what a transaction could be as owner or financing money
GET/v1/transactions/{event_id}/capital_options
client.transactions.listCapitalOptions()
What a transaction may be as money between the company and those who
fund it, best first (decision 0191): a financing instrument's or an
intercompany transaction's entry already in the books for its amount,
the expected way, within a week (financing, intercompany); a draft
instrument it would issue (financing_draft); intercompany with another
company of the organization you can post in (new_intercompany); and
each purpose the company's owners have (capital): for a corporation a
loan from a shareholder, a stock purchase or a capital contribution
coming in, and a loan repaid or a dividend going out. Each carries a
deterministic score and its reasons: the instrument's investor named, a
founder or investor the books know, the payee filed for it before, the
shareholder loan outstanding. Nothing is filed until one is chosen.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts 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/transactions/{event_id}/capital_options" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Capitalize a purchase as a fixed asset
POST/v1/transactions/{event_id}/capitalize· Idempotent
client.transactions.capitalize()
Capitalize a purchase: file the transaction to an asset account and put the equipment it bought in the fixed asset register, in one step.
Buying a laptop is not an expense; it swaps cash for an asset, which the
closes then depreciate (decision 0180). The transaction is filed to the
asset account (1600 Computer equipment unless another is named) and
posted; the asset costs what the transaction moved and names it
(fixed_asset_id), and its depreciation carries the department named, or
the transaction's own. A transaction already in the books is re-filed by
reversing its entry, as filing does.
Refused with account_not_usable for anything but money spent or an
account that is not an asset, fixed_asset_terms for terms the register
refuses, a charge in another currency than the books' or one that cannot
post yet (a card hold), and transaction_capitalized for one already
capitalized.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/capitalize" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Link a transaction to the financing or intercompany entry that holds its cash
POST/v1/transactions/{event_id}/cash_link· Idempotent
client.transactions.linkCash()
Say a transaction is the bank's side of a financing instrument or an intercompany amount, so its cash is in the books once (decision 0191).
Name the entry that already holds its cash, a draft instrument to issue
from it, or another company of the organization to record it as
intercompany with (both sets of books are posted, and the other side's
bank transaction is linked too when exactly one fits; otherwise the
other side's cash waits in its Cash in transit). When the entry moved
the transaction's own account the transaction is excluded as its
evidence; when it moved another (Cash in transit, or a cash account the
bank does not feed) the transaction is posted as a transfer from that
account. A transaction already filed is taken apart by reversal first.
Undone by transactions.unmatch, which leaves the entry in the books.
Refused with cash_link_not_possible when the transaction is not plain
money in or out, a hold or matched; the entry is another amount, the
other way or more than a week away, or already has its transaction; the
draft is not this deposit's; or the other company is not one you can
post in, or keeps another currency. period_closed when a month that
would change is closed.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/cash_link" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'List every decision about what a transaction is
GET/v1/transactions/{event_id}/categorizations
client.transactions.listCategorizations()
Every decision about what a transaction is, newest first: which account, by whom (a default, a rule, the model, a person), how sure, and why. The first is the one standing.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
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/transactions/{event_id}/categorizations" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"File a transaction to an account
POST/v1/transactions/{event_id}/categorize· Idempotent
client.transactions.categorize()
File a transaction under an account, as a person.
Refused with account_not_usable if the account is on the wrong side of the
income statement — see app/finance/sides.py for why that is not negotiable.
A transaction already in the books is re-filed by reversing its entry and
posting it again under the new account, so the correction is on the record.
That is refused with period_closed while its month is closed.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/categorize" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"category_account_id":"…"}'Say who a transaction is with
POST/v1/transactions/{event_id}/counterparty
client.transactions.setCounterparty()
Say who a transaction is with, or that nobody is named.
It changes who the transaction is attributed to and nothing in the books:
the GL account it is filed to stays. The one case that is refused is a
posted transaction whose entry carries its counterparty on a receivable,
payable or clearing line (counterparty_on_control_line); file it again
to change that, so the correction is an entry of its own.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/counterparty" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"counterparty_id":"…"}'Say which department a transaction is for
POST/v1/transactions/{event_id}/dimensions· Idempotent
client.transactions.setDimensions()
Say which department, and which value of any other dimension, a transaction is for.
The values go on the lines it posts to the accounts it is filed to, so
spend by department and the P&L by function count it where it belongs,
and a schedule spreading it takes each month's share out with them. A
transaction already in the books is posted again with them, by reversing
its entry, so the change is on the record; that is refused with
period_closed while its month is closed. A spread transaction keeps its
values (transaction_spread): delete its schedule first.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/dimensions" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"dimensions":[{"dimension_id":"…","value_id":"…"}]}'Exclude a transaction from the books
POST/v1/transactions/{event_id}/exclude
client.transactions.exclude()
Keep a transaction out of the books, on the record.
Only possible before it posts. An excluded transaction that is already in the books has to be reversed instead, because removing it would edit history.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/exclude" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason":"…"}'Match two transactions as one transfer
POST/v1/transactions/{event_id}/match· Idempotent
client.transactions.match()
Say two transactions are the two halves of one transfer between these books' own accounts, as a person.
For what the automatic matcher leaves alone on purpose: two candidates
for one row, or halves dated further apart than it looks. The outgoing
half posts once as a transfer; the incoming half is kept out of the books
as its evidence, pointing at it. The transfer is in the books at once, so
a wrong match is corrected the way any posted entry is: by reversing its
journal entry, or by transactions.unmatch, which reverses it.
The transaction named in the path may already be a transfer, half of
another match, or posted under an account: that is taken apart by
reversal first (decision 0189). Refused with match_not_possible when
the two are not a pair the books can post: the other is already matched,
posted, excluded or a hold; either is a hold; they are on the same
account or move the same way; or the amounts differ.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/match" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"other_event_id":"…"}'List what a transaction could be matched to as a transfer
GET/v1/transactions/{event_id}/match_candidates
client.transactions.listMatchCandidates()
What a transaction could be matched to by hand: the same amount to
the cent on another of these books' accounts, moving the other way, not
yet in the books and not matched to anything. Unlike the automatic
matcher, no limit on how far apart the two are dated. A transaction that
is already a transfer, half of one, or posted under an account is read
as the row it becomes once transactions.match takes it apart.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts 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/transactions/{event_id}/match_candidates" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"File a transaction as money between the company and its owners
POST/v1/transactions/{event_id}/owner_money· Idempotent
client.transactions.fileAsOwnerMoney()
File a transaction as money between the company and its owners, and post it (decision 0191).
Not income and not a transfer: a founder's wire with no shares issued
and no note is, for a corporation, a loan from a shareholder until a
document says otherwise. Each purpose files to one account, opened the
first time it is needed; which purposes there are follows the company's
legal structure (transactions.list_capital_options). A transaction
already in the books is filed again by reversal, as filing does; the
filing is taken back by transactions.reopen or by filing it elsewhere.
A SAFE, note or venture debt is not filed here: its cash is linked to its
instrument (transactions.link_cash).
Refused with account_not_usable for a purpose these owners do not
have or money moving the other way, a fee, interest, refund or hold;
chart_conflict when the account's code is used for something else;
period_closed when it is in the books in a closed month.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/owner_money" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"purpose":"owner_loan"}'Get a transaction's receipts, checked, with the ones that might be its
GET/v1/transactions/{event_id}/receipts
client.transactions.receipts()
A transaction's receipts, each checked against it; while it has none, the unclaimed receipts that might be its; and the address a receipt is forwarded to.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts 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/transactions/{event_id}/receipts" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Send a transaction back to review
POST/v1/transactions/{event_id}/reopen· Idempotent
client.transactions.reopen()
Send a filed transaction back to review: the way to take a filing back.
A transaction in the books comes out of them by reversal, so the
correction is on the record; that is refused with period_closed while
its month is closed. A person's filing is taken back and the suggestion
that stood before it — a rule's, the model's or the suspense default —
is restored with its confidence, so the queue reads as it did before the
decision. A rule's or the model's own filing keeps its account and waits
for a person. Refused with event_not_reopenable for an excluded
transaction or one nobody has decided; a card hold a person filed, still
waiting for its charge, can be sent back. With post, a rule's or a
gate-clearing model's decision that is restored is posted again as
theirs: the undo of a person's re-filing. To file it again,
transactions.categorize.
A transfer goes back as the plain income or expense row it was, out of
the books by reversal (decision 0189); either half of a transfer match
takes its partner back to review with it, as transactions.unmatch does.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/reopen" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Say a transaction pays open invoices or bills
POST/v1/transactions/{event_id}/settle· Idempotent
client.transactions.settle()
Say a bank or card transaction pays open invoices or bills.
Money in pays a customer's issued invoices, money out a vendor's
approved bills. The transaction is filed under the receivable or the
payable, naming the party, and posted as itself on its own day, so the
invoices read paid and the sale is counted once. A transaction already
in the books is reversed and posted again, refused with period_closed
while its month is closed. Refused with settlement_not_possible for a
transaction that pays nothing (a transfer, a fee, a refund, a hold, a
matched or kept-out row) or already pays something, and with
settlement_invalid when the documents are not one party's open ones or
come to more than the transaction or a document has left.
To undo it, send the transaction back to review
(transactions.reopen): what it paid is owed again.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/settle" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"parts":[{"amount":0}]}'See which invoices or bills a transaction pays, or could
GET/v1/transactions/{event_id}/settlement
client.transactions.getSettlement()
What a bank or card transaction pays among the open invoices (money in) or bills (money out), or could: the documents whose number its description names; else, when it names its party, that party's one document for exactly the amount or all of its open documents when they add up to it; else every document for exactly the amount. A transaction whose description names exactly one of them and that pays exactly what is left on it is settled by LedgerIt at sync.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts 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/transactions/{event_id}/settlement" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"File a transaction across several GL accounts
POST/v1/transactions/{event_id}/split· Idempotent
client.transactions.split()
File one transaction across several GL accounts, as a person: a payroll run that is wages, taxes and benefits; a payout that is revenue less fees.
Refused with splits_unbalanced unless the parts add up to the
transaction's amount exactly, and with account_not_usable for a part on
the wrong side of the income statement. Sending a new split replaces the
one that stands. To undo a split, file the transaction under one account
(transactions.categorize).
A transaction already in the books is split by reversing its entry and
posting it again, so the correction is on the record. That is refused
with period_closed while its month is closed.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/split" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"parts":[{"amount":0,"category_account_id":"…"}]}'List the accounts a transaction probably belongs in
GET/v1/transactions/{event_id}/suggestions
client.transactions.listSuggestions()
The accounts a transaction probably belongs in, best first: what
people proposed for it in comments still open, then the default account
of its counterparty when one is set, then where a person or a rule
filed the same payee before, most often first, then the
account the model proposed for it, with its confidence and reasoning.
Only income and expense accounts open for filing are suggested, never
suspense. Nothing is filed until one is chosen through
transactions.categorize.
transfers names the transfers between the books' own accounts it
probably is: a row that could be its other half (match, ranked when
there are several, which the automatic matcher leaves alone), an own
account money moved to or from before (transfer_account), and, for a
row naming the company itself or that the model read as a transfer,
Cash in transit (in_transit). Each has a deterministic score and its
reasons; one the model read carries its words (model_reasoning).
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts 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/transactions/{event_id}/suggestions" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"File a transaction as a transfer from an account that is not connected
POST/v1/transactions/{event_id}/transfer· Idempotent
client.transactions.fileAsTransfer()
File a transaction as a transfer between the books' own accounts when its other half is not in LedgerIt: money from or to an account that is not connected.
Nothing was earned or spent, so it files under no income or expense
account. It posts at once between its own account and the account named,
the way the money moved: an arrival debits its own account. A transfer
whose other half IS in LedgerIt is matched to it instead
(transactions.match).
A transaction already in the books is filed again by reversal (decision 0189): one posted under an account, or a transfer to change its other account. Either half of a match is taken apart first, its partner back to review.
Refused with transfer_not_possible when the transaction is excluded or
a hold, is a fee, interest or a refund, or the account named is not one
of these books' own cash, card or other asset or liability accounts in
its currency; with period_closed when it is in the books in a closed
month.
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/transfer" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Undo a transaction's match
POST/v1/transactions/{event_id}/unmatch
client.transactions.unmatch()
Undo a transfer, duplicate or refund match that is wrong, or a link to the financing or intercompany entry holding a transaction's cash.
Each row involved goes back to needing review, and is not matched again
automatically. A transfer match already in the books is undone by
reversal (decision 0189): the half that posted for the pair comes out of
the books by a reversing entry, refused with period_closed while its
month is closed; a half that is a transfer on its own (filed against Cash
in transit) keeps its entry. Refused with match_not_undoable for a
duplicate or refund match once it is in the books, and for an
authorisation, which is one transaction with its settlement rather than
a judgement. A link is undone by reversing what the transaction posted
for it, if anything; the entry stays, and the transaction goes back to
review, never linked again on its own (decision 0191).
Parameters
| Name | Type | Description |
|---|---|---|
event_idPath · Required | string | An id that starts with |
Request body
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 -X POST "https://api.ledgerit.ai/v1/transactions/{event_id}/unmatch" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason":"…"}'Objects
The objects these operations take and return.
TransactionPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of TransactionOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
CategorizeMany
| Name | Type | Description |
|---|---|---|
category_account_idRequired | string | The GL account all of them are filed to. |
event_idsRequired | array of string | The transactions to file, each at most once. |
note | string or null | |
post | boolean | Default true |
CategorizeManyOut
| Name | Type | Description |
|---|---|---|
filedRequired | array of TransactionOut | The transactions filed, as they now stand. |
refusedRequired | array of FilingRefusal | The ones left as they were. One refusal does not stop the rest. |
TransactionDetailOut
One transaction with everything its sources said about it.
| Name | Type | Description |
|---|---|---|
account_idRequired | string | An id that starts with |
account_mask | string or null | The last digits of the bank account or card it moved on, as its provider prints them; null when no provider reported it. Kept apart from |
account_nameRequired | string | |
amountRequired | string | |
capital_purpose | string or null | What a person filed it as, when it is money between the company and its owners ( owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution |
cash_entry_id | string or null | An id that starts with |
cash_link_name | string or null | The instrument's name, or the other company's, for the entry it stands for. |
category_account_idRequired | string or null | An id that starts with |
category_codeRequired | string or null | |
category_confidenceRequired | string or null | |
category_nameRequired | string or null | |
category_rationaleRequired | object or null | |
category_sourceRequired | string | |
counterparty_idRequired | string or null | An id that starts with |
counterparty_logo_url | string or null | The counterparty's logo, square PNG; null for none. |
counterparty_nameRequired | string or null | |
currencyRequired | string | |
descriptionRequired | string | |
dimensions | array of LineDimensionOut | Its department and other dimension values, carried onto the lines it posts to the accounts it is filed to ( |
direction | string or null | Which way the money moved on |
documentsRequired | array of DocumentOut | |
event_dateRequired | string (date) | |
event_typeRequired | string | |
financing_instrument_id | string or null | An id that starts with |
fixed_asset_id | string or null | An id that starts with |
idRequired | string | An id that starts with |
intercompany_transaction_id | string or null | An id that starts with |
journal_entry_idRequired | string or null | An id that starts with |
match_kindRequired | string or null | |
matched_event_idRequired | string or null | An id that starts with |
note | string or null | A note a person kept with it ( |
open_proposals | integer | How many unresolved comments propose a GL account for it. Counted when transactions are listed; 0 elsewhere. |
other_account_code | string or null | The other account's code; null when there is none. |
other_account_id | string or null | An id that starts with |
other_account_name | string or null | The other account's name; null when there is none. |
pendingRequired | boolean | |
received_atRequired | string (date-time) or null | When the row was first received. |
refund_of_event_idRequired | string or null | An id that starts with |
reviewed_atRequired | string (date-time) or null | |
schedule_id | string or null | An id that starts with |
sourceRequired | string or null | |
source_descriptionRequired | string or null | |
source_payloadRequired | object or null | The row exactly as the source first sent it. Never edited. |
source_recordsRequired | array of SourceRecordOut | |
source_refRequired | string or null | The source's own id for the row. |
source_row | SourceRowOut or null | The row as its source sent it; null for one a person entered. |
splits | array of SplitOut | The GL accounts it is split across, each with its share. Empty when one account carries it ( |
statusRequired | string |
TransactionChanges
Only the fields sent change. description and event_date are typed
without null and default to None only so that leaving one out means
"unchanged"; note is cleared by sending null.
| Name | Type | Description |
|---|---|---|
description | string | What it is called in these books. The source's own words stay in |
event_date | string (date) | The day it happened. A transaction in the books is posted again on the new day by reversing its entry, so the correction is on the record; refused with |
note | string or null | A note kept with it; null to clear it. |
TransactionOut
| Name | Type | Description |
|---|---|---|
account_idRequired | string | An id that starts with |
account_mask | string or null | The last digits of the bank account or card it moved on, as its provider prints them; null when no provider reported it. Kept apart from |
account_nameRequired | string | |
amountRequired | string | |
capital_purpose | string or null | What a person filed it as, when it is money between the company and its owners ( owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution |
cash_entry_id | string or null | An id that starts with |
cash_link_name | string or null | The instrument's name, or the other company's, for the entry it stands for. |
category_account_idRequired | string or null | An id that starts with |
category_codeRequired | string or null | |
category_confidenceRequired | string or null | |
category_nameRequired | string or null | |
category_rationaleRequired | object or null | |
category_sourceRequired | string | |
counterparty_idRequired | string or null | An id that starts with |
counterparty_logo_url | string or null | The counterparty's logo, square PNG; null for none. |
counterparty_nameRequired | string or null | |
currencyRequired | string | |
descriptionRequired | string | |
dimensions | array of LineDimensionOut | Its department and other dimension values, carried onto the lines it posts to the accounts it is filed to ( |
direction | string or null | Which way the money moved on |
documentsRequired | array of DocumentOut | |
event_dateRequired | string (date) | |
event_typeRequired | string | |
financing_instrument_id | string or null | An id that starts with |
fixed_asset_id | string or null | An id that starts with |
idRequired | string | An id that starts with |
intercompany_transaction_id | string or null | An id that starts with |
journal_entry_idRequired | string or null | An id that starts with |
match_kindRequired | string or null | |
matched_event_idRequired | string or null | An id that starts with |
note | string or null | A note a person kept with it ( |
open_proposals | integer | How many unresolved comments propose a GL account for it. Counted when transactions are listed; 0 elsewhere. |
other_account_code | string or null | The other account's code; null when there is none. |
other_account_id | string or null | An id that starts with |
other_account_name | string or null | The other account's name; null when there is none. |
pendingRequired | boolean | |
refund_of_event_idRequired | string or null | An id that starts with |
reviewed_atRequired | string (date-time) or null | |
schedule_id | string or null | An id that starts with |
sourceRequired | string or null | |
source_descriptionRequired | string or null | |
splits | array of SplitOut | The GL accounts it is split across, each with its share. Empty when one account carries it ( |
statusRequired | string |
CapitalOptionList
| Name | Type | Description |
|---|---|---|
dataRequired | array of CapitalOptionOut | Best first. Empty when the transaction cannot be one: not plain money in or out, a hold, or matched. |
ownershipRequired | string | Who owns the company, as its legal structure says: shareholders, members, owner |
Capitalize
Equipment bought with this transaction, and how it depreciates.
| Name | Type | Description |
|---|---|---|
asset_account_id | string or null | An id that starts with |
department_value_id | string or null | An id that starts with |
name | string or null | What it is, e.g. |
note | string or null | Why, kept on the filing and in the audit trail. |
placed_in_service_on | string (date) or null | The day it went into use; the transaction's date when left out. |
salvage_value | number | string | What it will be worth at the end; less than its cost. |
useful_life_months | integer | How many months it lasts; 36, a laptop's, when left out. |
LinkCash
| Name | Type | Description |
|---|---|---|
counterparty_entity_id | string or null | An id that starts with |
entry_id | string or null | An id that starts with |
financing_instrument_id | string or null | An id that starts with |
note | string or null | Why, kept in the audit trail. |
CategorizationPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of CategorizationOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
Categorize
| Name | Type | Description |
|---|---|---|
category_account_idRequired | string | An id that starts with |
note | string or null | |
post | boolean | Default true |
SetCounterparty
| Name | Type | Description |
|---|---|---|
counterparty_idRequired | string or null | An id that starts with |
SetDimensions
| Name | Type | Description |
|---|---|---|
dimensionsRequired | array of LineDimensionIn | Every value it is to name, at most one per dimension; the ones left out are taken off, and an empty list clears them. Refused with |
Exclude
| Name | Type | Description |
|---|---|---|
reasonRequired | string |
Match
| Name | Type | Description |
|---|---|---|
other_event_idRequired | string | The other half: a transaction from |
MatchCandidatesOut
| Name | Type | Description |
|---|---|---|
dataRequired | array of TransactionOut | The transactions this one could be paired with as the other half of a transfer, nearest in date first. Empty when it cannot be paired. |
OwnerMoney
| Name | Type | Description |
|---|---|---|
note | string or null | Why, kept on the filing. |
purposeRequired | string | What it is, as the company's owners have it ( owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution |
TransactionReceiptsOut
| Name | Type | Description |
|---|---|---|
documentsRequired | array of ReceiptEvidenceOut | The receipts and invoices it has, oldest first. |
forward_addressRequired | string or null | The address receipts are forwarded to. Null for a caller who may not attach receipts, or where this deployment does not receive email. |
suggestionsRequired | array of ReceiptSuggestionOut | While it has no receipt: unclaimed receipts that might be its, likeliest first, at most five. Empty once it has one. |
transaction_idRequired | string | An id that starts with |
wantedRequired | boolean | Whether the books are waiting for this transaction's receipt: an open |
Reopen
| Name | Type | Description |
|---|---|---|
post | boolean | Undo a person's filing rather than ask for review: when the decision that stood before it is one the books post on their own (a rule's, or a model proposal that cleared every gate), post it again as that decision. Otherwise ignored. |
reason | string or null | Why it goes back, for the trail. Optional: undoing a misclick needs no essay. |
Settle
| Name | Type | Description |
|---|---|---|
note | string or null | Kept with the filing. |
partsRequired | array of SettlePart | What it pays: one party's invoices, or one party's bills, each for an amount, together no more than the transaction moved. What is left is the party's unapplied cash. |
SettlementOut
| Name | Type | Description |
|---|---|---|
paysRequired | array of SettlementPartOut | The invoices or bills the transaction pays now; empty when it pays none. |
proposalsRequired | array of SettlementProposalOut | What the transaction could pay, best first; empty once it pays something, or for one that pays nothing (a transfer, a fee, a refund, a hold). |
settled_by_ledgeritRequired | boolean | Whether LedgerIt settled it without asking, because its description names exactly one open invoice or bill and it pays exactly what was left on it. Sending the transaction back to review undoes it, and LedgerIt then asks instead. |
unappliedRequired | string | What of a settled transaction pays nothing yet: the party's unapplied cash. |
Split
| Name | Type | Description |
|---|---|---|
note | string or null | |
partsRequired | array of SplitPart | The accounts and amounts; they add up to the transaction's amount exactly. |
post | boolean | Default true |
AccountSuggestionList
| Name | Type | Description |
|---|---|---|
dataRequired | array of AccountSuggestionOut | Best first; at most 3. Empty when there is nothing to go on. |
transfers | array of TransferSuggestionOut | The transfers it probably is, best first. Empty when it is unlikely to be one, is already one, or is decided. |
FileAsTransfer
| Name | Type | Description |
|---|---|---|
other_account_id | string or null | An id that starts with |
Unmatch
| Name | Type | Description |
|---|---|---|
reasonRequired | string |
FilingRefusal
A transaction a bulk filing left as it was, and why.
| Name | Type | Description |
|---|---|---|
codeRequired | string | The same code filing it alone would be refused with. |
event_idRequired | string | An id that starts with |
messageRequired | string |
LineDimensionOut
| Name | Type | Description |
|---|---|---|
dimension_idRequired | string | An id that starts with |
dimension_keyRequired | string | The dimension's key, e.g. |
dimension_nameRequired | string | |
value_codeRequired | string | |
value_idRequired | string | An id that starts with |
value_nameRequired | string |
DocumentOut
| Name | Type | Description |
|---|---|---|
content_typeRequired | string or null | |
created_atRequired | string (date-time) | |
idRequired | string | An id that starts with |
kindRequired | string | |
sourceRequired | string | |
storedRequired | boolean | |
urlRequired | string or null |
SourceRecordOut
What the source knows about the transaction beyond the transaction itself — a card program's expense.
| Name | Type | Description |
|---|---|---|
categoryRequired | string or null | The source's category, verbatim. |
external_urlRequired | string or null | Where to see it in the source's own product. |
first_seen_atRequired | string (date-time) | |
idRequired | string | An id that starts with |
is_approvedRequired | boolean or null | Whether the source approved the spend; null when it does not say. |
kindRequired | string | What it is at the source, such as |
last_seen_atRequired | string (date-time) | |
original_amountRequired | string or null | What it cost in the currency it was bought in, when that is not the billing currency. |
original_currencyRequired | string or null | |
payloadRequired | object | The latest reading, verbatim. |
sourceRequired | string | The connector it came from, such as |
source_refRequired | string | The source's own id for it. |
spenderRequired | string or null | Who spent it, by name. |
spender_user_id | string or null | An id that starts with |
statusRequired | string or null | The source's own word for its state, verbatim. |
versionsRequired | array of SourceRecordVersionOut | Distinct readings, newest first; at most 20. |
SourceRowOut
The row as the provider sent it, in its own words and on its own account, before the books named, filed or matched it.
| Name | Type | Description |
|---|---|---|
accountRequired | SourceAccountRef or null | The provider's account it came from; null for a file upload. |
amountRequired | string | Signed as its connector read it: negative is money out of the account. The provider's own figure and sign are in |
batch_idRequired | string | The import that brought it in. |
batch_labelRequired | string or null | That import's name: the sync run or the file. |
currencyRequired | string | |
descriptionRequired | string | The provider's description, verbatim. |
factsRequired | array of SourceFactOut | What the provider said beyond the row's own fields: when it was authorized, how it was paid, the provider's category and the parties it named. Empty for a provider LedgerIt does not read them from. |
posted_dateRequired | string (date) or null | When it posted, when the provider says. |
received_atRequired | string (date-time) | When it was first received. |
statusRequired | string or null | The provider's word for its state, verbatim. |
txn_dateRequired | string (date) | The date the provider gave it. |
SplitOut
One part of a split transaction.
| Name | Type | Description |
|---|---|---|
amountRequired | string | This part's share of the transaction's amount. |
category_account_idRequired | string | An id that starts with |
category_codeRequired | string | |
category_nameRequired | string | |
memoRequired | string or null |
CapitalOptionOut
One thing a transaction may be as money between the company and those who fund it, and what picking it does.
| Name | Type | Description |
|---|---|---|
account_code | string or null | |
account_id | string or null | An id that starts with |
account_name | string or null | |
counterparty_entity_id | string or null | An id that starts with |
counterparty_entity_name | string or null | |
entry_date | string (date) or null | The entry's date, or the draft's issue date. |
entry_id | string or null | An id that starts with |
financing_kind | string or null |
issued, repaid |
instrument_id | string or null | An id that starts with |
instrument_name | string or null | |
intercompany_transaction_id | string or null | An id that starts with |
kindRequired | string |
capital, financing, financing_draft, intercompany, new_intercompany |
party_id | string or null | An id that starts with |
party_name | string or null | |
purpose | string or null |
owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution |
reasonsRequired | array of SuggestionReasonOut | Why it is suggested; empty when nothing points at it. |
scoreRequired | string | 0 to 1, deterministic. An entry already in the books for its amount scores highest: filing the transaction anywhere else counts that cash twice. 0 when nothing points at it; it is listed all the same. |
CategorizationOut
| Name | Type | Description |
|---|---|---|
account_code | string or null | That account's code. |
account_idRequired | string or null | An id that starts with |
account_name | string or null | That account's name. |
confidenceRequired | string or null | |
currentRequired | boolean | Whether this is the decision that stands. |
decided_byRequired | string | One of default, rule, model, human |
dimensions | array of LineDimensionOut | The department and other dimension values it named, as they stood; empty when none. |
idRequired | string | An id that starts with |
party_idRequired | string or null | An id that starts with |
party_name | string or null | That counterparty's name today; null when none or gone. |
rationaleRequired | object or null | Why: the rule, the model's words, or the person. |
reasonRequired | FilingReasonOut | The same, as its kind and the parts to show. |
recorded_atRequired | string (date-time) | |
splits | array of CategorizedSplitOut | The parts it was split into, as they stood; empty when filed whole. |
versionRequired | integer | 1 for the first decision, counting up. |
LineDimensionIn
| Name | Type | Description |
|---|---|---|
dimension_idRequired | string | An id that starts with |
value_idRequired | string | A value of that dimension. |
ReceiptEvidenceOut
A receipt the transaction has, with what was read off it checked against what the transaction records.
| Name | Type | Description |
|---|---|---|
currencyRequired | string | The receipt's currency against the transaction's: |
dateRequired | string | The receipt's date against the transaction's, within a week: |
differenceRequired | string or null | The receipt's total less the transaction's amount, when they differ in the same currency; null otherwise. |
documentRequired | DocumentRecordOut | |
totalRequired | string | The receipt's total against the amount: |
ReceiptSuggestionOut
A receipt no transaction has claimed that might be this one's.
| Name | Type | Description |
|---|---|---|
documentRequired | DocumentRecordOut | |
reasonsRequired | array of string | Why it is suggested, strongest first: |
SettlePart
| Name | Type | Description |
|---|---|---|
amountRequired | number | string | How much of the transaction pays it. |
bill_id | string or null | An id that starts with |
invoice_id | string or null | An id that starts with |
SettlementPartOut
| Name | Type | Description |
|---|---|---|
amountRequired | string | How much of the transaction pays it, in the books' currency. |
bill_idRequired | string or null | An id that starts with |
invoice_idRequired | string or null | An id that starts with |
numberRequired | string | The invoice's number, or the vendor's number on the bill. |
SettlementProposalOut
| Name | Type | Description |
|---|---|---|
partsRequired | array of SettlementPartOut | What it would pay, oldest first. |
party_idRequired | string | The customer or vendor whose documents they are. |
party_nameRequired | string | |
reasonRequired | string | Why the books propose it: |
SplitPart
| Name | Type | Description |
|---|---|---|
amountRequired | number | string | This part's share of the amount. |
category_account_idRequired | string | The GL account this part is filed to. |
memo | string or null |
AccountSuggestionOut
An account this transaction probably belongs in, and why.
| Name | Type | Description |
|---|---|---|
account_codeRequired | string | |
account_idRequired | string | An id that starts with |
account_nameRequired | string | |
account_typeRequired | string |
|
counterparty_default | boolean | True when this is the account the transaction's counterparty files to by default ( |
kind | account | What picking it does: |
model_confidenceRequired | string or null | The model's confidence, 0 to 1, when it proposed this account; null otherwise. |
model_reasoningRequired | string or null | The model's own words for why, when it proposed this account. |
reasons | array of SuggestionReasonOut | Why it is suggested, strongest first. |
score | string | 0 to 1, deterministic: the strongest of its reasons. A model's proposal scores its own confidence. |
times_filedRequired | integer | How many of the payee's other transactions a person or a rule filed to this account. 0 when only the model suggests it. |
times_proposed | integer | How many people proposed this account for this transaction in a comment that is not yet resolved. Those lead the list. |
TransferSuggestionOut
A transfer between the books' own accounts this transaction probably is, typed by what picking it does.
| Name | Type | Description |
|---|---|---|
kindRequired | string |
match, transfer_account, in_transit |
model_reasoning | string or null | The model's own words, when it read the transaction as this transfer. It is never filed on them: a person picks it. |
other_account_code | string or null | |
other_account_id | string or null | An id that starts with |
other_account_name | string or null | |
other_description | string or null |
|
other_event_date | string (date) or null |
|
other_event_id | string or null | An id that starts with |
reasonsRequired | array of SuggestionReasonOut | Why it is suggested. |
scoreRequired | string | 0 to 1, deterministic: the same amount is required; a nearer date, transfers between the same two accounts before, transactions like this one filed as transfers with the same account before, the model reading it as this transfer and the transaction naming the company itself score higher. A match outranks an account, which outranks Cash in transit. |
SourceRecordVersionOut
One distinct reading of a source record, as the source said it then.
| Name | Type | Description |
|---|---|---|
fetched_atRequired | string (date-time) | When this reading was first seen. |
payloadRequired | object | The record verbatim, as the source sent it. |
SourceAccountRef
The provider's own account a row came from.
| Name | Type | Description |
|---|---|---|
idRequired | string | An id that starts with |
kindRequired | string |
|
maskRequired | string or null | Its last digits, as the provider prints them. |
nameRequired | string | What the provider calls it. |
SourceFactOut
One thing the provider said about the row that the books do not keep.
| Name | Type | Description |
|---|---|---|
detailRequired | string or null | What qualifies it, verbatim: a counterparty's role. |
keyRequired | string | Which fact: one of authorized, channel, category, category_confidence, counterparty, descriptor, mcc, location, kind, note, check_number, cardholder. authorized, channel, category, category_confidence, counterparty, descriptor, mcc, location, kind, note, check_number, cardholder |
valueRequired | string | The provider's value, verbatim; a date is |
SuggestionReasonOut
One reason a suggestion is made.
| Name | Type | Description |
|---|---|---|
codeRequired | string |
proposed, counterparty_default, filed_before, model, same_amount, days_apart, paired_before, names_the_books, candidates, filed_as_transfer, founder, investor, instrument_investor, names_entity, filed_for, loan_outstanding |
count | integer or null | The number the reason says, when it says one. |
FilingReasonOut
Why a decision was made, in parts a screen can put into its own words.
| Name | Type | Description |
|---|---|---|
kindRequired | string |
rule, model, person, carried, refund, default, split, settles, own_company, transfer, financing |
related_event_id | string or null | An id that starts with |
rule_id | string or null | An id that starts with |
rule_name | string or null | Its name when it matched; the rule may have changed since. |
text | string or null | The model's own reasoning, or the note the person left. Words written by a model or a person, never by LedgerIt. |
CategorizedSplitOut
| Name | Type | Description |
|---|---|---|
account_code | string or null | |
account_idRequired | string or null | An id that starts with |
account_name | string or null | |
amountRequired | string | |
memoRequired | string or null |
DocumentRecordOut
A receipt or an invoice, and what it supports.
| Name | Type | Description |
|---|---|---|
byte_sizeRequired | integer or null | The file's size in bytes, once our copy exists. |
content_typeRequired | string or null | The file's media type, once known. |
created_atRequired | string (date-time) | When it reached these books. |
extractionRequired | ExtractionOut or null | What was read off it — merchant, date, total, currency and tax — once read. |
idRequired | string | An id that starts with |
kindRequired | string | One of receipt, invoice. |
sourceRequired | string | The connector it came from, such as |
storedRequired | boolean | Whether our own copy exists. Open the file through the app either way. |
transactionsRequired | array of SupportedTransactionOut | The transactions it supports, oldest first. Empty while it supports none. |
ExtractionOut
What the extractor read off the document. Data only: it is matched against transactions and shown, never acted on.
| Name | Type | Description |
|---|---|---|
currencyRequired | ExtractedFieldOut or null | |
dateRequired | ExtractedFieldOut or null | |
extractor_versionRequired | string | |
merchantRequired | ExtractedFieldOut or null | |
recorded_atRequired | string (date-time) | |
taxRequired | ExtractedFieldOut or null | |
totalRequired | ExtractedFieldOut or null |
SupportedTransactionOut
A transaction a document supports, as much as a list row names.
| Name | Type | Description |
|---|---|---|
account_idRequired | string | The bank or card account it moved on. |
account_nameRequired | string | |
amountRequired | string | Unsigned; |
counterparty_logo_urlRequired | string or null | Their logo, square PNG on our own storage; null for none. |
counterparty_nameRequired | string or null | Who the money went to, when a source named them. |
currencyRequired | string | |
descriptionRequired | string | |
event_dateRequired | string (date) | |
event_typeRequired | string | What kind of movement it was, such as |
idRequired | string | The transaction; open it with |
ExtractedFieldOut
| Name | Type | Description |
|---|---|---|
confidenceRequired | number | How sure the reader was, from 0 to 1. |
locationRequired | string or null | Where on the document it was read. |
valueRequired | string or null | What was read, or null when the document does not show it. |