Entities with Books. An Allocation, and every pair inside a match, must stay within a single Book (or between two common lines). Crossing Books is refused with
RECONCILIATION_ALLOCATION_LINES_IN_DIFFERENT_BOOKS_ERROR for a single Allocation or RECONCILIATION_MATCH_LINES_IN_DIFFERENT_BOOKS_ERROR for a match.GET /api/entities/:entityId/ledger/allocations
List the Allocations of a set of Ledger Entry Lines. Returns every Allocation where either the debit or credit side is one of the lines in scope. Name the lines directly withlineIds, or pass entryId to read the Allocations of every line of one Ledger Entry in a single request.
- Path param:
entityId(UUID) - Query params: pass exactly one of the two below. Passing both, or neither, returns 400.
- Success response: an array of Allocation objects with the fields below
- Status: 200
lineIds is not a line of the Entity, Sintropix returns 404 with LEDGER_ENTRY_LINE_NOT_FOUND_ERROR and the missing lineId in params. If entryId names no live entry of the Entity, Sintropix returns 404 with LEDGER_ENTRY_NOT_FOUND_ERROR.
POST /api/entities/:entityId/ledger/allocations
Create a single Allocation between two lines. The caller supplies the idempotency id. The debit line must be on the debit side, the credit line on the credit side, both must belong to the same Open-Item Account, and the amount must not exceed either line’s open amount.- Path param:
entityId(UUID) - Body:
- Success response: the created Allocation object (same fields as the list response)
- Status: 201
POST /api/entities/:entityId/ledger/allocations/bulk
Create up to 100 Allocations in a single request and transaction. Each element has the body of the single create, including its own client-suppliedid. The whole batch runs against the same Open-Item Account constraints as the single-create endpoint.
- Path param:
entityId(UUID) - Body:
{ allocations: [...] }, 1 to 100 elements, each with the fields of the single create - Success response: an array of the created Allocation objects (same fields as the list response), in input order
- Status: 201
Bulk endpoints run as one database transaction. If any element fails validation or a domain rule, the whole batch is rejected and the response identifies the offending element by its zero-based
elementIndex.DELETE /api/entities/:entityId/ledger/allocations/:allocationId
Delete an Allocation. This restores the open amounts of the two lines it settled.- Path params:
entityId(UUID),allocationId(UUID) - Success response: the deleted Allocation object (same fields as the list response)
- Status: 200
POST /api/entities/:entityId/ledger/allocations/match
Auto-match a selection of Open-Item lines. The selection is split by side, greedily decomposed into debit/credit pairs, and every resulting Allocation is created in one transaction. The selection must contain at least two lines, at least one debit and one credit, and all lines must belong to the same Open-Item Account.- Path param:
entityId(UUID) - Body:
- Success response: the Allocations written and every line they changed
- Status: 201
Each item in
settledLines:

