On this page
Party exposure
Get a party’s exposure
GET /ledger/v1/parties/{partyId}/exposure
partyId is the party’s UUID. The same party may appear as customer, supplier and owner — the endpoint sums each role separately and nets AR against AP.
curl "http://localhost:8081/ledger/v1/parties/6f1c…/exposure?receivableAccounts=1500&payableAccounts=2400&timePeriodType=YEAR&timePeriodValue=2026" \
-H "X-Tenant-ID: org-84120557"
Query parameters
| Parameter | Required | Notes |
|---|---|---|
receivableAccounts | yes | Codes/ranges for accounts receivable |
payableAccounts | yes | Codes/ranges for accounts payable |
ownerAccounts | no | Codes/ranges for owner/equity accounts |
timePeriodType | no | Default YEAR |
timePeriodValue | no | Default: current year |
Response — 200 OK
{
"partyId": "6f1c…",
"timePeriodType": "YEAR",
"timePeriodValue": "2026",
"receivable": 50000,
"payable": 20000,
"net": 30000,
"roles": [
{ "role": "CUSTOMER", "accountCodes": ["1500"], "balance": 50000 },
{ "role": "SUPPLIER", "accountCodes": ["2400"], "balance": -20000 }
]
}
net = receivable − payable. An owner/COUNTERPARTY balance appears in roles but is excluded from net.
An unknown party — or a party with no activity — returns 200 with zeroes and empty roles, not 404.
| Status | Cause |
|---|---|
400 | partyId is not a UUID, or invalid account syntax |
403 | No read access to tenant |