Skip to main content
POST
Report your current balance

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.

Body

application/json
balance
string
required

The balance your system reports as outstanding. Signed decimal string; negative means overpaid.

Pattern: ^-?\d{1,10}(\.\d{1,2})?$
asOf
string<date-time>
required

ISO 8601 timestamp with a timezone offset, e.g. 2026-10-02T12:00:00Z.

externalId
string

Your system's id for this record (e.g. a PioneerRx event id). Unique per practice within each resource type (fills, transactions and snapshots each have their own namespace), across all of the practice's referrals and cases: it is not scoped to a referral, so do not reuse one id for two referrals. Re-sending the same externalId with the same payload returns the existing record (200, meta.replayed=true), even after the referral has moved to a status that no longer accepts new records; with a different payload, 409 external_id_conflict. A replay is compared with the record as it is now, so re-sending the original POST after any PATCH to that record returns 409 external_id_conflict; to recover, PATCH the record at error.details.existingId instead of re-posting. Referenced ids (prescriptionId, claimDocumentId, fillId, reversesTransactionId) are part of the compared payload, so a replay after the referenced record was deleted (its link cleared) also returns 409 external_id_conflict. Leading and trailing whitespace is trimmed. A POST without an externalId is accepted but never deduplicated, so always send one.

Required string length: 1 - 200
note
string | null
Maximum string length: 2000

Response

Replay: the externalId was already used with the same payload. The existing snapshot is returned, nothing is written, logged or emitted, and meta.replayed is true.

data
object
required

A balance the pharmacy reports as of a point in time (what its own system says is outstanding). Compared against the ledger's computed balance in PharmacyBalance.

meta
object
required