Skip to main content
POST
Reverse a statement's live ledger postings
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /publisher/statements//reverse-ledger-posting The void half of the ledger bridge. Reverses every LIVE publishing_royalty posting for the statement (writes type: 'reversal' flipped entries and sets reversedByTxId on each original), re-opening the per-writer idempotency slot so post-to-ledger can re-derive against corrected matches. This is the only way in the codebase to void a single statement’s sourceFactTable='PublisherStatements' ledger transactions. Idempotent — a second call reverses nothing (an already-reversed posting is not reversed again). ?dryRun=true (also accepted as dryRun: true in the body) lists what would be reversed without writing. Authorization: admin role + publisher addon.

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string<uuid>
required

PublisherStatement ID.

Query Parameters

dryRun
boolean

Preview only — identical response shape, nothing written.

Body

application/json
dryRun
boolean

Alternative to the ?dryRun=true query param.

Response

Reversal processed (or previewed, if dryRun). reversed is empty when there was nothing live to reverse.

Standard server envelope used by the statement, reconciliation, sub-publishing, and analytics endpoints.

status
enum<string>
Available options:
success,
error
message
string
data
object