API reference

Transactions

Money that moved at a bank, card or processor, and what it was filed as.

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

NameTypeDescription
limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

statusQueryarray of string or null

Any of needs_review, ready, posted, excluded. Repeat it to match several: the review queue is status=needs_review&status=ready.

account_idQuerystring or null

An id that starts with gla_.

counterparty_idQuerystring or null

An id that starts with party_.

category_account_idQuerystring or null

An id that starts with gla_.

rule_idQuerystring or null

An id that starts with rule_.

qQuerystring or null

Only transactions whose description contains this, ignoring case.

sinceQuerystring (date) or null
untilQuerystring (date) or null
kindQuerytransfer or null

transfer: only transfers between the books' own accounts, each movement once (the excluded other half of a matched pair is left out).

Response

200TransactionPage

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/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

CategorizeMany

Response

200CategorizeManyOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Response

200TransactionDetailOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

TransactionChanges

Response

200TransactionOut

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 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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Response

200CapitalOptionList

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Capitalize

Response

200TransactionOut

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/transactions/{event_id}/capitalize" \
  -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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200CategorizationPage

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Categorize

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

SetCounterparty

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

SetDimensions

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Exclude

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Match

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Response

200MatchCandidatesOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

OwnerMoney

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Response

200TransactionReceiptsOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Reopen

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Settle

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Response

200SettlementOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Split

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Response

200AccountSuggestionList

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

FileAsTransfer

Response

200TransactionOut

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/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

NameTypeDescription
event_idPath · Requiredstring

An id that starts with txn_.

Request body

Unmatch

Response

200TransactionOut

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/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

NameTypeDescription
dataRequiredarray of TransactionOut
has_moreRequiredboolean
next_cursorRequiredstring or null

CategorizeMany

NameTypeDescription
category_account_idRequiredstring

The GL account all of them are filed to.

event_idsRequiredarray of string

The transactions to file, each at most once.

notestring or null
postbooleanDefault true

CategorizeManyOut

NameTypeDescription
filedRequiredarray of TransactionOut

The transactions filed, as they now stand.

refusedRequiredarray 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.

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

account_maskstring 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_name, so a renamed account still says which card it is.

account_nameRequiredstring
amountRequiredstring
capital_purposestring or null

What a person filed it as, when it is money between the company and its owners (transactions.file_as_owner_money): owner_loan, stock_purchase, contribution, owner_loan_repayment or distribution. Null otherwise.

One of owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution
cash_entry_idstring or null

An id that starts with je_.

cash_link_namestring or null

The instrument's name, or the other company's, for the entry it stands for.

category_account_idRequiredstring or null

An id that starts with gla_.

category_codeRequiredstring or null
category_confidenceRequiredstring or null
category_nameRequiredstring or null
category_rationaleRequiredobject or null
category_sourceRequiredstring
counterparty_idRequiredstring or null

An id that starts with party_.

counterparty_logo_urlstring or null

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

counterparty_nameRequiredstring or null
currencyRequiredstring
descriptionRequiredstring
dimensionsarray of LineDimensionOut

Its department and other dimension values, carried onto the lines it posts to the accounts it is filed to (transactions.set_dimensions). Empty when it names none.

directionstring or null

Which way the money moved on account_id: in or out.

documentsRequiredarray of DocumentOut
event_dateRequiredstring (date)
event_typeRequiredstring
financing_instrument_idstring or null

An id that starts with fin_.

fixed_asset_idstring or null

An id that starts with asset_.

idRequiredstring

An id that starts with txn_.

intercompany_transaction_idstring or null

An id that starts with ic_.

journal_entry_idRequiredstring or null

An id that starts with je_.

match_kindRequiredstring or null
matched_event_idRequiredstring or null

An id that starts with txn_.

notestring or null

A note a person kept with it (transactions.update); null for none.

open_proposalsinteger

How many unresolved comments propose a GL account for it. Counted when transactions are listed; 0 elsewhere.

Default 0
other_account_codestring or null

The other account's code; null when there is none.

other_account_idstring or null

An id that starts with gla_.

other_account_namestring or null

The other account's name; null when there is none.

pendingRequiredboolean
received_atRequiredstring (date-time) or null

When the row was first received.

refund_of_event_idRequiredstring or null

An id that starts with txn_.

reviewed_atRequiredstring (date-time) or null
schedule_idstring or null

An id that starts with sched_.

