Skip to main content

Recent changes to the API Data Feed

Changes that consumers of the feed may need to act on. If you built an integration before these landed, check it against this list.

Written by Dariy

tags is now a real JSON array

info.tags used to be a string containing JSON — you had to decode it a second time — and an untagged account reported the text "null".

It is now a proper JSON array of strings, and an untagged account reports []:

"tags": ["tier1", "casino"] 
"tags": []

Action: remove any second JSON decode, and any check for the string "null".

The info block is now identical in every report

Previously the reports disagreed about what an account was: the Accounts report carried program, software and balance, while the Brands and Campaigns reports carried only a currency and a tag string, and keys with limited account access lost program_id and software entirely.

Every report now returns the same eleven fields, in the same order, with the same types. Two of them — account_id and account_name — are new to most reports, and status, error and last_sync are new everywhere.

Action: you can now key on account_id instead of matching account names as text.

Accounts with no data for the period are now included

An account that reported nothing for the period used to be absent. It is now returned with its full info and empty stats, so a frozen, closed or failing account is visible instead of silently missing.

Action: if your integration treats "present in the response" as "has data", switch to checking whether stats is empty.

row_count added next to dataRow

dataRow counts a different unit per report and is calculated before the no-data accounts are added. row_count is the number of statistics rows in the response, for every report.

Action: switch to row_count. dataRow still returns and has not changed.

total_income added

total_income (total_commission + fixed_fee + flat_fee) is now on every statistics row of the Accounts, Brands, Campaigns, Dynamic Variables, Players and Geo reports. It matches the Total Income column in the app, which previously could not be read from the feed at all. It is not on the Postbacks report, which reports no commissions.

Monthly rows now carry month inside the row

Monthly data used to be keyed by month in the surrounding object. Monthly stats is now an array, and each row carries its own "month": "YYYY-MM" — the same way daily rows have always carried date. Monthly rows carry no date and no last_sync.

Action: for reportType=monthly, read stats as an array and take the month from the row.

Players and Geo rows now spell out their dimensions

These rows used to be filed under a compound key joining the player, country, city, brand and campaign with ||, which could not be split safely because any of those values can contain the delimiter itself. Each row now carries player_id, player_alias, country, city, brand and campaign as its own fields, and data is an array of accounts rather than an object keyed by account name.

Action: stop splitting keys; read the fields.

brand replaces channel

The field the Players, Geo and Dynamic Variables rows used to call channel is now called brand, matching what every other report and the app itself call it.

UTM fields added to Dynamic Variables

utm_campaign, utm_medium and utm_source are now returned on Dynamic Variables rows.

New report: Postbacks

groupBy=postbacks returns the individual postback events affiliate programs sent to your StatsDrone postback URLs — 54 fields per event, daily breakdown only. See Article 6.7. Available on plans with the Postbacks feature.

Clearer errors

An unreachable report service now returns No response from the data server. Please try again later. instead of a malformed body, and an API key belonging to no account is refused with You don't have access. rather than failing later.

Did this answer your question?