API reference

Open items

Every invoice, bill and payment on receivables and payables, with what each has left.

Guides: Keep track of vendors and customers

List receivable and payable items

GET/v1/open_items

client.openItems.list()

Receivable and payable items of these books: every AR or AP line that names its party, with what it has left after allocations.

Parameters

NameTypeDescription
ledgerQuerystring or null

ar or ap; both when left out.

party_idQuerystring or null

An id that starts with party_.

open_onlyQueryboolean

Only items with something left.

Default true
as_ofQuerystring (date) or null

What each had left on this day; today when left out.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200OpenItemPage

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

Get an open item and its allocations

GET/v1/open_items/{item_id}

client.openItems.get()

An open item with every allocation that settled it, or undid one.

Parameters

NameTypeDescription
item_idPath · Requiredstring

An id that starts with oi_.

Response

200OpenItemDetailOut

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

Objects

The objects these operations take and return.

OpenItemPage

NameTypeDescription
dataRequiredarray of OpenItemOut
has_moreRequiredboolean
next_cursorRequiredstring or null

OpenItemDetailOut

NameTypeDescription
allocationsRequiredarray of AllocationOut
currencyRequiredstring
due_onRequiredstring (date)

The issue day plus the party's payment terms; a payment's own day.

entry_idRequiredstring

The journal entry its line is on.

entry_noRequiredinteger
idRequiredstring

An id that starts with oi_.

issued_onRequiredstring (date)
ledgerRequiredstring

ar or ap.

original_amountRequiredstring
owedRequiredstring

remaining, positive when owed (an invoice on AR, a bill on AP) and negative when it is a payment not yet applied.

party_idRequiredstring

The counterparty it is with.

party_nameRequiredstring or null
remainingRequiredstring

What it has left once its allocations are counted.

sideRequiredstring

debit or credit: the side of its line. A debit item is settled by a credit item.

subjectRequiredstring

invoice, bill or payment (credit and advance come with documents).

OpenItemOut

NameTypeDescription
currencyRequiredstring
due_onRequiredstring (date)

The issue day plus the party's payment terms; a payment's own day.

entry_idRequiredstring

The journal entry its line is on.

entry_noRequiredinteger
idRequiredstring

An id that starts with oi_.

issued_onRequiredstring (date)
ledgerRequiredstring

ar or ap.

original_amountRequiredstring
owedRequiredstring

remaining, positive when owed (an invoice on AR, a bill on AP) and negative when it is a payment not yet applied.

party_idRequiredstring

The counterparty it is with.

party_nameRequiredstring or null
remainingRequiredstring

What it has left once its allocations are counted.

sideRequiredstring

debit or credit: the side of its line. A debit item is settled by a credit item.

subjectRequiredstring

invoice, bill or payment (credit and advance come with documents).

AllocationOut

NameTypeDescription
amountRequiredstring

Positive; minus the allocation it undoes when reverses_id is set.

created_byRequiredstring or null

An id that starts with usr_.

credit_item_idRequiredstring

An id that starts with oi_.

debit_item_idRequiredstring

An id that starts with oi_.

effective_onRequiredstring (date)
idRequiredstring

An id that starts with alloc_.

recorded_atRequiredstring (date-time)
reverses_idRequiredstring or null

An id that starts with alloc_.

settlement_entry_idRequiredstring or null

An id that starts with je_.