sourceRequiredstring or null
source_descriptionRequiredstring or null
source_payloadRequiredobject or null

The row exactly as the source first sent it. Never edited.

source_recordsRequiredarray of SourceRecordOut
source_refRequiredstring or null

The source's own id for the row.

source_rowSourceRowOut or null

The row as its source sent it; null for one a person entered.

splitsarray of SplitOut

The GL accounts it is split across, each with its share. Empty when one account carries it (category_account_id).

statusRequiredstring

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.

NameTypeDescription
descriptionstring

What it is called in these books. The source's own words stay in source_description.

event_datestring (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 period_closed while either month is closed.

notestring or null

A note kept with it; null to clear it.

TransactionOut

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

account_maskstring 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_name, so a renamed account still says which card it is.

account_nameRequiredstring
amountRequiredstring
capital_purposestring or null

What a person filed it as, when it is money between the company and its owners (transactions.file_as_owner_money): owner_loan, stock_purchase, contribution, owner_loan_repayment or distribution. Null otherwise.

One of owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution
cash_entry_idstring or null

An id that starts with je_.

cash_link_namestring or null

The instrument's name, or the other company's, for the entry it stands for.

category_account_idRequiredstring or null

An id that starts with gla_.

category_codeRequiredstring or null
category_confidenceRequiredstring or null
category_nameRequiredstring or null
category_rationaleRequiredobject or null
category_sourceRequiredstring
counterparty_idRequiredstring or null

An id that starts with party_.

counterparty_logo_urlstring or null

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

counterparty_nameRequiredstring or null
currencyRequiredstring
descriptionRequiredstring
dimensionsarray of LineDimensionOut

Its department and other dimension values, carried onto the lines it posts to the accounts it is filed to (transactions.set_dimensions). Empty when it names none.

directionstring or null

Which way the money moved on account_id: in or out.

documentsRequiredarray of DocumentOut
event_dateRequiredstring (date)
event_typeRequiredstring
financing_instrument_idstring or null

An id that starts with fin_.

fixed_asset_idstring or null

An id that starts with asset_.

idRequiredstring

An id that starts with txn_.

intercompany_transaction_idstring or null

An id that starts with ic_.

journal_entry_idRequiredstring or null

An id that starts with je_.

match_kindRequiredstring or null
matched_event_idRequiredstring or null

An id that starts with txn_.

notestring or null

A note a person kept with it (transactions.update); null for none.

open_proposalsinteger

How many unresolved comments propose a GL account for it. Counted when transactions are listed; 0 elsewhere.

Default 0
other_account_codestring or null

The other account's code; null when there is none.

other_account_idstring or null

An id that starts with gla_.

other_account_namestring or null

The other account's name; null when there is none.

pendingRequiredboolean
refund_of_event_idRequiredstring or null

An id that starts with txn_.

reviewed_atRequiredstring (date-time) or null
schedule_idstring or null

An id that starts with sched_.

sourceRequiredstring or null
source_descriptionRequiredstring or null
splitsarray of SplitOut

The GL accounts it is split across, each with its share. Empty when one account carries it (category_account_id).

statusRequiredstring

CapitalOptionList

NameTypeDescription
dataRequiredarray of CapitalOptionOut

Best first. Empty when the transaction cannot be one: not plain money in or out, a hold, or matched.

ownershipRequiredstring

Who owns the company, as its legal structure says: shareholders (a corporation, and when it is not known), members (an LLC or a partnership) or owner (a sole proprietorship). It decides the purposes offered.

One of shareholders, members, owner

Capitalize

Equipment bought with this transaction, and how it depreciates.

NameTypeDescription
asset_account_idstring or null

An id that starts with gla_.

department_value_idstring or null

An id that starts with dimv_.

namestring or null

What it is, e.g. MacBook Pro, Ana; the transaction's description when left out.

notestring or null

Why, kept on the filing and in the audit trail.

placed_in_service_onstring (date) or null

The day it went into use; the transaction's date when left out.

salvage_valuenumber | string

What it will be worth at the end; less than its cost.

Default 0
useful_life_monthsinteger

How many months it lasts; 36, a laptop's, when left out.

Default 36

LinkCash

NameTypeDescription
counterparty_entity_idstring or null

An id that starts with ent_.

entry_idstring or null

An id that starts with je_.

financing_instrument_idstring or null

An id that starts with fin_.

notestring or null

Why, kept in the audit trail.

CategorizationPage

NameTypeDescription
dataRequiredarray of CategorizationOut
has_moreRequiredboolean
next_cursorRequiredstring or null

Categorize

NameTypeDescription
category_account_idRequiredstring

An id that starts with gla_.

notestring or null
postbooleanDefault true

SetCounterparty

NameTypeDescription
counterparty_idRequiredstring or null

An id that starts with party_.

SetDimensions

NameTypeDescription
dimensionsRequiredarray 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 dimension_invalid when a value is not of the dimension named, and with dimension_required when the transaction is in the books and an account it is filed to requires a dimension left out.

Exclude

NameTypeDescription
reasonRequiredstring

Match

NameTypeDescription
other_event_idRequiredstring

The other half: a transaction from transactions.list_match_candidates.

MatchCandidatesOut

NameTypeDescription
dataRequiredarray 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

NameTypeDescription
notestring or null

Why, kept on the filing.

purposeRequiredstring

What it is, as the company's owners have it (transactions.list_capital_options). Money in: owner_loan (a loan from a shareholder or member, 2950), stock_purchase (shares, 3100 Common stock; corporations only) or contribution (3300 Additional paid-in capital for a corporation, 3500 for an LLC or a sole proprietor). Money out: owner_loan_repayment (2950) or distribution (3600: a dividend, a member distribution or an owner draw).

One of owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution

TransactionReceiptsOut

NameTypeDescription
documentsRequiredarray of ReceiptEvidenceOut

The receipts and invoices it has, oldest first.

forward_addressRequiredstring 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.

suggestionsRequiredarray of ReceiptSuggestionOut

While it has no receipt: unclaimed receipts that might be its, likeliest first, at most five. Empty once it has one.

transaction_idRequiredstring

An id that starts with txn_.

wantedRequiredboolean

Whether the books are waiting for this transaction's receipt: an open missing_receipt item names it. Only then does a mailbox search look for it.

Reopen

NameTypeDescription
postboolean

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.

Default false
reasonstring or null

Why it goes back, for the trail. Optional: undoing a misclick needs no essay.

Settle

NameTypeDescription
notestring or null

Kept with the filing.

partsRequiredarray 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

NameTypeDescription
paysRequiredarray of SettlementPartOut

The invoices or bills the transaction pays now; empty when it pays none.

proposalsRequiredarray 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_ledgeritRequiredboolean

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.

unappliedRequiredstring

What of a settled transaction pays nothing yet: the party's unapplied cash.

Split

NameTypeDescription
notestring or null
partsRequiredarray of SplitPart

The accounts and amounts; they add up to the transaction's amount exactly.

postbooleanDefault true

AccountSuggestionList

NameTypeDescription
dataRequiredarray of AccountSuggestionOut

Best first; at most 3. Empty when there is nothing to go on.

transfersarray of TransferSuggestionOut

The transfers it probably is, best first. Empty when it is unlikely to be one, is already one, or is decided.

FileAsTransfer

NameTypeDescription
other_account_idstring or null

An id that starts with gla_.

Unmatch

NameTypeDescription
reasonRequiredstring

FilingRefusal

A transaction a bulk filing left as it was, and why.

NameTypeDescription
codeRequiredstring

The same code filing it alone would be refused with.

event_idRequiredstring

An id that starts with txn_.

messageRequiredstring

LineDimensionOut

NameTypeDescription
dimension_idRequiredstring

An id that starts with dim_.

dimension_keyRequiredstring

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

dimension_nameRequiredstring
value_codeRequiredstring
value_idRequiredstring

An id that starts with dimv_.

value_nameRequiredstring

DocumentOut

NameTypeDescription
content_typeRequiredstring or null
created_atRequiredstring (date-time)
idRequiredstring

An id that starts with doc_.

kindRequiredstring
sourceRequiredstring
storedRequiredboolean
urlRequiredstring or null

SourceRecordOut

What the source knows about the transaction beyond the transaction itself — a card program's expense.

NameTypeDescription
categoryRequiredstring or null

The source's category, verbatim.

external_urlRequiredstring or null

Where to see it in the source's own product.

first_seen_atRequiredstring (date-time)
idRequiredstring

An id that starts with src_.

is_approvedRequiredboolean or null

Whether the source approved the spend; null when it does not say.

kindRequiredstring

What it is at the source, such as expense.

last_seen_atRequiredstring (date-time)
original_amountRequiredstring or null

What it cost in the currency it was bought in, when that is not the billing currency.

original_currencyRequiredstring or null
payloadRequiredobject

The latest reading, verbatim.

sourceRequiredstring

The connector it came from, such as brex.

source_refRequiredstring

The source's own id for it.

spenderRequiredstring or null

Who spent it, by name.

spender_user_idstring or null

An id that starts with usr_.

statusRequiredstring or null

The source's own word for its state, verbatim.

versionsRequiredarray 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.

NameTypeDescription
accountRequiredSourceAccountRef or null

The provider's account it came from; null for a file upload.

amountRequiredstring

Signed as its connector read it: negative is money out of the account. The provider's own figure and sign are in source_payload.

batch_idRequiredstring

The import that brought it in.

batch_labelRequiredstring or null

That import's name: the sync run or the file.

currencyRequiredstring
descriptionRequiredstring

The provider's description, verbatim.

factsRequiredarray 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_dateRequiredstring (date) or null

When it posted, when the provider says.

received_atRequiredstring (date-time)

When it was first received.

statusRequiredstring or null

The provider's word for its state, verbatim.

txn_dateRequiredstring (date)

The date the provider gave it.

SplitOut

One part of a split transaction.

NameTypeDescription
amountRequiredstring

This part's share of the transaction's amount.

category_account_idRequiredstring

An id that starts with gla_.

category_codeRequiredstring
category_nameRequiredstring
memoRequiredstring or null

CapitalOptionOut

One thing a transaction may be as money between the company and those who fund it, and what picking it does.

NameTypeDescription
account_codestring or null
account_idstring or null

An id that starts with gla_.

account_namestring or null
counterparty_entity_idstring or null

An id that starts with ent_.

counterparty_entity_namestring or null
entry_datestring (date) or null

The entry's date, or the draft's issue date.

entry_idstring or null

An id that starts with je_.

financing_kindstring or null

financing: whether the entry issued the instrument or repaid it.

One of issued, repaid
instrument_idstring or null

An id that starts with fin_.

instrument_namestring or null
intercompany_transaction_idstring or null

An id that starts with ic_.

kindRequiredstring

capital: file it for purpose under the owner account it names (transactions.file_as_owner_money). financing: it is the bank's side of an instrument's entry already in the books (transactions.link_cash with entry_id). financing_draft: issue the draft instrument from it (transactions.link_cash with financing_instrument_id). intercompany: the bank's side of an intercompany transaction's entry (transactions.link_cash with entry_id). new_intercompany: record it as intercompany with counterparty_entity_id (transactions.link_cash with counterparty_entity_id).

One of capital, financing, financing_draft, intercompany, new_intercompany
party_idstring or null

An id that starts with party_.

party_namestring or null
purposestring or null

capital: owner_loan, stock_purchase, contribution, owner_loan_repayment or distribution, as the books' owners have them.

One of owner_loan, stock_purchase, contribution, owner_loan_repayment, distribution
reasonsRequiredarray of SuggestionReasonOut

Why it is suggested; empty when nothing points at it.

scoreRequiredstring

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

NameTypeDescription
account_codestring or null

That account's code.

account_idRequiredstring or null

An id that starts with gla_.

account_namestring or null

That account's name.

confidenceRequiredstring or null
currentRequiredboolean

Whether this is the decision that stands.

decided_byRequiredstringOne of default, rule, model, human
dimensionsarray of LineDimensionOut

The department and other dimension values it named, as they stood; empty when none.

idRequiredstring

An id that starts with cat_.

party_idRequiredstring or null

An id that starts with party_.

party_namestring or null

That counterparty's name today; null when none or gone.

rationaleRequiredobject or null

Why: the rule, the model's words, or the person.

reasonRequiredFilingReasonOut

The same, as its kind and the parts to show.

recorded_atRequiredstring (date-time)
splitsarray of CategorizedSplitOut

The parts it was split into, as they stood; empty when filed whole.

versionRequiredinteger

1 for the first decision, counting up.

LineDimensionIn

NameTypeDescription
dimension_idRequiredstring

An id that starts with dim_.

value_idRequiredstring

A value of that dimension.

ReceiptEvidenceOut

A receipt the transaction has, with what was read off it checked against what the transaction records.

NameTypeDescription
currencyRequiredstring

The receipt's currency against the transaction's: agrees, differs, or unread when the receipt does not show it clearly enough to compare.

dateRequiredstring

The receipt's date against the transaction's, within a week: agrees, differs, or unread when the receipt does not show it clearly enough to compare.

differenceRequiredstring or null

The receipt's total less the transaction's amount, when they differ in the same currency; null otherwise.

documentRequiredDocumentRecordOut
totalRequiredstring

The receipt's total against the amount: agrees, differs, or unread when the receipt does not show it clearly enough to compare.

ReceiptSuggestionOut

A receipt no transaction has claimed that might be this one's.

NameTypeDescription
documentRequiredDocumentRecordOut
reasonsRequiredarray of string

Why it is suggested, strongest first: amount (the same total), merchant (the merchant's name matches) and date (dated within a week).

SettlePart

NameTypeDescription
amountRequirednumber | string

How much of the transaction pays it.

bill_idstring or null

An id that starts with bill_.

invoice_idstring or null

An id that starts with inv_.

SettlementPartOut

NameTypeDescription
amountRequiredstring

How much of the transaction pays it, in the books' currency.

bill_idRequiredstring or null

An id that starts with bill_.

invoice_idRequiredstring or null

An id that starts with inv_.

numberRequiredstring

The invoice's number, or the vendor's number on the bill.

SettlementProposalOut

NameTypeDescription
partsRequiredarray of SettlementPartOut

What it would pay, oldest first.

party_idRequiredstring

The customer or vendor whose documents they are.

party_nameRequiredstring
reasonRequiredstring

Why the books propose it: number, the document's number is in the transaction's description; amount, one document is open for exactly the amount; all_open, the party's open documents add up to it to the cent.

SplitPart

NameTypeDescription
amountRequirednumber | string

This part's share of the amount.

category_account_idRequiredstring

The GL account this part is filed to.

memostring or null

AccountSuggestionOut

An account this transaction probably belongs in, and why.

NameTypeDescription
account_codeRequiredstring
account_idRequiredstring

An id that starts with gla_.

account_nameRequiredstring
account_typeRequiredstring

income or expense.

counterparty_defaultboolean

True when this is the account the transaction's counterparty files to by default (default_account_id on the counterparty). It leads the list.

Default false
kindaccount

What picking it does: account files the transaction under this account.

Default account
model_confidenceRequiredstring or null

The model's confidence, 0 to 1, when it proposed this account; null otherwise.

model_reasoningRequiredstring or null

The model's own words for why, when it proposed this account.

reasonsarray of SuggestionReasonOut

Why it is suggested, strongest first.

scorestring

0 to 1, deterministic: the strongest of its reasons. A model's proposal scores its own confidence.

Default 0
times_filedRequiredinteger

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_proposedinteger

How many people proposed this account for this transaction in a comment that is not yet resolved. Those lead the list.

Default 0

TransferSuggestionOut

A transfer between the books' own accounts this transaction probably is, typed by what picking it does.

NameTypeDescription
kindRequiredstring

match: pair it with other_event_id, its other half (transactions.match). transfer_account: file it as a transfer to or from other_account_id (transactions.file_as_transfer). in_transit: file it as a transfer against 1090 Cash in transit, its other account not being connected (transactions.file_as_transfer with no account).

One of match, transfer_account, in_transit
model_reasoningstring 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_codestring or null
other_account_idstring or null

An id that starts with gla_.

other_account_namestring or null
other_descriptionstring or null

match: the other half's description.

other_event_datestring (date) or null

match: the other half's date.

other_event_idstring or null

An id that starts with txn_.

reasonsRequiredarray of SuggestionReasonOut

Why it is suggested.

scoreRequiredstring

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.

NameTypeDescription
fetched_atRequiredstring (date-time)

When this reading was first seen.

payloadRequiredobject

The record verbatim, as the source sent it.

SourceAccountRef

The provider's own account a row came from.

NameTypeDescription
idRequiredstring

An id that starts with acct_.

kindRequiredstring

depository (money held) or credit (a card: money owed).

maskRequiredstring or null

Its last digits, as the provider prints them.

nameRequiredstring

What the provider calls it.

SourceFactOut

One thing the provider said about the row that the books do not keep.

NameTypeDescription
detailRequiredstring or null

What qualifies it, verbatim: a counterparty's role.

keyRequiredstring

Which fact: one of authorized, channel, category, category_confidence, counterparty, descriptor, mcc, location, kind, note, check_number, cardholder.

One of authorized, channel, category, category_confidence, counterparty, descriptor, mcc, location, kind, note, check_number, cardholder
valueRequiredstring

The provider's value, verbatim; a date is YYYY-MM-DD.

SuggestionReasonOut

One reason a suggestion is made.

NameTypeDescription
codeRequiredstring

proposed: people proposed it in an open comment (count of them). counterparty_default: the counterparty's default account. filed_before: the payee was filed there before (count times). model: the model proposed it (count: its confidence in percent). same_amount: the other row is the same amount to the cent, moving the other way. days_apart: how far apart the two are dated (count days). paired_before: transfers between the two accounts before (count). names_the_books: the transaction names the company itself. candidates: how many rows could be its other half (count), when several. filed_as_transfer: a person filed transactions like this one, from this account, as transfers with the suggestion's other account before (count of them). On a transfer, model means the model read it as this transfer (count: its confidence in percent; its words in model_reasoning). Owner and financing (transactions.list_capital_options): founder and investor, the transaction comes from or names a founder or investor of these books; instrument_investor, it comes from or names the instrument's own investor; names_entity, it names the other company; filed_for, the payee was filed for this purpose before (count times); loan_outstanding, what the books owe their owners on loan covers it.

One of 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
countinteger 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.

NameTypeDescription
kindRequiredstring

rule: a rule of these books matched. model: a model proposed it. person: someone chose it. carried: it was filed on the row this one replaced. refund: a refund files where its purchase did. default: what LedgerIt does with this kind of transaction when nothing else decides. split: someone filed it across several GL accounts, so the decision names none. settles: LedgerIt settled it against the one invoice or bill its description names, for exactly what was left on it. own_company: the other party is the company itself, so LedgerIt holds it in suspense as a transfer between its own accounts waiting for its other half; text is the name it matched. transfer: someone filed it as a transfer between the books' own accounts, so it files under no GL account. financing: it is the bank's side of a financing instrument's or an intercompany transaction's entry, which holds its cash.

One of rule, model, person, carried, refund, default, split, settles, own_company, transfer, financing
related_event_idstring or null

An id that starts with txn_.

rule_idstring or null

An id that starts with rule_.

rule_namestring or null

Its name when it matched; the rule may have changed since.

textstring 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

NameTypeDescription
account_codestring or null
account_idRequiredstring or null

An id that starts with gla_.

account_namestring or null
amountRequiredstring
memoRequiredstring or null

DocumentRecordOut

A receipt or an invoice, and what it supports.

NameTypeDescription
byte_sizeRequiredinteger or null

The file's size in bytes, once our copy exists.

content_typeRequiredstring or null

The file's media type, once known.

created_atRequiredstring (date-time)

When it reached these books.

extractionRequiredExtractionOut or null

What was read off it — merchant, date, total, currency and tax — once read.

idRequiredstring

An id that starts with doc_.

kindRequiredstring

One of receipt, invoice.

sourceRequiredstring

The connector it came from, such as brex, or upload.

storedRequiredboolean

Whether our own copy exists. Open the file through the app either way.

transactionsRequiredarray 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.

NameTypeDescription
currencyRequiredExtractedFieldOut or null
dateRequiredExtractedFieldOut or null
extractor_versionRequiredstring
merchantRequiredExtractedFieldOut or null
recorded_atRequiredstring (date-time)
taxRequiredExtractedFieldOut or null
totalRequiredExtractedFieldOut or null

SupportedTransactionOut

A transaction a document supports, as much as a list row names.

NameTypeDescription
account_idRequiredstring

The bank or card account it moved on.

account_nameRequiredstring
amountRequiredstring

Unsigned; event_type says which way the money went.

counterparty_logo_urlRequiredstring or null

Their logo, square PNG on our own storage; null for none.

counterparty_nameRequiredstring or null

Who the money went to, when a source named them.

currencyRequiredstring
descriptionRequiredstring
event_dateRequiredstring (date)
event_typeRequiredstring

What kind of movement it was, such as expense or income.

idRequiredstring

The transaction; open it with GET /transactions/{id}.

ExtractedFieldOut

NameTypeDescription
confidenceRequirednumber

How sure the reader was, from 0 to 1.

locationRequiredstring or null

Where on the document it was read.

valueRequiredstring or null

What was read, or null when the document does not show it.