GET
/api/v1/statsReturns aggregated key performance indicators (KPIs) for the product associated with your API key. Includes current period totals and a comparison against the equivalent previous period.
Query parameters
| Parameter | Type | Description |
|---|---|---|
period | string | Time period: 7d, 30d, 90d, or 12m. Defaults to 30d. |
Example request
bash
curl https://anderro.com/api/v1/stats?period=30d \
-H "x-api-key: sk_your_secret_key"
Responses
200Summary stats for the requested period
json
{
"data": {
"period": "30d",
"clicks": 1234,
"signups": 89,
"conversions": 45,
"revenue_cents": 450000,
"commissions_cents": 67500,
"conversion_rate": 3.65,
"active_affiliates": 23,
"previous_period": {
"clicks": 1100,
"signups": 72,
"conversions": 38,
"revenue_cents": 380000,
"commissions_cents": 57000
}
}
}
Amounts are in cents
All monetary values (revenue_cents, commissions_cents) are integers in cents. Divide by 100 to get the dollar amount.
Period comparison
The previous_period object contains the same metrics for the equivalent preceding period. For example, with period=30d, the previous period covers days 31–60 before now, enabling you to calculate growth rates.