The envelope
Every successful response has the same four top-level keys:
{ "success": true,
"data": { },
"dataRow": 128,
"row_count": 131
}Key | Type | Meaning |
| boolean |
|
| object or array | The report itself — shape depends on |
| integer | Legacy row counter, kept for compatibility |
| integer | Number of statistics rows in this response. Use this one. |
A failed request returns success: false plus a message or an error — see Article 7.
Three shapes of data
Accounts and Dynamic Variables — an object keyed by account name:
data → "<account name>" → { info, stats }Brands and Campaigns — an object keyed by brand or campaign name, then by account name:
data → "<brand or campaign>" → "<account name>" → { info, stats }Brands and campaigns the affiliate program did not name are collected under "N/A".
Players, Geo and Postbacks — an array of accounts, sorted by account name:
data → [ { account_id, account_name, info, stats } ]These three name the account at the top of each entry rather than inside info, because their stats is a flat list of rows with nothing else in it to say which account a row belongs to. The other four reports carry the same two values inside info. Either way each appears exactly once.
Accounts with no data are included
An account that produced no rows for the period is still in the response, with its full info block and empty stats ({} or []). This is deliberate: an account that is frozen, closed, or failing to sync is exactly the one that produces no rows, and leaving it out would make its absence read like "nothing to report".
Check info.status and info.error to tell "no activity" from "not working".
The info block
Identical in every report — same fields, same types, same conventions:
Field | Type | Notes |
| string | The affiliate program. |
| integer or |
|
| string | Affiliate software behind the program. |
| string | ISO 4217 code the figures in this entry are actually in |
| number or | Account balance as last read from the affiliate program. Always |
| array of strings | Your account tags. |
| string or | See the table below |
| string or |
|
| string or | When this account last synced. |
| integer or | StatsDrone's id for the affiliate account — stable, safe to key on |
| string | The name you gave the account in StatsDrone |
On the Players, Geo and Postbacks reports, account_id and account_name sit at the top of the entry instead of inside info; the other nine fields are unchanged.
info.status values:
Value | Meaning |
| The last sync completed |
| The last sync did not complete — |
| The affiliate program refused the credentials |
| You have excluded this account from syncing |
| The affiliate program is closed or no longer supported |
| Data comes from CSV uploads, so it never syncs |
last_sync is a date-and-time string, YYYY-MM-DD HH:MM:SS. Some accounts return a date only, YYYY-MM-DD, depending on how they were last synced — parse it leniently.
Types you can rely on
Counters (
raw_clicks,signups,deposits_count, …) are JSON numbers, never strings.Monetary fields are JSON numbers. The one exception is
flat_fee, which can come back as a numeric string such as"0.00"on some responses — always parse it as a number rather than comparing it to0.tagsis always a real JSON array of strings —[]when empty. It is not a string containing JSON, and never the text"null".Missing values are
null, never the string"null"and never0. Anullmeans "not reported"; a0means a genuine zero.Ids —
account_idandprogram_idare integers.Object keys are free text. Account, brand and campaign names come from you and from the affiliate programs, so they can contain anything — including quotes, brackets and non-Latin characters. Read them as opaque strings; do not try to split them apart.
Fields may be missing entirely if the API key belongs to a team member whose seat hides certain report metrics. Treat a missing key as "not available to this key" rather than zero.
