YYYY-MM-DD strings; timestamps are ISO 8601 datetimes.
Entities with Books. An Entity may hold zero or more Books. When it has at least one, every Ledger Entry it posts must name a
bookId on the header (or leave it null to mark the Entry common), and the Open Item Lines read must carry bookId as a query parameter. See Books for the model and the exact rule.GET /api/entities/:entityId/ledger/entries
List Ledger Entries with pagination, filtering, and sorting. Defaults to live entries (active and reversed statuses). Pass ids instead to read the full detail of up to 100 specific entries in one request.
- Path param:
entityId(UUID) - Query params:
- Success response: a page of entries
- Status: 200
Each item in
entries carries the Ledger Entry fields plus three line-derived totals:
The first eleven fields are the Ledger Entry object; other endpoints on this page return it on its own.
Reading several entries by id
When you passids, the response is an array of Ledger Entry detail objects instead of a { entries, nextCursor } page. Each element has the same shape as the response of GET /api/entities/:entityId/ledger/entries/:entryId, including lines, relatedInvoices, relatedMovements, and allocations. Use this when you already hold a set of entry ids and need their full detail without one request per entry.
- Results follow the order of
ids. A repeated id is returned once, at its first position. - Ids the Entity does not hold are left out of the array rather than refused. Compare the returned
idvalues against the ids you sent. - Combining
idswithcursor,limit,statuses, or any other query parameter returns 400. - Sintropix reads every element from one consistent snapshot.
GET /api/entities/:entityId/ledger/entries/:entryId
Get the full detail of a single Ledger Entry, including lines, related invoices, related bank movements, and allocations.- Path params:
entityId(UUID),entryId(UUID) - Success response: the Ledger Entry fields (see the list endpoint above) plus:
- Status: 200
Each item in
lines is a Ledger Entry Line (the first eleven fields, which other endpoints return on their own) plus the names the detail view shows:
Each item in
relatedInvoices:
Each item in
relatedMovements:
Each item in
allocations:
POST /api/entities/:entityId/ledger/entries
Create a new Ledger Entry. The entry must have at least two lines and total debits must equal total credits. The client supplies the idempotency id.- Path param:
entityId(UUID) - Body:
Each line in
newLedgerEntryLines:
The transaction trio (currency, amount, rate) must be provided together or omitted together. The rate is a plain decimal string, never a float.
id of every line, the same way you choose the entry id. Because you know each line id before the write, a later request can name a line before it exists. For example, a Follow-up Plan can book an Invoice and then match a Movement to its Control Line. A line id that already exists answers 409 LEDGER_ENTRY_LINE_ALREADY_EXISTS_ERROR with params: { lineIds }, and Sintropix writes nothing.
- Success response: the Ledger Entry fields plus
ledgerEntryLines, an array of Ledger Entry Line objects (see the entry detail endpoint) each extended withdimensionValueIds(UUID[]) - Status: 201
POST /api/entities/:entityId/ledger/entries/bulk
Create up to 100 Ledger Entries in a single request and transaction. Each element is a full entry with the same fields asPOST /api/entities/:entityId/ledger/entries, and follows the same rules.
- Path param:
entityId(UUID) - Body:
- Success response: an array of the created entries, in request order. Each element has the same shape as the single create response.
- Status: 201
- An empty
entries, more than 100 entries, or two entries with the sameidreturn400, and Sintropix writes nothing. - When any entry fails validation or a domain rule, Sintropix writes no entry. The response carries the error the single create would return (for example
404 LEDGER_ACCOUNT_NOT_FOUND_ERRORor409 LEDGER_ENTRY_DATE_LOCKED_ERROR) pluselementIndex, the zero-based position of the refused entry inentries.
id is already a live entry of the Entity (active or reversed) answers the stored entry, and the response is 201 again. An id whose entry is no longer live, for example an unbooked one, returns 409 with LEDGER_ENTRY_ALREADY_EXISTS_ERROR and its elementIndex, and Sintropix writes nothing.
PATCH /api/entities/:entityId/ledger/entries/:entryId
Update an entry’s header fields (date, memo, notes). At least one field must be provided.- Path params:
entityId(UUID),entryId(UUID) - Body:
- Success response: the updated Ledger Entry object (see the list endpoint)
- Status: 200
POST /api/entities/:entityId/ledger/entries/:entryId/reverse
Reverse a live Ledger Entry by posting a mirror entry. The reversal date must be on or after the original entry date and after the ledger lock date. The reversal takes the Book of the original; do not sendbookId.
- Path params:
entityId(UUID),entryId(UUID) - Body:
If the entry books a deferred Invoice line, its booked Releases are reversed on the same date and its Scheduled ones are cancelled. A booked Release on or before the ledger lock date refuses the whole reversal with
LEDGER_ENTRY_FROZEN_ERROR.
An Entry that still holds a line on the Suspense Account is refused with LEDGER_REVERSAL_ENTRY_HAS_SUSPENSE_LINE_ERROR. Unbook the Bank Movement instead, or assign the rest first.
- Success response: every row the reversal changed
- Status: 201
DELETE /api/entities/:entityId/ledger/entries/:entryId
Unbook (soft-delete) a Ledger Entry. The entry status becomesdeleted. This severs any linked invoices, bank movements, and allocations. If the entry is a reversal, the chain behind it is settled back to its prior state. If it books a deferred Invoice line, its booked Releases are unbooked and its Scheduled ones are cancelled; a booked Release on or before the ledger lock date refuses the whole unbook with LEDGER_ENTRY_UNBOOK_FROZEN_ERROR.
- Path params:
entityId(UUID),entryId(UUID) - Success response: every row the unbook changed
- Status: 200
Entries of an Intercompany Entry
An Intercompany Entry books one Ledger Entry in each of two Entities. Its Entries carry its id inintercompanyEntryId, and change only with the act. The routes on this page refuse to edit, unbook, reverse, reclassify, or change the Partner of such an Entry:
PATCH /api/entities/:entityId/ledger/entries/:entryIdDELETE /api/entities/:entityId/ledger/entries/:entryIdPOST /api/entities/:entityId/ledger/entries/:entryId/reversePATCH /api/entities/:entityId/ledger/lines/:lineId/accountPATCH /api/entities/:entityId/ledger/lines/:lineId/partner
409 with LEDGER_ENTRY_IN_INTERCOMPANY_ENTRY_ERROR. params.ledgerEntryId names the Entry and params.intercompanyEntryId names its act:
DELETE /api/organizations/:organizationId/intercompany-entries/:intercompanyEntryId and create it again. See Correct an Intercompany Entry. Tagging its lines with Dimension values still works.
Scheduled Entries
POST /api/entities/:entityId/ledger/scheduled-entries
Schedule a Ledger Entry for future booking. The entry date must be in the future. Scheduled entries cannot carry transaction currency lines.- Path param:
entityId(UUID) - Body: the same fields as
POST /api/entities/:entityId/ledger/entriesabove - Success response: the Ledger Entry fields plus
ledgerEntryLines(same shape as the create response), withstatusset toscheduled - Status: 201
POST /api/entities/:entityId/ledger/scheduled-entries/:entryId/book
Book a Scheduled Entry immediately. The entry date must be on or before today.- Path params:
entityId(UUID),entryId(UUID) - Success response: the Ledger Entry fields plus
ledgerEntryLines(same shape as the create response), withstatusset toactive - Status: 200
PATCH /api/entities/:entityId/ledger/scheduled-entries/:entryId
Reschedule a planned entry. Replaces the date, memo, notes, and the entire line set. Fields other than the four below are rejected.- Path params:
entityId(UUID),entryId(UUID) - Body:
- Success response: the Ledger Entry fields plus
ledgerEntryLines(same shape as the create response) - Status: 200
DELETE /api/entities/:entityId/ledger/scheduled-entries/:entryId
Cancel a Scheduled Entry. The entry status becomescancelled.
- Path params:
entityId(UUID),entryId(UUID) - Success response: the Ledger Entry object with
statusset tocancelled - Status: 200
Ledger Lines
GET /api/entities/:entityId/ledger/lines
List Ledger Entry Lines. Defaults to live entries only. Optionally filter by partner.- Path param:
entityId(UUID) - Query params:
- Success response: an array of Ledger Entry Line objects (see the entry detail endpoint), each extended with:
- Status: 200
GET /api/entities/:entityId/ledger/open-item-lines
List Open Item lines for an Open-Item Account with pagination. Shows unsettled lines by default.- Path param:
entityId(UUID) - Query params:
An account that does not track open items returns
400 with ACCOUNT_TRACKS_NO_OPEN_ITEMS_ERROR.
- Success response: a page of open-item lines
- Status: 200
Each item in
lines is a Ledger Entry Line object (see the entry detail endpoint) extended with:
PATCH /api/entities/:entityId/ledger/lines/:lineId/partner
Change the partner on a Ledger Entry Line.null clears the partner.
- Path params:
entityId(UUID),lineId(UUID) - Body:
- Success response: the updated Ledger Entry Line object (see the entry detail endpoint)
- Status: 200
PATCH /api/entities/:entityId/ledger/lines/:lineId/account
Reclassify a Ledger Entry Line to a different Ledger Account. The line must have no Allocation and no document link, and its entry must be open.- Path params:
entityId(UUID),lineId(UUID) - Body:
- Success response: the updated Ledger Entry Line object plus
lineDimensionValues, an array of{ dimensionId, dimensionValueId, dimensionName, dimensionValueCode, dimensionValueName } - Status: 200
PUT /api/entities/:entityId/ledger/lines/:lineId/dimension-values
Replace the Dimension Value tags on a Ledger Entry Line. An empty array untags the line.- Path params:
entityId(UUID),lineId(UUID) - Body:
- Success response: the updated Ledger Entry Line object plus
lineDimensionValues, an array of{ dimensionId, dimensionValueId, dimensionName, dimensionValueCode, dimensionValueName } - Status: 200

