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.
- GET
/v1/intercompany_transactionsList intercompany transactions - POST
/v1/intercompany_transactionsRecord an intercompany amount in both sets of books - GET
/v1/intercompany_transactions/{transaction_id}Get an intercompany transaction - POST
/v1/intercompany_transactions/{transaction_id}/reverseReverse an intercompany transaction in both sets of books
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
| Name | Type | Description |
|---|---|---|
counterparty_entity_idQuery | string or null | An id that starts with |
statusQuery | string or null | Only those in this state. posted, reversed |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
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 "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
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 -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
| Name | Type | Description |
|---|---|---|
transaction_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/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
| Name | Type | Description |
|---|---|---|
transaction_idPath · Required | string | An id that starts with |
Request body
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 -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
| Name | Type | Description |
|---|---|---|
dataRequired | array of IntercompanyTransactionOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
IntercompanyTransactionCreate
| Name | Type | Description |
|---|---|---|
account_idRequired | string | The other side of these books' entry: the bank account the money left from, or the revenue account of a recharge. |
amountRequired | number | string | What they owe, in these books' currency. |
counterparty_account_idRequired | string | The other side of their entry: the bank account the money arrived in, or the expense account of a recharge. |
counterparty_amount | number | string or null | The amount in their currency. Needed only when their books keep another currency. |
counterparty_entity_idRequired | string | The other books, of the same organization, that owe these books. You need to be able to post in them too. |
descriptionRequired | string | What it is for, on both entries. |
due_from_account_id | string or null | An id that starts with |
due_to_account_id | string or null | An id that starts with |
memo | string or null | |
transaction_dateRequired | string (date) | The day both entries are dated. |
IntercompanyTransactionOut
| Name | Type | Description |
|---|---|---|
created_atRequired | string (date-time) | |
descriptionRequired | string | |
due_fromRequired | IntercompanySideOut | The books that are owed. |
due_toRequired | IntercompanySideOut | The books that owe. |
idRequired | string | An id that starts with |
linked_transaction_ids | array 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. |
memoRequired | string or null | |
reversed_atRequired | string (date-time) or null | |
reversed_transaction_ids | array 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. |
sideRequired | string | Which side these books are: due_from, due_to |
statusRequired | string |
posted, reversed |
transaction_dateRequired | string (date) |
IntercompanyReversal
| Name | Type | Description |
|---|---|---|
entry_date | string (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. |
reasonRequired | string | Why, on both reversing entries. |
IntercompanySideOut
| Name | Type | Description |
|---|---|---|
accountRequired | AccountRef | The other account of that side's entry. |
amountRequired | string | The amount in that side's currency. |
currencyRequired | string | |
due_accountRequired | AccountRef | Where that side carries the balance: the due-from on the side that is owed, the due-to on the side that owes. |
entityRequired | EntityRef | The set of books. |
entry_idRequired | string | That side's entry. |
reversal_entry_idRequired | string or null | An id that starts with |
AccountRef
| Name | Type | Description |
|---|---|---|
codeRequired | string | |
idRequired | string | An id that starts with |
nameRequired | string |
EntityRef
| Name | Type | Description |
|---|---|---|
idRequired | string | An id that starts with |
nameRequired | string |