API get reports aggrcampaign pub
From Wiki
Contents |
GET reports aggregated by campaign (for publishers)
The campaign report aggregates clicks and transactions by campaign and advertiser.
For all clicks and transactions within the selected time frame within a specific timezone, the result can be listed in intervals of days, months or years. The user can see the aggregation across multiple data points such as number of clicks, number of transactions, commission and total sale ammount. All transaction data are aggregated by commission status, such as pending or approved.
Who can use it
Users who have a publisher account and use the parameter "&campaign=" for clicks. Please see our page about Campaign Tracking and Reporting for further details.
Authentication
You need to provide a valid token. Please see our page about authentication and authorization API authentication and authorization for further details.
How to call it
parameter | format | mandatory/optional | description |
startDate | string, ISO Date, YYYY-MM-YY | mandatory | The given date is incl., greater than or equal. |
endDate | string, ISO Date, YYYY-MM-YY | mandatory | The given date is incl., greater than or equal The max time span between startDate and endDate is 400 days |
region | currently supported: AE AR AT AU BE BG BR(Brazil programs running in BRL) BU(Brazil programs running in BRU) CA CH CL CN CO CZ DE DK ES FI FR GB GR HR HU IE IN IT JP LT LV MX NL NO NZ PE PL PT RO RU SE SG SI SK TR UA US ZA | mandatory | Please choose one region of the advertiser account. |
campaign | string | optional | The value which was used in &campaign=. The value needs to have at least 3 characters. Max number of characters is 128. Returns a result based on a prefix search. If empty on NA, aggregation goes over all data having a value in &campaign=. |
timezone | America/Sao_Paulo Australia/Sydney Europe/Berlin Europe/Dublin Europe/Helsinki Europe/London Europe/Paris Canada/Central Canada/Eastern Canada/Mountain Canada/Pacific US/Central US/Eastern US/Mountain US/Pacific UTC | optional | default UTC |
advertiserIds | integer array comma separated list | optional | One or more advertiser ID. The resultset will show you just the advertiser accounts of your selection. All advertisers must be from your chosen "region=". |
includeNumbersWithoutCampaign | boolean (true, false) | optional | Default (false). By default the API just delivers numbers in case of a campaign was associated with the click or the transations. If set to "true" the result will also incl. numbers from clicks and transaction without campaign parameter. The parameter will be ignored (default "false") once the parameter "campaign=" contains a valid value. |
interval | string (day, month, year) | optional | If set, numbers will be reported in sums per interval (day, month, year). |
How the response looks
// request parameter { "parameters":{ "publisherId" : [1234543], "advertiserIds" : [17590,17570], "startDate" : "2020-01-01", "endDate" : "2020-01-31", "includeNumbersWithoutCampaign" : false, "timezone" : "UTC", "interval" : "day" "region" : "GB" }, // result set "result":[ { "date":"2020-01-01", "advertiserId":"17590", "advertiserName":"whateverAG", "campaign":"compadi", "totals":{ "quantity":{ "pending":0, "approved":44, "bonus":0, "total":44, "declined":25, "click":2123221 }, "saleAmount":{ "pending":"0.00", "approved":"7504.58", "bonus":"0.00", "total":"7504.58", "declined":"4965.91" }, "commissionAmount":{ "pending":"11.19", "approved":"675.39", "bonus":"0.00", "total":"675.39", "declined":"446.92" } }]} (...)
Which datafields do we provide
field name | description |
"date":"2020-09-01" | field represents either the day, the month or the year, according to selected timeframe and interval |
"advertiserId":"17590" | ID of the advertiser / corresponding with advertiserName |
"advertiserName":"whateverAG" | Name of the advertiser / corresponding with advertiserID |
"campaign":"compadi" | Value of campaign by which the result is aggregated |
"quantity":{ "pending":0, "approved":44, "bonus":0, "total":44, "declined":25, "click":2123221} | Number of transactions by commission status and clicks, "total" sums up approved, pending and bonus transactions |
"saleAmount": { "pending": "0.00", "approved": "7504.58", "bonus": "0.00", "total": "7504.58", "declined": "4965.91"} | Value of the transactions by commssion satus, "total" sums up approved, pending and bonus transactions |
"commissionAmount": { "pending": "0.00", "approved": "675.39", "bonus": "0.00", "total": "675.39", "declined": "446.92"} | Commissions of the transactions by commssion satus, "total" sums up approved, pending and bonus transactions |