Skip to main content
The report endpoints return totals that are already aggregated. One call per widget.
app.acme.com/partners/leaderboard
Revenue, 30 days
Commissions
1. Sam Rivera2. Priya Shah3. Leo Martins

Stats from /reports/overview, sparkline from /reports/timeseries, rows from /reports/partners.

Pick an endpoint

All take program_id, start_date and end_date (YYYY-MM-DD, both days included). Leave the dates out for all time.

Build a leaderboard

Rank partners by revenue for the last 30 days. Amounts are strings in cents.
Sort by revenue, commissions, clicks or customers (default revenue, descending). Page with limit (default 10, up to 100) and offset, while has_more is true.

Chart revenue over time

period is the first day of each bucket; weeks start on Monday. Buckets with no activity are left out, so fill gaps with zeros before you plot.

Metric definitions

/reports/overview differs on one point: its customer_count includes leads and counts customers by the day they were created. /reports/customers has no lead count and filters by the day customers became active. In /reports/links, revenue reaches a link through the transaction’s click, while commissions and customers go through the customer’s link. Revenue recorded without a click doesn’t show under any link.
/partners, /links and /timeseries add up amounts across currencies. If your programs sell in more than one currency, pass currency (for example USD, any case) or scope with program_id. currency filters transactions and commissions only, not clicks or customers, and records without a currency count as the program’s currency (or USD). /overview already splits revenue and commissions into one entry per currency, and neither it nor /customers takes currency.