---
title: "Get referral earnings summary"
type: reference
method: GET
path: /rest-api/referral-program/total-earnings.do
tag: "Referral Program"
---

# Get referral earnings summary

`GET https://YOUR-NETWORK-DOMAIN/rest-api/referral-program/total-earnings.do`

Returns total and paid earnings for the current user's referral program. Results can be filtered by year, month, and payment status.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `activeOnly` | boolean | no | `true` | When true, return only active (non-deleted) records |
| `dir` | string | no | `ASC` | Sort direction: ASC or DESC |
| `labels` | array<integer> | no | `101,102` | Filter by label IDs |
| `limit` | integer | no | `50` | Maximum number of records to return per page |
| `multisort` | array<string> | no | `[{"property":"id","direction":"ASC"}]` | Multi-column sort configuration as a JSON array of objects with 'property' and 'direction' fields |
| `name` | string | no | `my-campaign` | Filter by entity name |
| `onlyData` | boolean | no | `false` | When true, return only data rows without metadata |
| `onlyTotal` | boolean | no | `false` | When true, return only the total count without data rows |
| `query` | string | no | `test` | Search query string to filter results by name or other searchable fields |
| `role` | integer | no | `3` | Filter by user role ID |
| `sort` | string | no | `id` | Field name to sort results by |
| `start` | integer | no | `0` | Pagination offset (0-based index of the first record to return) |
| `year` | array<integer> | no | `2026` | Filter by year |
| `month` | array<integer> | no | `3` | Filter by month (1-12) |
| `status` | array<string> | no | `PAID` | Filter by payment status |

## Responses

- `200` — Earnings summary returned successfully
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Not enough permissions

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/referral-program/total-earnings.do?name=my-campaign&activeOnly=true&dir=ASC' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/referral-program/get-referral-program-total-earnings