Skip to main content
GET
Get unallocated-revenue worklist
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Get unallocated-revenue worklist Stage 2 of the unallocated-revenue spec. Per-line worklist of held (gap) / suspense (unresolved) revenue from the tenant’s latest COMMITTED attribution run, biggest dollar amount first, joined best-effort to current Asset/Product titles so the client can link each line to the split that needs fixing. Registered ahead of the BigQuery royaltyQuery middleware on this router so it never triggers dataset resolution — this endpoint reads the Postgres attribution tables only (AttributionRunSummary, AttributionQuarantineLines). Returns the raw result as the response body — no { status, data } envelope, unlike every other /royalty/* endpoint. A tenant with no committed attribution run gets an empty worklist (runId: null, lines: []) rather than an error — the engine is per-tenant opt-in, so “never ran” is the normal state for most tenants. degraded: true means the run completed but its line-by-line breakdown could not be gathered — the totals on GET /royalty/ / GET /accounting/gettotaldue still reflect money held, but this worklist cannot show which lines; render that as an error state, not “nothing to do”. Authorization:
  • Required role: admin or higher

Code Examples

Authorizations

Authorization
string
header
required

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

Query Parameters

limit
integer
default:100

Max lines to return. Capped at 500.

Response

Worklist fetched (or empty, when no committed run exists).

runId
string<uuid> | null
lines
object[]
degraded
boolean
degradedReason
string | null
stale
boolean
staleReason
string | null