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.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.

