---
title: "Program totals for a period"
method: GET
path: "/stats"
tags: ["Reporting"]
---

# Program totals for a period

`GET /stats`

## Request

- Base URL: `https://refgrow.com/api/v1`
- URL: `https://refgrow.com/api/v1/stats`
- Auth: HTTP bearer

Clicks, referrals, signups, purchases, revenue and commissions for the period, plus lifetime unpaid and paid-out figures. `mixed_currency` is true when any total in the response, period or lifetime, adds up amounts taken in different currencies. Read the matching `by_currency` breakdown instead of quoting an aggregate when it is set.

## Query parameters

- `from` string, date-time
- `to` string, date-time

## Response `200`

Program totals

- object
  - `success` boolean
  - `data` object
    - `period` object
      - `from` string, date-time
      - `to` string, date-time
    - `clicks` integer
    - `referrals` integer
    - `signups` integer
    - `purchases` integer
    - `revenue` number: Sum of transaction values
    - `commissions` number: Sum of commissions earned
    - `new_affiliates` integer
    - `earning_affiliates` integer
    - `unattributed_purchases` integer: Purchases with no affiliate attached
    - `mixed_currency` boolean
    - `by_currency` object[]
      - `currency` string
      - `purchases` integer
      - `revenue` number
      - `commissions` number
    - `lifetime` object
      - `affiliates` integer
      - `active_affiliates` integer
      - `unpaid_commissions` number
      - `by_currency` object[]
        - `currency` string
        - `unpaid_commissions` number
      - `paid_out` number: Payouts are stored without a currency, so this cannot be split by one.

## Other responses

- `400`: Validation failed
- `401`: Missing or invalid Bearer key

---

[API](https://skmtc.dev/refgrow/apis/refgrow-api.md) - [All operations](https://skmtc.dev/refgrow/apis/refgrow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/refgrow/apis/refgrow-api/revisions/68cce63d08d2?raw)
