API reference
Open items
Every invoice, bill and payment on receivables and payables, with what each has left.
- GET
/v1/open_itemsList receivable and payable items - GET
/v1/open_items/{item_id}Get an open item and its allocations
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
| Name | Type | Description |
|---|---|---|
ledgerQuery | string or null |
|
party_idQuery | string or null | An id that starts with |
open_onlyQuery | boolean | Only items with something left. |
as_ofQuery | string (date) or null | What each had left on this day; today when left out. |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
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 "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
| Name | Type | Description |
|---|---|---|
item_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/open_items/{item_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
OpenItemPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of OpenItemOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
OpenItemDetailOut
| Name | Type | Description |
|---|---|---|
allocationsRequired | array of AllocationOut | |
currencyRequired | string | |
due_onRequired | string (date) | The issue day plus the party's payment terms; a payment's own day. |
entry_idRequired | string | The journal entry its line is on. |
entry_noRequired | integer | |
idRequired | string | An id that starts with |
issued_onRequired | string (date) | |
ledgerRequired | string |
|
original_amountRequired | string | |
owedRequired | string |
|
party_idRequired | string | The counterparty it is with. |
party_nameRequired | string or null | |
remainingRequired | string | What it has left once its allocations are counted. |
sideRequired | string |
|
subjectRequired | string |
|
OpenItemOut
| Name | Type | Description |
|---|---|---|
currencyRequired | string | |
due_onRequired | string (date) | The issue day plus the party's payment terms; a payment's own day. |
entry_idRequired | string | The journal entry its line is on. |
entry_noRequired | integer | |
idRequired | string | An id that starts with |
issued_onRequired | string (date) | |
ledgerRequired | string |
|
original_amountRequired | string | |
owedRequired | string |
|
party_idRequired | string | The counterparty it is with. |
party_nameRequired | string or null | |
remainingRequired | string | What it has left once its allocations are counted. |
sideRequired | string |
|
subjectRequired | string |
|
AllocationOut
| Name | Type | Description |
|---|---|---|
amountRequired | string | Positive; minus the allocation it undoes when |
created_byRequired | string or null | An id that starts with |
credit_item_idRequired | string | An id that starts with |
debit_item_idRequired | string | An id that starts with |
effective_onRequired | string (date) | |
idRequired | string | An id that starts with |
recorded_atRequired | string (date-time) | |
reverses_idRequired | string or null | An id that starts with |
settlement_entry_idRequired | string or null | An id that starts with |