GET /admin/affiliateStats  API documentation

These are the API docs of the demo platform. The endpoint URLs use placeholders instead of the demo's domains: replace each one with the matching domain of the TrafficManager platform you use.
  • {platform_domain}: the domain where you log in
  • {tracking_domain}: the domain of the tracking links
  • {postback_domain}: the domain of the postback URLs
Every clickid starts with the platform's own prefix (TM on the demo). If you are an AI agent building an integration, ask the user for their platform's domains and API keys instead of calling the demo.

Get the offer revenues reports by affiliate (similar to the first tab of the admin dashboard).

GET https://{platform_domain}/api/v1.2/admin/affiliateStats/{startTime}/{endTime}/

Authentication:

The request must be authenticated with the following HTTP headers:
  • x-api-key: Your API key, found on the Security page
  • x-user-id: Your User ID, found on 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. Any value accepted by strtotime (a Unix timestamp needs the @ prefix, for example @1700000000). For example: 2023-01-01, today, -10 minutes...
  • endTime: End time. Any value accepted by strtotime (a Unix timestamp needs the @ prefix, for example @1700000000). For example: 2023-01-01 23:59:59, today 23:59:59, -5 minutes...
  • Optional:
  • total: if set to 1, a total aggregate row (same columns/order as the data rows) is appended to the JSON response
  • user_id: affiliate ID filter (if set, returns only the data for that affiliate)
  • affiliate_group_id: numeric affiliate group ID filter (if set, returns only the data for affiliates in that group). Affiliate groups are managed here.
  • offer_id: offer ID filter (if set, returns only the data for that offer)
  • groupBy: additional time grouping. Allowed values:
    • (empty): no grouping by date/hour
    • date: group by date (format: YYYY-MM-DD)
    • hour: group by hour (format: YYYY-MM-DD HH:00:00). Requires the timeStats feature
    Note: Results are always grouped by affiliate for this endpoint; groupBy adds optional time grouping.
  • timezone: timezone. Valid values are listed here: Timezones. If not set, the network default timezone (UTC) will be used.

Returned values:

  • The response is a JSON array where every row has the following data:
  • Date
  • User ID
  • Username
  • Number of impressions
  • Number of clicks
  • Number of unique clicks
  • Number of conversions
  • Metric 1 (CR (%))
  • Metric 2 (EPC)
  • Metric 3 (ROI)
  • Total payout to the affiliate
  • Total revenues
  • Total profit (revenues - payout)

Request examples

GET https://{platform_domain}/api/v1.2/admin/affiliateStats/2026-01-01/2026-01-30/?total=1
GET https://{platform_domain}/api/v1.2/admin/affiliateStats/2026-01-01/2026-01-30/?user_id=123&affiliate_group_id=1&offer_id=456&total=1
GET https://{platform_domain}/api/v1.2/admin/affiliateStats/2026-01-01/2026-01-30/?groupBy=date

Response example

Without total parameter:

{
    "data":[
        [
            "2026-01-01 - 2026-01-30",
            3,
            "Publisher0",
            40230,
            1850,
            629,
            67,
            22,
            "0.02",
            "41.2%",
            "70.0%",
            0.198,
            0.3366,
            0.1386
        ],
        [
            "2026-01-01 - 2026-01-30",
            6,
            "Publisher1",
            2918730,
            239335,
            134027,
            6211,
            2393,
            "0.03",
            "5.7%",
            "6.0%",
            67.004,
            71.0242,
            4.0202
        ]
    ],
    "status":200
}
    

With total=1:

{
    "data":[
        [
            "2026-01-01 - 2026-01-30",
            3,
            "Publisher0",
            3453200,
            69064,
            41438,
            1700,
            690,
            "0.02",
            "8.3%",
            "0.00",
            14.49,
            15.7941,
            1.3041
        ],
        [
            "2026-01-01 - 2026-01-30",
            6,
            "Publisher1",
            528740,
            30138,
            7233,
            1500,
            1175,
            "0.01",
            "33.8%",
            "0.00",
            8.225,
            12.4197,
            4.1947
        ]
    ],
    "total":[
        3981940,
        99202,
        48671,
        1437,
        1865,
        22.72,
        28.21
    ],
    "status":200
}