GET /admin/advStats  API documentation

Get the offer revenues reports by advertiser (similar to the Advertisers tab of the admin dashboard).

GET https://demo.trafficmanager.com/api/v1/admin/advStats/{startTime}/{endTime}/

Authentication:

The request must be authenticated with the following HTTP headers:
  • x-api-key: Your API key, found in the Security page
  • x-user-id: Your User ID, found in the Security page
If the HTTP headers are not passed, but you are logged in to the TrafficManager panel, the current user is used instead (so you can easily preview or download the data using your browser)

GET Parameters:

  • Required:
  • startTime: Start time. Unix timestamp or any value accepted by strtotime. For example: 2023-01-01, today, -10 minutes...
  • endTime: End time. Unix timestamp or any value accepted by strtotime. For example: 2023-01-01 23:59:59, today 23:59:59, -5 minutes...
  • Optional:
  • user_id: affiliate ID filter (if set, returns only the data for that affiliate)

Returned values:

  • The response is a JSON where every row has the following data:
  • Date
  • Advertiser ID - this is negative for Advertiser Tags, positive for Advertiser Users
  • Advertiser name
  • Number of impressions
  • Number of clicks
  • Number of unique clicks
  • Number of leads
  • Number of conversions
  • EPC (average payout per n clicks, calculated as: payout/clicks*n, where n is the EPC factor, currently 100)
  • Unique EPC (average payout per n unique clicks)
  • Total payout to the affiliate
  • Total revenues
  • Total profit (revenues - payout)

Request example

GET https://demo.trafficmanager.com/api/v1/admin/advStats/2025-04-18/2025-04-25/

Response example

{
    "data": [
        {
            "date": "2025-04-21",
            "adv_id": 15,
            "adv": "Best Advertiser",
            "impressions": 0,
            "clicks": 7,
            "unique_clicks": 4,
            "leads": 5,
            "conversions": 1,
            "epc": 2.14,
            "unique_epc": 3.75,
            "payout": 15,
            "revenue": 23,
            "profit": 8
        },
        {
            "date": "2025-04-21",
            "adv_id": -1,
            "adv": "Tag 1",
            "impressions": 0,
            "clicks": 1,
            "unique_clicks": 1,
            "leads": 0,
            "conversions": 1,
            "epc": 10,
            "unique_epc": 10,
            "payout": 10,
            "revenue": 10,
            "profit": 0
        }
    ],
    "status": 200
}