Skip to main content
GET
Earnings over time, by month or quarter
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

quarter (YYYY-Qn), ascending, with amount, lineCount, matchedAmount, matchedLineCount and statementCount. A statement line is attributed to the month of its PARENT STATEMENT’s periodStart - a January-March statement lands wholly in January rather than being spread across three months. The rule is declared on meta.attribution ("statement-period-start"). The BigQuery reading buckets on the PRO’s own Accounting_Period_Date, falling back to Reporting_Date. Authorization: user role + publisher capability enabled.

Code Examples

Authorizations

Authorization
string
header
required

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

Query Parameters

periodStart
string<date>

Inclusive ISO date (YYYY-MM-DD). Filters by statement-period overlap unless the endpoint notes otherwise.

periodEnd
string<date>

Inclusive ISO date (YYYY-MM-DD).

source
string

Comma-joined list of source PROs. OR within the param, AND against the other filters. An unknown value is a 400.

rightType
string

Comma-joined list of PR/MR/SR, or UNSPECIFIED for the null bucket the endpoints publish. An unknown value is a 400.

territory
string

Comma-joined list of territories as reported on the line, or UNSPECIFIED for the null bucket. Open set - not validated.

publisherId
string

Comma-joined Publisher ids, applied through the parent statement. The BigQuery projection has no publisher entity, so that reading is skipped for the request and meta.filters.bigquery is "skipped".

matchStatus
string

Comma-joined list of unmatched/matched/disputed/ignored. disputed and ignored have no counterpart in the BigQuery projection, so that reading contributes nothing for them. An unknown value is a 400.

workId
string

Comma-joined list of work ids, matched on the statement line's matchedWorkId. Lets an entity detail page ask for its own earnings instead of paging the top-N lists looking for itself. Because matchedWorkId is NULL on an unmatched line, this also excludes unattributed money — correct for a per-work figure. A work with no matched lines returns an empty series and a zero total, not an error.

writerId
string<uuid>

A single writer id. Honoured on THIS endpoint only, by design: a statement line names a work, never a writer, so a writer's earnings are their share of their works'. The series is therefore weighted by each link's relativeShare — the same arithmetic earnings/by-writer uses, so a writer's detail page cannot contradict the leaderboard it was opened from. Accepting it elsewhere would give an unweighted figure that does contradict it. Money is weighted; counts (lineCount, matchedLineCount, statementCount) are not — a 40% share is not 0.4 lines. Composes with workId by intersection. A writer credited on nothing returns an empty series and a zero total. A malformed id is a 400.

granularity
enum<string>
default:month
Available options:
month,
quarter

Response

Earnings fetched.

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

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

Uniform aggregation shape returned by every /analytics/* endpoint (locked contract, G-ANALYTICS).