ESTAGE Support
IdeasMy tickets

Sales, commissions, refunds and referrals for a period

Permission affiliates:readRate limit heavy

Totals for the project: sales is the amount sold (sum of sale prices), commissions and refunds are commission amounts, referrals is the number of distinct people referred. The amounts are in currency (the one the project pays affiliates in, or the one most sales were in); by_currency has each currency. interval is a rolling window ending now; all_time (the default) has no limit. from/to apply on top of interval, and commissions made on the to date are not included. Counts against the heavy rate limit.

GEThttps://api.estage.com/v1/affiliate-earnings/stats

Authorization

ESTAGE-API-Keystringheaderrequired

A project key, est_live_…, from Settings → API keys. Call from server code only.

Query parameters

intervalstringdefault "all_time"

One of today, week, month, quarter, year, all_time

fromstringdate

YYYY-MM-DD; requires to.

tostringdate

YYYY-MM-DD, on or after from; requires from. Read as midnight at the start of that day.

offer_idinteger
RequestcURL
curl --request GET \
  --url 'https://api.estage.com/v1/affiliate-earnings/stats' \
  --header 'ESTAGE-API-Key: est_live_your-api-key'
OK
{
  "data": {
    "sales": 1490,
    "commissions": 447,
    "refunds": 30,
    "referrals": 12,
    "currency": "USD",
    "by_currency": {
      "USD": {
        "sales": 1490,
        "commissions": 447,
        "refunds": 30
      }
    }
  }
}
Example. Errors are { error: { code, message, details } }.