Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy’s own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. “40.00”, “-15.00”), whatever precision was sent.
GET
/
med-cases
/
{caseId}
/
referrals
/
{referralId}
/
pharmacy
/
balance
Get the ledger balance for a referral
curl --request GET \ --url https://api.casexchange.com/api/public/v1/med-cases/{caseId}/referrals/{referralId}/pharmacy/balance \ --header 'X-API-Key: <api-key>'
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.
Show child attributes
meta
object
required
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"CaseXchange Public API","colors":{"primary":"#EA4E00","light":"#FF8142","dark":"#EA4E00"},"logo":{"light":"https://mintcdn.com/casexchange/KOlGhBF7XhztshRX/logo/light.png?fit=max\u0026auto=format\u0026n=KOlGhBF7XhztshRX\u0026q=85\u0026s=deebe246bf795c2ec8e597745d5a7506","dark":"https://mintcdn.com/casexchange/KOlGhBF7XhztshRX/logo/dark.png?fit=max\u0026auto=format\u0026n=KOlGhBF7XhztshRX\u0026q=85\u0026s=c28ea6f63b6fdd1aa1bb8b56da7d6cd8"},"favicon":"https://mintcdn.com/casexchange/KOlGhBF7XhztshRX/logo/favicon.png?fit=max\u0026auto=format\u0026n=KOlGhBF7XhztshRX\u0026q=85\u0026s=e2c7e208bb808008bf629ebc064d391d","navbar":{"links":[{"href":"/postman/CaseXchange-Public-API.postman_collection.json","label":"Postman Collection"},{"href":"mailto:help@casexchange.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.casexchange.com"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/case-xchange"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"casexchange","hasAudioNarration":false,"actualSubdomain":"casexchange","customDomains":["docs.casexchange.com"],"gitSource":{"type":"github","owner":"casexchange","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10c5879ffae5051c406bed"},"entitlements":{},"buildId":"6b024522839604291951bb79","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"API","count":158},{"language":"default","tag":"Endpoints","count":154},{"language":"default","tag":"Webhooks","count":22},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"Med Cases","count":19},{"language":"default","tag":"Referrals","count":16},{"language":"default","tag":"MedEx Pharmacy","count":13},{"language":"default","tag":"Analytics","count":9},{"language":"default","tag":"Cases","count":9},{"language":"default","tag":"Get started","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral","slug":"/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral","pageMetadata":{"title":"Get the ledger balance for a referral","description":"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy's own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \"40.00\", \"-15.00\"), whatever precision was sent.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/balance","href":"/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy’s own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. “40.00”, “-15.00”), whatever precision was sent.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get the ledger balance for a referral","description":"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy's own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \"40.00\", \"-15.00\"), whatever precision was sent.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/balance","href":"/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"getPharmacyBalance","summary":"Get the ledger balance for a referral","description":"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy's own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \"40.00\", \"-15.00\"), whatever precision was sent.","tags":["Med Pharmacy Ledger"],"security":["362451f5-e829-41e9-8ed4-cc41d30a75d2"],"x-access-tier":"read_only","parameters":["1cc3c4a2-a028-4ceb-a6a7-98c0fc22e474","8485f1de-d14b-4a5d-872f-fb6e6e76b9b4"],"responses":{"200":"c9e40ff3-5b2a-490d-8dd3-5a274982ea58","400":"2dc4a971-f3a4-463f-9e8a-bb1f9848e35a","401":"8c1ddada-9ca2-490c-ba85-d4d57501c11e","403":"651bf055-56e2-4703-a519-2c1772e25d8f","404":"34a377f6-eb0d-47ad-86c8-19eda8780ea0"},"method":"get","type":"path","servers":["345f5755-9455-47f7-b251-5ea16ce352e2","95e4cacd-c70c-4f31-af42-14e9bf3f2ac6"],"path":"/med-cases/{caseId}/referrals/{referralId}/pharmacy/balance","baseUrlOptions":["https://api.casexchange.com/api/public/v1","/api/public/v1"],"title":"Get the ledger balance for a referral","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"1cc3c4a2-a028-4ceb-a6a7-98c0fc22e474":{"in":"path","name":"caseId","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"description":"Med case UUID: medCaseId in the referral.* webhook payload, or the id from GET /med-cases.","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"Med case UUID: medCaseId in the referral.* webhook payload, or the id from GET /med-cases."},"8485f1de-d14b-4a5d-872f-fb6e6e76b9b4":{"in":"path","name":"referralId","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"description":"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.","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"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."}},"responses":{"c9e40ff3-5b2a-490d-8dd3-5a274982ea58":{"description":"Ledger totals","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"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.","properties":{"billed":{"type":"string","description":"Sum of billedAmount over non-voided fills.","isRequired":true,"uniqueKey":"data.billed","typeLabel":"string"},"paid":{"type":"string","description":"Sum of PAYMENT and REFUND amounts, plus REVERSALs of those, signed as posted. A REVERSAL with no reversesTransactionId, or whose target is not in the ledger, counts under paid.","isRequired":true,"uniqueKey":"data.paid","typeLabel":"string"},"adjustments":{"type":"string","description":"Sum of ADJUSTMENT and WRITE_OFF amounts, plus REVERSALs of those, signed as posted.","isRequired":true,"uniqueKey":"data.adjustments","typeLabel":"string"},"computedBalance":{"type":"string","description":"billed − paid − adjustments. May be negative (overpaid).","isRequired":true,"uniqueKey":"data.computedBalance","typeLabel":"string"},"reported":{"oneOf":[{"type":"object","description":"Latest reported balance snapshot; null when none has been posted.","properties":{"balance":{"type":"string","isRequired":true,"uniqueKey":"data.reported.oneOf.0.balance","typeLabel":"string"},"asOf":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.reported.oneOf.0.asOf","typeLabel":"string\u003cdate-time>"},"externalId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.reported.oneOf.0.externalId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.reported.oneOf.0.externalId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.reported.oneOf.0.externalId","typeLabel":"string | null"}},"required":["balance","asOf","externalId"],"isRequired":true,"uniqueKey":"data.reported.oneOf.0","typeLabel":"object"},{"type":"null","description":"Latest reported balance snapshot; null when none has been posted.","properties":{"balance":{"type":"string"},"asOf":{"type":"string","format":"date-time"},"externalId":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["balance","asOf","externalId"],"isRequired":true,"uniqueKey":"data.reported.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.reported","typeLabel":"object | null"},"difference":{"oneOf":[{"type":"string","description":"reported.balance − computedBalance; null when there is no reported balance.","isRequired":true,"uniqueKey":"data.difference.oneOf.0","typeLabel":"string"},{"type":"null","description":"reported.balance − computedBalance; null when there is no reported balance.","isRequired":true,"uniqueKey":"data.difference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.difference","typeLabel":"string | null"},"fillCount":{"type":"integer","description":"Number of non-voided fills.","isRequired":true,"uniqueKey":"data.fillCount","typeLabel":"integer"},"transactionCount":{"type":"integer","description":"Number of transactions, including reversals.","isRequired":true,"uniqueKey":"data.transactionCount","typeLabel":"integer"}},"required":["billed","paid","adjustments","computedBalance","reported","difference","fillCount","transactionCount"],"isRequired":true,"uniqueKey":"data","typeLabel":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"req_f2dbe1d3f6ad4a7bb5b4c9f2","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"meta.timestamp","typeLabel":"string\u003cdate-time>"}},"required":["requestId","timestamp"],"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"required":["data","meta"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"billed":"\u003cstring>","paid":"\u003cstring>","adjustments":"\u003cstring>","computedBalance":"\u003cstring>","reported":{"balance":"\u003cstring>","asOf":"2023-11-07T05:31:56Z","externalId":"\u003cstring>"},"difference":"\u003cstring>","fillCount":123,"transactionCount":123},"meta":{"requestId":"req_f2dbe1d3f6ad4a7bb5b4c9f2","timestamp":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"2dc4a971-f3a4-463f-9e8a-bb1f9848e35a":{"description":"Request validation failed (`validation_error`; error.details is `{ endpoint, errors: [{ path, message }] }`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable code. New with the pharmacy ledger: pharmacy_only, referral_not_writable, fill_voided, external_id_conflict, immutable_field, invalid_reference. Others are the standard public API codes (validation_error, not_found, wrong_scope, restricted_access, ...).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Present for the codes listed above.","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"req_f2dbe1d3f6ad4a7bb5b4c9f2","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"meta.timestamp","typeLabel":"string\u003cdate-time>"}},"required":["requestId","timestamp"],"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"required":["error","meta"],"description":"Standard error envelope. `error.details` is present for some codes: `validation_error` carries `{ endpoint, errors: [{ path, message }] }` (path is the dotted field path, e.g. \"body.amount\" or \"query.limit\"), `external_id_conflict` carries `{ existingId }`, `invalid_reference` carries `{ field }`, `immutable_field` carries `{ fields }`, `referral_not_writable` carries `{ status, isArchived }`.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}},"meta":{"requestId":"req_f2dbe1d3f6ad4a7bb5b4c9f2","timestamp":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"8c1ddada-9ca2-490c-ba85-d4d57501c11e":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"req_f2dbe1d3f6ad4a7bb5b4c9f2","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"meta.timestamp","typeLabel":"string\u003cdate-time>"}},"required":["requestId","timestamp"],"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"required":["error","meta"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"},"meta":{"requestId":"req_f2dbe1d3f6ad4a7bb5b4c9f2","timestamp":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"651bf055-56e2-4703-a519-2c1772e25d8f":{"description":"`wrong_scope` (admin key), `restricted_access`, or the API key tier does not permit this action.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable code. New with the pharmacy ledger: pharmacy_only, referral_not_writable, fill_voided, external_id_conflict, immutable_field, invalid_reference. Others are the standard public API codes (validation_error, not_found, wrong_scope, restricted_access, ...).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Present for the codes listed above.","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"req_f2dbe1d3f6ad4a7bb5b4c9f2","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"meta.timestamp","typeLabel":"string\u003cdate-time>"}},"required":["requestId","timestamp"],"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"required":["error","meta"],"description":"Standard error envelope. `error.details` is present for some codes: `validation_error` carries `{ endpoint, errors: [{ path, message }] }` (path is the dotted field path, e.g. \"body.amount\" or \"query.limit\"), `external_id_conflict` carries `{ existingId }`, `invalid_reference` carries `{ field }`, `immutable_field` carries `{ fields }`, `referral_not_writable` carries `{ status, isArchived }`.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}},"meta":{"requestId":"req_f2dbe1d3f6ad4a7bb5b4c9f2","timestamp":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"34a377f6-eb0d-47ad-86c8-19eda8780ea0":{"description":"Case, referral or record not found. A referral that belongs to another practice is reported as 404.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable code. New with the pharmacy ledger: pharmacy_only, referral_not_writable, fill_voided, external_id_conflict, immutable_field, invalid_reference. Others are the standard public API codes (validation_error, not_found, wrong_scope, restricted_access, ...).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Present for the codes listed above.","uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"req_f2dbe1d3f6ad4a7bb5b4c9f2","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"meta.timestamp","typeLabel":"string\u003cdate-time>"}},"required":["requestId","timestamp"],"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"required":["error","meta"],"description":"Standard error envelope. `error.details` is present for some codes: `validation_error` carries `{ endpoint, errors: [{ path, message }] }` (path is the dotted field path, e.g. \"body.amount\" or \"query.limit\"), `external_id_conflict` carries `{ existingId }`, `invalid_reference` carries `{ field }`, `immutable_field` carries `{ fields }`, `referral_not_writable` carries `{ status, isArchived }`.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":{}},"meta":{"requestId":"req_f2dbe1d3f6ad4a7bb5b4c9f2","timestamp":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"362451f5-e829-41e9-8ed4-cc41d30a75d2":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Public API key: `cxp_\u003chex>` (firm-scoped) or `cxpp_\u003chex>` (provider-scoped). Required on every request.","scopes":[],"schemeName":"apiKeyAuth"}}},"servers":{"345f5755-9455-47f7-b251-5ea16ce352e2":{"url":"https://api.casexchange.com/api/public/v1","description":"Production Public API base path"},"95e4cacd-c70c-4f31-af42-14e9bf3f2ac6":{"url":"/api/public/v1","description":"Relative base path (for proxied docs/local environments)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Public API key: `cxp_\u003chex>` (firm-scoped) or `cxpp_\u003chex>` (provider-scoped). Required on every request.","scopes":[],"schemeName":"apiKeyAuth"},"schema":{"title":"X-API-Key","type":"string","description":"Public API key: `cxp_\u003chex>` (firm-scoped) or `cxpp_\u003chex>` (provider-scoped). Required on every request.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKeyAuth","name":"X-API-Key"}],"title":"apiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.yml"},"subdomain":"casexchange","siteName":"CaseXchange Public API","title":"Get the ledger balance for a referral - CaseXchange Public API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-22T01:28:10.959Z","originalFileLocation":"api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy\u0026#x27;s own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \u0026quot;40.00\u0026quot;, \u0026quot;-15.00\u0026quot;), whatever precision was sent.\">\u003cmeta data-mint-head name=\"application-name\" content=\"CaseXchange Public API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get the ledger balance for a referral - CaseXchange Public API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy\u0026#x27;s own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \u0026quot;40.00\u0026quot;, \u0026quot;-15.00\u0026quot;), whatever precision was sent.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CaseXchange Public API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://casexchange.mintlify.site/_mintlify/api/og/v2?division=MedEx+Pharmacy\u0026amp;title=Get+the+ledger+balance+for+a+referral\u0026amp;description=Firm+keys+read+their+own+cases%3B+a+provider+key+reads+its+own+referral.+Admin+keys+receive+403+wrong_scope.+Restricted-access+practices+receive+403+restricted_ac\u0026amp;theme=2a243f5ae05e2e0c81058e5c\u0026amp;signature=e924774f6d06444e6ffbd95dff9b25bee419f11b10117e4e4ea8afeff42bcc52\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get the ledger balance for a referral - CaseXchange Public API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy\u0026#x27;s own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \u0026quot;40.00\u0026quot;, \u0026quot;-15.00\u0026quot;), whatever precision was sent.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://casexchange.mintlify.site/_mintlify/api/og/v2?division=MedEx+Pharmacy\u0026amp;title=Get+the+ledger+balance+for+a+referral\u0026amp;description=Firm+keys+read+their+own+cases%3B+a+provider+key+reads+its+own+referral.+Admin+keys+receive+403+wrong_scope.+Restricted-access+practices+receive+403+restricted_ac\u0026amp;theme=2a243f5ae05e2e0c81058e5c\u0026amp;signature=e924774f6d06444e6ffbd95dff9b25bee419f11b10117e4e4ea8afeff42bcc52\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/casexchange/5ej00RttGW84DLNC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CaseXchange Public API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EA4E00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.casexchange.com/#organization\",\"name\":\"CaseXchange Public API\",\"url\":\"https://docs.casexchange.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/casexchange/KOlGhBF7XhztshRX/logo/light.png?fit=max\u0026auto=format\u0026n=KOlGhBF7XhztshRX\u0026q=85\u0026s=deebe246bf795c2ec8e597745d5a7506\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.casexchange.com#website\",\"name\":\"CaseXchange Public API\",\"url\":\"https://docs.casexchange.com\",\"publisher\":{\"@id\":\"https://docs.casexchange.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral#webpage\",\"url\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral\",\"name\":\"Get the ledger balance for a referral\",\"description\":\"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy's own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \\\"40.00\\\", \\\"-15.00\\\"), whatever precision was sent.\",\"dateModified\":\"2026-11-22T01:28:10.959Z\",\"isPartOf\":{\"@id\":\"https://docs.casexchange.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.casexchange.com/api-reference/account/identify-the-calling-api-key\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MedEx Pharmacy\",\"item\":\"https://docs.casexchange.com/api-reference/med-prescriptions/list-prescriptions-routed-to-your-pharmacy\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Get the ledger balance for a referral\",\"item\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral#apireference\",\"headline\":\"Get the ledger balance for a referral\",\"name\":\"Get the ledger balance for a referral\",\"description\":\"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. computedBalance = billed (non-voided fills) − paid − adjustments, so a positive transaction amount reduces the balance. reported is the latest balance snapshot by asOf, and difference = reported − computed (null when no snapshot exists), which shows how far the pharmacy's own figure is from the ledger. Money in responses is always a decimal string with exactly two fractional digits (e.g. \\\"40.00\\\", \\\"-15.00\\\"), whatever precision was sent.\",\"url\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral\",\"mainEntityOfPage\":{\"@id\":\"https://docs.casexchange.com/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral#webpage\"},\"dateModified\":\"2026-11-22T01:28:10.959Z\",\"publisher\":{\"@id\":\"https://docs.casexchange.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.casexchange.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"CaseXchange Public API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"CaseXchange Public API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral.md","siteName":"CaseXchange Public API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API","groups":[{"group":"Get started","pages":[{"title":"Integration Overview","icon":"terminal","sidebarTitle":"Introduction","href":"/api-reference/overview"},{"title":"Response Format","icon":"brackets-curly","sidebarTitle":"Response format","href":"/api-reference/response-format"},{"title":"Error Handling","icon":"triangle-exclamation","sidebarTitle":"Error handling","href":"/api-reference/error-handling"},{"title":"Integration Workflows","icon":"diagram-project","sidebarTitle":"Workflows","href":"/api-reference/workflows"}]},{"group":"Endpoints","pages":[{"group":"Account","expanded":false,"pages":[{"title":"Identify the calling API key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /me","href":"/api-reference/account/identify-the-calling-api-key"},{"title":"List your practice's clinicians","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /me/doctors","href":"/api-reference/account/list-your-practices-clinicians"},{"title":"List your practice's locations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /me/locations","href":"/api-reference/account/list-your-practices-locations"}]},{"group":"Analytics","expanded":false,"pages":[{"title":"Get dashboard analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/dashboard","href":"/api-reference/analytics/get-dashboard-analytics"},{"title":"Get case analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/cases","href":"/api-reference/analytics/get-case-analytics"},{"title":"Get sent-referral analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/sent","href":"/api-reference/analytics/get-sent-referral-analytics"},{"title":"Get received-referral analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/received","href":"/api-reference/analytics/get-received-referral-analytics"},{"title":"Get homepage analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/homepage","href":"/api-reference/analytics/get-homepage-analytics"},{"title":"List cases in a status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/cases-by-status","href":"/api-reference/analytics/list-cases-in-a-status"},{"title":"Get received-referral revenue analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/revenue-received","href":"/api-reference/analytics/get-received-referral-revenue-analytics"},{"title":"Get sent-referral revenue analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/revenue-sent","href":"/api-reference/analytics/get-sent-referral-revenue-analytics"},{"title":"Get referral-flow analytics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/referrals","href":"/api-reference/analytics/get-referral-flow-analytics"}]},{"group":"Cases","expanded":false,"pages":[{"title":"List cases","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /cases","href":"/api-reference/cases/list-cases"},{"title":"Create a case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /cases","href":"/api-reference/cases/create-a-case"},{"title":"Get case by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /cases/{id}","href":"/api-reference/cases/get-case-by-id"},{"title":"Update a case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /cases/{id}","href":"/api-reference/cases/update-a-case"},{"title":"Delete a case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /cases/{id}","href":"/api-reference/cases/delete-a-case"},{"title":"Get case status history","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /cases/{id}/status-history","href":"/api-reference/cases/get-case-status-history"},{"title":"Acknowledge a case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /cases/{id}/acknowledge","href":"/api-reference/cases/acknowledge-a-case"},{"title":"Update case status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /cases/{id}/status","href":"/api-reference/cases/update-case-status"},{"title":"Close a case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /cases/{id}/close","href":"/api-reference/cases/close-a-case"}]},{"group":"Documents","expanded":false,"pages":[{"title":"List documents for a case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /cases/{caseId}/documents","href":"/api-reference/documents/list-documents-for-a-case"},{"title":"Upload a document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /cases/{caseId}/documents","href":"/api-reference/documents/upload-a-document"},{"title":"Get document download URL","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /cases/{caseId}/documents/{docId}/download","href":"/api-reference/documents/get-document-download-url"},{"title":"Delete a document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /cases/{caseId}/documents/{docId}","href":"/api-reference/documents/delete-a-document"}]},{"group":"Export","expanded":false,"pages":[{"title":"Download the full analytics workbook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/export","href":"/api-reference/export/download-the-full-analytics-workbook"},{"title":"Download one analytics category as XLSX","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /analytics/{category}/export","href":"/api-reference/export/download-one-analytics-category-as-xlsx"},{"title":"Download case data as CSV or XLSX","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /cases/export","href":"/api-reference/export/download-case-data-as-csv-or-xlsx"}]},{"group":"Extension","expanded":false,"pages":[{"title":"Report a selector miss from the browser extension","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /extension/telemetry/selector-miss","href":"/api-reference/extension/report-a-selector-miss-from-the-browser-extension"}]},{"group":"External Links","expanded":false,"pages":[{"title":"List external links for a system","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /external-links/list","href":"/api-reference/external-links/list-external-links-for-a-system"},{"title":"Look up a link by external ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /external-links","href":"/api-reference/external-links/look-up-a-link-by-external-id"},{"title":"Create an external link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /external-links","href":"/api-reference/external-links/create-an-external-link"},{"title":"Replace an external link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /external-links/{id}/replace","href":"/api-reference/external-links/replace-an-external-link"},{"title":"Delete an external link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /external-links/{id}","href":"/api-reference/external-links/delete-an-external-link"}]},{"group":"Firms","expanded":false,"pages":[{"title":"List firms directory","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /firms/directory","href":"/api-reference/firms/list-firms-directory"},{"title":"Get the caller's firm","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /firms/me","href":"/api-reference/firms/get-the-callers-firm"},{"title":"Update the caller's firm","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /firms/me","href":"/api-reference/firms/update-the-callers-firm"},{"title":"List firms available to receive referrals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /firms/available","href":"/api-reference/firms/list-firms-available-to-receive-referrals"},{"title":"Get firm by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /firms/{id}","href":"/api-reference/firms/get-firm-by-id"}]},{"group":"Health","expanded":false,"pages":[{"title":"Public API health check","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /health","href":"/api-reference/health/public-api-health-check"}]},{"group":"Import","expanded":false,"pages":[{"title":"Bulk import cases via CSV","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /import/cases","href":"/api-reference/import/bulk-import-cases-via-csv"},{"title":"Bulk update cases via CSV","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /import/cases/update","href":"/api-reference/import/bulk-update-cases-via-csv"},{"title":"Get a bulk update job","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /import/cases/update/jobs/{jobId}","href":"/api-reference/import/get-a-bulk-update-job"}]},{"group":"Med Cases","expanded":false,"pages":[{"title":"List med cases","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases","href":"/api-reference/med-cases/list-med-cases"},{"title":"Create a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases","href":"/api-reference/med-cases/create-a-med-case"},{"title":"Get med case by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{id}","href":"/api-reference/med-cases/get-med-case-by-id"},{"title":"Update a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /med-cases/{id}","href":"/api-reference/med-cases/update-a-med-case"},{"title":"Delete a med case (not supported)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /med-cases/{id}","href":"/api-reference/med-cases/delete-a-med-case-not-supported"},{"title":"List referrals on a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{id}/referrals","href":"/api-reference/med-cases/list-referrals-on-a-med-case"},{"title":"Create a referral on a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals","href":"/api-reference/med-cases/create-a-referral-on-a-med-case"},{"title":"Get a referral on a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{id}/referrals/{referralId}","href":"/api-reference/med-cases/get-a-referral-on-a-med-case"},{"title":"Update a referral on a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /med-cases/{id}/referrals/{referralId}","href":"/api-reference/med-cases/update-a-referral-on-a-med-case"},{"title":"Acknowledge a med referral (provider)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/acknowledge","href":"/api-reference/med-cases/acknowledge-a-med-referral-provider"},{"title":"Accept a med referral (provider)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/accept","href":"/api-reference/med-cases/accept-a-med-referral-provider"},{"title":"Reject a med referral (provider)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/reject","href":"/api-reference/med-cases/reject-a-med-referral-provider"},{"title":"Start treatment on a med referral (provider)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/start-treatment","href":"/api-reference/med-cases/start-treatment-on-a-med-referral-provider"},{"title":"Complete treatment on a med referral (provider)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/complete-treatment","href":"/api-reference/med-cases/complete-treatment-on-a-med-referral-provider"},{"title":"Withdraw a med referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/withdraw","href":"/api-reference/med-cases/withdraw-a-med-referral"},{"title":"Close a med referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{id}/referrals/{referralId}/close","href":"/api-reference/med-cases/close-a-med-referral"},{"title":"List insurance records the API key can access","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /insurances","href":"/api-reference/med-cases/list-insurance-records-the-api-key-can-access"},{"title":"Get a single insurance record","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /insurances/{id}","href":"/api-reference/med-cases/get-a-single-insurance-record"},{"title":"List insurance records for a single med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{id}/insurances","href":"/api-reference/med-cases/list-insurance-records-for-a-single-med-case"}]},{"group":"Med Appointments","expanded":false,"pages":[{"title":"List appointments on a med case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/appointments","href":"/api-reference/med-appointments/list-appointments-on-a-med-case"},{"title":"Add an appointment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/appointments","href":"/api-reference/med-appointments/add-an-appointment"},{"title":"Get an appointment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/appointments/{appointmentId}","href":"/api-reference/med-appointments/get-an-appointment"},{"title":"Edit an appointment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /med-cases/{caseId}/appointments/{appointmentId}","href":"/api-reference/med-appointments/edit-an-appointment"},{"title":"Remove an appointment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /med-cases/{caseId}/appointments/{appointmentId}","href":"/api-reference/med-appointments/remove-an-appointment"}]},{"group":"Med Billing","expanded":false,"pages":[{"title":"List billing lines on an appointment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/appointments/{appointmentId}/billable-events","href":"/api-reference/med-billing/list-billing-lines-on-an-appointment"},{"title":"Add a billing line","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/appointments/{appointmentId}/billable-events","href":"/api-reference/med-billing/add-a-billing-line"},{"title":"Edit a billing line","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /med-cases/{caseId}/appointments/{appointmentId}/billable-events/{eventId}","href":"/api-reference/med-billing/edit-a-billing-line"},{"title":"Remove a billing line","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /med-cases/{caseId}/appointments/{appointmentId}/billable-events/{eventId}","href":"/api-reference/med-billing/remove-a-billing-line"}]},{"group":"MedEx Documents","expanded":false,"pages":[{"title":"List MedEx case documents","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/documents","href":"/api-reference/medex-documents/list-medex-case-documents"},{"title":"Upload a MedEx case document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/documents","href":"/api-reference/medex-documents/upload-a-medex-case-document"},{"title":"Retrieve a MedEx case document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/documents/{documentId}","href":"/api-reference/medex-documents/retrieve-a-medex-case-document"}]},{"group":"MedEx Pharmacy","expanded":false,"pages":[{"title":"List prescriptions routed to your pharmacy","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/prescriptions","href":"/api-reference/med-prescriptions/list-prescriptions-routed-to-your-pharmacy"},{"title":"List pharmacy fills on a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/fills","href":"/api-reference/med-pharmacy-ledger/list-pharmacy-fills-on-a-referral"},{"title":"Record a dispensed fill","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/referrals/{referralId}/pharmacy/fills","href":"/api-reference/med-pharmacy-ledger/record-a-dispensed-fill"},{"title":"Get a pharmacy fill","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/fills/{fillId}","href":"/api-reference/med-pharmacy-ledger/get-a-pharmacy-fill"},{"title":"Edit a pharmacy fill","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /med-cases/{caseId}/referrals/{referralId}/pharmacy/fills/{fillId}","href":"/api-reference/med-pharmacy-ledger/edit-a-pharmacy-fill"},{"title":"Void a pharmacy fill","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/referrals/{referralId}/pharmacy/fills/{fillId}/void","href":"/api-reference/med-pharmacy-ledger/void-a-pharmacy-fill"},{"title":"List pharmacy transactions on a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/transactions","href":"/api-reference/med-pharmacy-ledger/list-pharmacy-transactions-on-a-referral"},{"title":"Record a payment or adjustment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/referrals/{referralId}/pharmacy/transactions","href":"/api-reference/med-pharmacy-ledger/record-a-payment-or-adjustment"},{"title":"Get a pharmacy transaction","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/transactions/{transactionId}","href":"/api-reference/med-pharmacy-ledger/get-a-pharmacy-transaction"},{"title":"Edit a transaction's details","description":"Only payer, reference, note and fillId can change; send at least one. type, amount, transactionDate and reversesTransactionId are immutable: sending any of them returns 400 immutable_field (error.details.fields), so correct money by posting a REVERSAL. Requires a provider-scoped key (cxpp_) for a pharmacy practice at STANDARD tier, on the practice's own referral. Firm keys receive 403 wrong_scope; a non-pharmacy practice receives 403 pharmacy_only; another practice's referral is 404. Writes are accepted while the referral is accepted, in treatment, treatment complete, closed or withdrawn — payments often arrive after the firm closes the case — and refused with 409 referral_not_writable while sent, under review, rejected or archived. Restricted-access practices receive 403 restricted_access. Emits a pharmacy_transaction.updated webhook.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /med-cases/{caseId}/referrals/{referralId}/pharmacy/transactions/{transactionId}","href":"/api-reference/med-pharmacy-ledger/edit-a-transactions-details"},{"title":"Get the ledger balance for a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/balance","href":"/api-reference/med-pharmacy-ledger/get-the-ledger-balance-for-a-referral"},{"title":"List reported balance snapshots","description":"Firm keys read their own cases; a provider key reads its own referral. Admin keys receive 403 wrong_scope. Restricted-access practices receive 403 restricted_access. Reads are allowed in any referral status. History of balances the pharmacy reported, newest asOf first. Unknown query parameters are rejected with 400 validation_error.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /med-cases/{caseId}/referrals/{referralId}/pharmacy/balance-snapshots","href":"/api-reference/med-pharmacy-ledger/list-reported-balance-snapshots"},{"title":"Report your current balance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /med-cases/{caseId}/referrals/{referralId}/pharmacy/balance-snapshots","href":"/api-reference/med-pharmacy-ledger/report-your-current-balance"}]},{"group":"Messages","expanded":false,"pages":[{"title":"Send a partner message","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /messages/send","href":"/api-reference/messages/send-a-partner-message"}]},{"group":"Network","expanded":false,"pages":[{"title":"List pending relationships","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /network/pending","href":"/api-reference/network/list-pending-relationships"},{"title":"Get an outbound network firm","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /network/outbound/{firmId}","href":"/api-reference/network/get-an-outbound-network-firm"},{"title":"Create or update an outbound relationship","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /network/outbound/{firmId}","href":"/api-reference/network/create-or-update-an-outbound-relationship"},{"title":"Update an outbound relationship","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /network/outbound/{firmId}","href":"/api-reference/network/update-an-outbound-relationship"},{"title":"Get an inbound network firm","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /network/inbound/{firmId}","href":"/api-reference/network/get-an-inbound-network-firm"},{"title":"Update or accept/reject an inbound relationship","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /network/inbound/{firmId}","href":"/api-reference/network/update-or-acceptreject-an-inbound-relationship"}]},{"group":"Notifications","expanded":false,"pages":[{"title":"Get notification preferences","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /notifications/preferences","href":"/api-reference/notifications/get-notification-preferences"},{"title":"Update notification preferences","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /notifications/preferences","href":"/api-reference/notifications/update-notification-preferences"},{"title":"List notification email addresses","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /notifications/emails","href":"/api-reference/notifications/list-notification-email-addresses"},{"title":"Add a notification email address","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /notifications/emails","href":"/api-reference/notifications/add-a-notification-email-address"}]},{"group":"Received Referrals","expanded":false,"pages":[{"title":"List received referrals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /received-referrals","href":"/api-reference/received-referrals/list-received-referrals"},{"title":"Get available status transitions (receiver)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /received-referrals/{id}/available-statuses","href":"/api-reference/received-referrals/get-available-status-transitions-receiver"},{"title":"Get a received referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /received-referrals/{id}","href":"/api-reference/received-referrals/get-a-received-referral"},{"title":"Update a received referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /received-referrals/{id}","href":"/api-reference/received-referrals/update-a-received-referral"}]},{"group":"Reference Data","expanded":false,"pages":[{"title":"List case types","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /case-types","href":"/api-reference/reference-data/list-case-types"},{"title":"List custom fields for a case type","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /case-types/{id}/fields","href":"/api-reference/reference-data/list-custom-fields-for-a-case-type"},{"title":"List jurisdictions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /jurisdictions","href":"/api-reference/reference-data/list-jurisdictions"},{"title":"List counties","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /counties","href":"/api-reference/reference-data/list-counties"}]},{"group":"Referrals","expanded":false,"pages":[{"title":"List referrals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /referrals","href":"/api-reference/referrals/list-referrals"},{"title":"Find referrals by client identifiers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/match","href":"/api-reference/referrals/find-referrals-by-client-identifiers"},{"title":"Get referral status history","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /referrals/{id}/status-history","href":"/api-reference/referrals/get-referral-status-history"},{"title":"Get available status transitions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /referrals/{id}/available-statuses","href":"/api-reference/referrals/get-available-status-transitions"},{"title":"Get referral by ID","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /referrals/{id}","href":"/api-reference/referrals/get-referral-by-id"},{"title":"Update a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /referrals/{id}","href":"/api-reference/referrals/update-a-referral"},{"title":"Delete a draft referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /referrals/{id}","href":"/api-reference/referrals/delete-a-draft-referral"},{"title":"Send a draft referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/send","href":"/api-reference/referrals/send-a-draft-referral"},{"title":"Acknowledge a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/acknowledge","href":"/api-reference/referrals/acknowledge-a-referral"},{"title":"Begin investigating","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/begin-investigating","href":"/api-reference/referrals/begin-investigating"},{"title":"Mark a referral as signed","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/sign","href":"/api-reference/referrals/mark-a-referral-as-signed"},{"title":"Start litigation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/start-litigation","href":"/api-reference/referrals/start-litigation"},{"title":"Begin closing","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/begin-closing","href":"/api-reference/referrals/begin-closing"},{"title":"Close a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/close","href":"/api-reference/referrals/close-a-referral"},{"title":"Reject a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/reject","href":"/api-reference/referrals/reject-a-referral"},{"title":"Withdraw a referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /referrals/{id}/withdraw","href":"/api-reference/referrals/withdraw-a-referral"}]},{"group":"Routing","expanded":false,"pages":[{"title":"Evaluate routing for a case profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /routing/evaluate","href":"/api-reference/routing/evaluate-routing-for-a-case-profile"},{"title":"Evaluate routing for an existing case (re-refer)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /routing/re-refer","href":"/api-reference/routing/evaluate-routing-for-an-existing-case-re-refer"},{"title":"List routing rules","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /routing/rules","href":"/api-reference/routing/list-routing-rules"},{"title":"Create a routing rule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /routing/rules","href":"/api-reference/routing/create-a-routing-rule"},{"title":"Update a routing rule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /routing/rules/{id}","href":"/api-reference/routing/update-a-routing-rule"},{"title":"Delete a routing rule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /routing/rules/{id}","href":"/api-reference/routing/delete-a-routing-rule"}]},{"group":"Salesforce","expanded":false,"pages":[{"title":"Get the active sending-profile mapping for an object/record-type","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /salesforce/send-mapping","href":"/api-reference/salesforce/get-the-active-sending-profile-mapping-for-an-objectrecord-type"},{"title":"Send a Salesforce record to CaseXchange as a new case or re-referral","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /salesforce/interactive-sends","href":"/api-reference/salesforce/send-a-salesforce-record-to-casexchange-as-a-new-case-or-re-referral"}]},{"group":"Sent Cases","expanded":false,"pages":[{"title":"List sent cases","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /sent-cases","href":"/api-reference/sent-cases/list-sent-cases"},{"title":"Create a sent case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /sent-cases","href":"/api-reference/sent-cases/create-a-sent-case"},{"title":"Get a sent case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /sent-cases/{id}","href":"/api-reference/sent-cases/get-a-sent-case"},{"title":"Update a sent case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /sent-cases/{id}","href":"/api-reference/sent-cases/update-a-sent-case"},{"title":"Get available status transitions (sender)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /sent-cases/{id}/available-statuses","href":"/api-reference/sent-cases/get-available-status-transitions-sender"},{"title":"Refer / re-refer a sent case","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /sent-cases/{id}/refer","href":"/api-reference/sent-cases/refer-re-refer-a-sent-case"}]},{"group":"SSO","expanded":false,"pages":[{"title":"Mint a single-use SSO link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /sso-links","href":"/api-reference/sso/mint-a-single-use-sso-link"}]},{"group":"Status Updates","expanded":false,"pages":[{"title":"Look up status updates by flexible id","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /status-updates/lookup","href":"/api-reference/status-updates/look-up-status-updates-by-flexible-id"},{"title":"List status updates","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /status-updates","href":"/api-reference/status-updates/list-status-updates"}]},{"group":"Users","expanded":false,"pages":[{"title":"List the caller's firm users","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /users","href":"/api-reference/users/list-the-callers-firm-users"},{"title":"Invite a user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /users","href":"/api-reference/users/invite-a-user"},{"title":"Update a user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /users/{id}","href":"/api-reference/users/update-a-user"},{"title":"Deactivate a user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /users/{id}","href":"/api-reference/users/deactivate-a-user"}]},{"group":"Webhooks","expanded":false,"pages":[{"title":"List webhook subscriptions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions"},{"title":"Create a webhook subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /webhooks","href":"/api-reference/webhooks/create-a-webhook-subscription"},{"title":"Get a webhook subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /webhooks/{id}","href":"/api-reference/webhooks/get-a-webhook-subscription"},{"title":"Update a webhook subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /webhooks/{id}","href":"/api-reference/webhooks/update-a-webhook-subscription"},{"title":"Delete a webhook subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /webhooks/{id}","href":"/api-reference/webhooks/delete-a-webhook-subscription"},{"title":"List deliveries for a webhook subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /webhooks/{id}/deliveries","href":"/api-reference/webhooks/list-deliveries-for-a-webhook-subscription"},{"title":"Send a test event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /webhooks/{id}/test","href":"/api-reference/webhooks/send-a-test-event"},{"title":"Rotate the signing secret","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-the-signing-secret"},{"title":"Enable echo mode","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /webhooks/{id}/echo/enable","href":"/api-reference/webhooks/enable-echo-mode"},{"title":"Disable echo mode","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /webhooks/{id}/echo/disable","href":"/api-reference/webhooks/disable-echo-mode"},{"title":"List echo captures","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /webhooks/{id}/echo/captures","href":"/api-reference/webhooks/list-echo-captures"}]}]}]},{"tab":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks"}]}]},"basePath":"","title":"Get the ledger balance for a referral - CaseXchange Public API","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CaRkHcld.js","snippetPresets-CbOVSLWB.js","utils-cjri0g4r.js","style-to-object-BY3JEAdk.js","utils-DINdUa17.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-B6z-PJGf.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BldndzCM.js","_Uint8Array-BFUkDgJK.js","isObject-FP1Yky1u.js","ApiExamples-gah5G0c1.js","usePlaygroundInputsStore-DMbftGRK.js","shallow-BPuQ-dV8.js","isEqual-Du6c450V.js","CodeSnippets-BSVM0Ibi.js","CodeSnippet-BtGQRZnK.js","use-playground-group-access-98JyaSW7.js","Page-DuvGhd6e.js","api-description-markdown-ja0XM5Ae.js","DynamicMarkdown-DgKZ4_wp.js","SectionHeading-S4Jc_qPe.js","MethodPill-HIsDH_bI.js","getPastedJson-BKEmMYEO.js","Check2Icon-CRFAnWm9.js","axios-CsQoIw0U.js","Markdown-CexXCNoj.js","AssistantPageLink-C2AZnMAs.js","dist-CjxLTLs9.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}