All amounts are integers in the minor unit of the currency (for example, cents). Dates are
YYYY-MM-DD strings. Timestamps are ISO 8601 datetimes.
Access
An act holds the books of two Entities, so every route asks for access to the whole Organization:- Use an Organization-level API key. Create the key with Todas las empresas in the Empresa selector (see Get an API Key). A key confined to one Entity gets
403withPERMISSION_DENIED_ERRORon every route on this page, reads included. - Writes need a Role that writes.
POSTandDELETEneed thestafforclientRole. Aviewercan list and read acts, and gets403withPERMISSION_DENIED_ERRORon a write. See Access and roles. - Send the audit headers on writes. With an API key,
POSTandDELETEneedx-audit-actorandx-audit-reason, like every mutation. See Authentication.
404 with INTERCOMPANY_ENTRY_NOT_FOUND_ERROR.
The Intercompany Entry object
The act has no date of its own. The list and the detail add
entryDate, the date its two Entries carry.
GET /api/organizations/:organizationId/intercompany-entries
List the Organization’s acts as keyset pages, newestentryDate first. The list includes unbooked acts, with status set to deleted.
- Path param:
organizationId(UUID) - Query params:
No other query parameter is accepted. An unknown one returns
400.
- Success response: a page of acts
- Status: 200
Each item in
intercompanyEntries is the Intercompany Entry object plus:
GET /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId
Read one act with its two Ledger Entries, their lines, and its Pairs. An unbooked act is still readable.- Path params:
organizationId(UUID),intercompanyEntryId(UUID) - Success response: the Intercompany Entry detail
- Status: 200
Each item in
ledgerEntries:
A line in a Pair carries the Pair’s id in
intercompanyPairId. An unpaired line carries null.
Each item in pairs:
POST /api/organizations/:organizationId/intercompany-entries
Create an act. In one transaction, Sintropix books one Ledger Entry in each of the two Entities, links both to the act, and stores the Pairs. If any check fails, nothing is written.- Path param:
organizationId(UUID) - Body:
Each item in
newLedgerEntries:
Each line has the fields of a line in
POST /api/entities/:entityId/ledger/entries: id, accountId, functionalAmount, side, and optionally partnerId, the transaction trio (transactionCurrency, transactionAmount, transactionFxRate), and dimensionValueIds. Every line id must be new and unique across both Entries.
Each item in newIntercompanyPairs:
The Pairs follow these rules:
- One Pair per line. A line is in at most one Pair. A line in no Pair is an ordinary line of its Entry, such as the bank side of a loan.
- Opposite sides. A Pair is a debit in one Entity and a credit in the other, so the elimination cancels it. Otherwise:
422withINTERCOMPANY_PAIR_SAME_SIDE_ERROR. - Same amount. Both lines carry the same currency and amount. A line in a foreign currency carries it in its transaction trio. Any other line carries it in its
functionalAmount, in its Entity’s functional currency. Otherwise:422withINTERCOMPANY_PAIR_AMOUNTS_DIFFER_ERROR. - One currency per act. The act’s currency is the currency of its first Pair. A Pair in another currency returns
422withINTERCOMPANY_PAIR_CURRENCY_DIFFERS_ERROR. - One rate per Entity. When an Entity takes the act’s currency as a foreign currency, its paired lines carry one rate.
"0.9"and"0.90"count as the same rate. Otherwise:422withINTERCOMPANY_PAIR_RATES_DIFFER_ERROR, naming the Entity. - No Partner on a paired line. Leave
partnerIdout ornull. Sintropix sets it to the Partner that represents the other Entity.
- Success response: the Intercompany Entry detail, the same shape as the read
- Status: 201
functionalAmount:
DELETE /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId
Unbook the act. In one transaction, Sintropix unbooks both Ledger Entries and sets the act’sstatus to deleted. Each Entry is unbooked the way DELETE /api/entities/:entityId/ledger/entries/:entryId unbooks one Entry. Either both Entries are unbooked or neither is.
This is not a hard delete. The act, its two Entries, their lines, and the Pairs stay readable, with status set to deleted. Their history stays in the Audit Trail.
- Path params:
organizationId(UUID),intercompanyEntryId(UUID) - Success response: every row the Unbook changed
- Status: 200
Like an ordinary Unbook, it also cuts the Allocations and bank Matches that settle the Entries’ lines.
The Unbook is refused when:
- Either Entry is on or before its Entity’s Lock Date. The request returns
409withLEDGER_ENTRY_UNBOOK_FROZEN_ERROR.paramsnames the Entry, its date, and its Entity’s Lock Date. The act and both Entries stayactive. - The act is already unbooked. The request returns
409withINTERCOMPANY_ENTRY_NOT_ACTIVE_ERROR.
Correct an Intercompany Entry
You can’t edit an act or either of its Entries. To change its date, memo, amounts, accounts, Entities, or Pairs, unbook it and create it again:1
Read the act
GET /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId returns what you need to rebuild it: the date, the memo, both Entries with their lines, and the Pairs.2
Save the Allocations of its Entries
The Unbook removes the Allocations that settle the act’s lines. To keep them, read them first with
GET /api/entities/:entityId/ledger/allocations?entryId=:entryId for each Entry. This read only accepts a live Entry, so do it before the Unbook.3
Unbook it with DELETE
DELETE /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId unbooks both Entries in one transaction. It isn’t a hard delete. The act and its Entries stay readable with status set to deleted, and the Audit Trail keeps their history.4
Create the corrected act with POST
Send
POST /api/organizations/:organizationId/intercompany-entries with the corrected body. Use new ids for the act, both Entries, and every line. The unbooked act keeps its ids, so reusing the act’s id returns 409 with INTERCOMPANY_ENTRY_ALREADY_EXISTS_ERROR, reusing an Entry id returns 409 with LEDGER_ENTRY_ALREADY_EXISTS_ERROR, and reusing a line id returns 409 with LEDGER_ENTRY_LINE_ALREADY_EXISTS_ERROR.The new lines don’t inherit the old lines’ Dimension values. To keep a line’s tags, send the dimensionValueId of each item in its lineDimensionValues in the new line’s dimensionValueIds. A line sent without dimensionValueIds is created untagged.5
Restore the Allocations
For each saved Allocation, send
POST /api/entities/:entityId/ledger/allocations with a new id, the new line in place of the old one, the same other line, and the same amount. If the correction changed an amount and an Allocation no longer fits the line’s open amount, the request returns 409 with RECONCILIATION_ALLOCATION_AMOUNT_EXCEEDS_OPEN_AMOUNT_ERROR.409 with LEDGER_ENTRY_UNBOOK_FROZEN_ERROR, and you can’t correct the act this way. Book an adjusting act dated in an open period, or ask whoever manages the books to move the Lock Date.
These requests don’t exist and return 404:
PATCHorPUT /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryIdPOST /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId/reversePOST /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId/unbook
409 with LEDGER_ENTRY_IN_INTERCOMPANY_ENTRY_ERROR, and params.intercompanyEntryId names the act to unbook. You can still tag the Entry’s lines with Dimension values without touching the act.
Find the act of a Ledger Entry
An Entry that belongs to an act says so wherever you meet it:- The Ledger Entry object carries
intercompanyEntryId, the act’s id, ornullfor an ordinary Entry. - The rows of
GET /api/entities/:entityId/ledger/entriesand the Entry detail carryotherEntityOfIntercompanyEntry:{ id, name }of the act’s other Entity, ornull. - A line of the general ledger carries the
intercompanyEntryIdof its Entry.
History
Every create and Unbook is recorded in the Audit Trail. Read an act’s history through either of its Entities:tableName=ledger_entry and the Entry’s id.
Domain error codes
On create, each Entry can also return any Ledger Entry error of an ordinary create, such as
LEDGER_ACCOUNT_NOT_FOUND_ERROR.

