post https://yourAgencyName-api.affluent.io/v1/report/
note: The {yourAgencyName} placeholder should be substituted with the subdomain of the URL you use to access the Affluent dashboard. For instance, if you log in at “dundermifflin.affluent.io” then you should replace {yourAgencyName} with “dundermifflin”
The Report endpoint allows you to query aggregated data in a completely customizable format. While common use cases might include pulling revenue, commission, and clicks by date, publisher, or brand, you can create literally any report using this endpoint.
The JSON body requires:
- A currencyflag. All results will be converted into the specified currency. For example:
"currency": "USD"- A datesobject that specifies the date range for which you would like to query data. All requests should be made usingeventDateStartandeventDateEnd. Querying based on modified times is not supported in the Report endpoint. Note that these dates are requested in UTC time and the date range you specify can not be larger than 62 days.
- A categoriesarray. This should contain all the fields you would like to group by. For example the following array will return data grouped by date, publisher ID, and publisher name:
"categories": [ "date", "platformName", "publisherName", "publisherId" ]- A metricsarray. This should contain all the metrics you would like. For example, the following array will return net revenue, net commissions, and clicks:
"metrics": [ "advertiserRevenueNet", "publisherCommissionNet", "clickCount" ]- A limitandoffset(see Limit and Offset)
The JSON body can additionally accept:
Best practices:
- We recommend that you do not combine skucategories & metrics with non-sku categories and metrics, they are not compatible with a large majority of non-sku categories and metrics, so it's likely that the response will be unpredictable.
- For requests that are likely to result in a multi-paged response, we recommend including a sort pattern in the json body, which either uses a unique ID from your list of categories (such as actionId), or (if there are no unique IDs you can use) a combination of all of the categories you have requested. This is to prevent the response on each page from being unpredictable when changing the offset.
- Use a limit of 100,000.
