Skip to main content
GET
Get the ledger balance for a referral

Authorizations

X-API-Key
string
header
required

Public API key: cxp_<hex> (firm-scoped) or cxpp_<hex> (provider-scoped). Required on every request.

Path Parameters

caseId
string<uuid>
required

Med case UUID: medCaseId in the referral.* webhook payload, or the id from GET /med-cases.

referralId
string<uuid>
required

Med referral UUID: the referral of this case to your pharmacy practice. Find it with GET /med-cases/{id}/referrals, or take it from the referral.* webhook payload.

Response

Ledger totals

data
object
required

Ledger totals for a pharmacy referral. computedBalance = billed (sum of billedAmount over non-voided fills) − paid − adjustments. A positive transaction amount reduces the balance; a negative one (a take-back) increases it. reported is the latest snapshot by asOf (ties broken by creation time) and difference = reported.balance − computedBalance, so a positive difference means the pharmacy reports more outstanding than the ledger computes. A REVERSAL is bucketed with the transaction it reverses; one with no reversesTransactionId, or whose target is not in the ledger, counts as paid. All money values are decimal strings with two fractional digits.

meta
object
required