API reference

Reconciliation matches

Which statement lines and which ledger lines are the same money, matched or undone.

Guides: Review and file transactions

List statement-to-ledger matches

GET/v1/reconciliation_matches

client.reconciliationMatches.list()

Matches between statement lines and ledger lines, the newest first, undone ones included.

Parameters

NameTypeDescription
statement_idQuerystring or null

An id that starts with stmt_.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200ReconciliationMatchPage

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

Match statement lines to ledger lines by hand

POST/v1/reconciliation_matches· Idempotent

client.reconciliationMatches.create()

Match statement lines to ledger lines by hand: any lines of one statement and any lines posted to its account, whole, whose totals are equal. Refused with match_refused for lines already matched, of another statement or account, or totals that differ.

Request body

ReconciliationMatchCreate

Response

201ReconciliationMatchOut

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/reconciliation_matches" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"journal_line_ids":["…"],"statement_id":"…","statement_line_ids":["…"]}'

Get a match and its lines

GET/v1/reconciliation_matches/{match_id}

client.reconciliationMatches.get()

A match and the lines it joins.

Parameters

NameTypeDescription
match_idPath · Requiredstring

An id that starts with match_.

Response

200ReconciliationMatchOut

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/reconciliation_matches/{match_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Undo a match

POST/v1/reconciliation_matches/{match_id}/undo· Idempotent

client.reconciliationMatches.undo()

Free the lines a match joined. The match stays, undone; its statement is imported again until every line is matched.

Parameters

NameTypeDescription
match_idPath · Requiredstring

An id that starts with match_.

Response

200ReconciliationMatchOut

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/reconciliation_matches/{match_id}/undo" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Objects

The objects these operations take and return.

ReconciliationMatchPage

NameTypeDescription
dataRequiredarray of ReconciliationMatchOut
has_moreRequiredboolean
next_cursorRequiredstring or null

ReconciliationMatchCreate

NameTypeDescription
explanationstring or null

Why these are the same money.

journal_line_idsRequiredarray of string

Lines posted to the statement's account.

statement_idRequiredstring

An id that starts with stmt_.

statement_line_idsRequiredarray of string

ReconciliationMatchOut

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

created_atRequiredstring (date-time)
created_byRequiredstring or null

An id that starts with usr_.

explanationRequiredstring or null
idRequiredstring

An id that starts with match_.

itemsRequiredarray of MatchItemOut
methodRequiredstring

feed, amount, batched, split or manual.

statement_idRequiredstring

An id that starts with stmt_.

statusRequiredstring

matched, or undone.

undone_atRequiredstring (date-time) or null

MatchItemOut

NameTypeDescription
amountRequiredstring

As the statement prints it: money into the account positive, for a bank and a card alike.

journal_line_idRequiredstring or null

An id that starts with jel_.

sideRequiredstring

statement or ledger.

statement_line_idRequiredstring or null

An id that starts with stl_.