API reference

Intercompany transactions

What one set of books of an organization is owed by another: one command posts an entry in each, through due-from and due-to accounts; a reversal undoes both.

Guides: Record money between your companies

List intercompany transactions

GET/v1/intercompany_transactions

client.intercompanyTransactions.list()

Intercompany transactions on either side of these books, the newest first.

Parameters

NameTypeDescription
counterparty_entity_idQuerystring or null

An id that starts with ent_.

statusQuerystring or null

Only those in this state.

One of posted, reversed
limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200IntercompanyTransactionPage

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

Record an intercompany amount in both sets of books

POST/v1/intercompany_transactions· Idempotent

client.intercompanyTransactions.create()

Record what other books of the organization owe these books, and post it in both: these books debit what is due from them, theirs credit what is due to these.

Refused with intercompany_refused for books of another organization or that you cannot post in, accounts of the wrong kind, a missing amount in their currency, or an API key.

Request body

IntercompanyTransactionCreate

Response

201IntercompanyTransactionOut

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/intercompany_transactions" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"account_id":"…","amount":0,"counterparty_account_id":"…","counterparty_entity_id":"…","description":"…","transaction_date":"2026-09-30"}'

Get an intercompany transaction

GET/v1/intercompany_transactions/{transaction_id}

client.intercompanyTransactions.get()

One intercompany transaction and both of its entries.

Parameters

NameTypeDescription
transaction_idPath · Requiredstring

An id that starts with ic_.

Response

200IntercompanyTransactionOut

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

Reverse an intercompany transaction in both sets of books

POST/v1/intercompany_transactions/{transaction_id}/reverse· Idempotent

client.intercompanyTransactions.reverse()

Reverse both entries together. Refused with intercompany_refused when it was already reversed or you cannot post in both sets of books.

Parameters

NameTypeDescription
transaction_idPath · Requiredstring

An id that starts with ic_.

Request body

IntercompanyReversal

Response

200IntercompanyTransactionOut

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/intercompany_transactions/{transaction_id}/reverse" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"…"}'

Objects

The objects these operations take and return.

IntercompanyTransactionPage

NameTypeDescription
dataRequiredarray of IntercompanyTransactionOut
has_moreRequiredboolean
next_cursorRequiredstring or null

IntercompanyTransactionCreate

NameTypeDescription
account_idRequiredstring

The other side of these books' entry: the bank account the money left from, or the revenue account of a recharge.

amountRequirednumber | string

What they owe, in these books' currency.

counterparty_account_idRequiredstring

The other side of their entry: the bank account the money arrived in, or the expense account of a recharge.

counterparty_amountnumber | string or null

The amount in their currency. Needed only when their books keep another currency.

counterparty_entity_idRequiredstring

The other books, of the same organization, that owe these books. You need to be able to post in them too.

descriptionRequiredstring

What it is for, on both entries.

due_from_account_idstring or null

An id that starts with gla_.

due_to_account_idstring or null

An id that starts with gla_.

memostring or null
transaction_dateRequiredstring (date)

The day both entries are dated.

IntercompanyTransactionOut

NameTypeDescription
created_atRequiredstring (date-time)
descriptionRequiredstring
due_fromRequiredIntercompanySideOut

The books that are owed.

due_toRequiredIntercompanySideOut

The books that owe.

idRequiredstring

An id that starts with ic_.

linked_transaction_idsarray of string

The bank transactions in these books this command linked as its cash (decision 0191), when it records cash; empty otherwise and when read back.

memoRequiredstring or null
reversed_atRequiredstring (date-time) or null
reversed_transaction_idsarray of string

Of those, the ones that were in the books (filed by the model or from suspense) and were reversed first, so their cash counts once.

sideRequiredstring

Which side these books are: due_from when the other books owe them, due_to when they owe.

One of due_from, due_to
statusRequiredstring

posted, or reversed once both entries were reversed.

One of posted, reversed
transaction_dateRequiredstring (date)

IntercompanyReversal

NameTypeDescription
entry_datestring (date) or null

Defaults to the transaction's date. Give a day in an open month when that one is closed in either set of books.

reasonRequiredstring

Why, on both reversing entries.

IntercompanySideOut

NameTypeDescription
accountRequiredAccountRef

The other account of that side's entry.

amountRequiredstring

The amount in that side's currency.

currencyRequiredstring
due_accountRequiredAccountRef

Where that side carries the balance: the due-from on the side that is owed, the due-to on the side that owes.

entityRequiredEntityRef

The set of books.

entry_idRequiredstring

That side's entry.

reversal_entry_idRequiredstring or null

An id that starts with je_.

AccountRef

NameTypeDescription
codeRequiredstring
idRequiredstring

An id that starts with gla_.

nameRequiredstring

EntityRef

NameTypeDescription
idRequiredstring

An id that starts with ent_.

nameRequiredstring