Aller au contenu principal

DSP Reporting API

Quick Reference

All API access is over HTTPS, and accessed via the https://xxx.com domain (ask to your Madvertise contact).

Request Format

For POST requests, the request body must be JSON, with the Content-Type header set to application/json.

Response format

The response format for all requests is a JSON object.

Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, whereas a 4xx status code indicates failure.

POST /auth-reporting : Authentication Service

see auth-reporting section.

POST /buyer-reporting : Advertiser Reporting Service

Use the token returned by auth-reporting service when making calls to /buyer-reporting. You POST the JSON request and get back a report ID.

Metrics

MetricDefinition
displaysNumber of times an ad is served and displayed according [Viewbility] .
revenueEuroRevenue generated in €.
revenueDollarRevenue generated in $.

Breakdowns/Dimensions list

Optionally, use one of the following options in the breakdowns param to specify which dimension.

DimensionDefinition
DAILYProvides a breakdown by day (can't be combined with HOURLY, RANGE and DAILY)
HOURLYProvides a breakdown by hour (can't be combined with MONTHLY, RANGE and DAILY)
MONTHLYProvides a breakdown by Month (can't be combined with HOURLY, RANGE and DAILY)
RANGEProvides a breakdown according since and until dates (can't be combined with HOURLY, MONTHLY and DAILY)
BUNDLEIDProvides a breakdown by packageName for android and bundleId for IOS
FORMATProvides a breakdown by format (interstitial, banner, nativeAd ...)

Filters

Parameter nameRequired?FormatDefinition
sinceYesunix timestampe.g 1417392000
untilYesunix timestampe.g 1420070399
timezonenotimezone name TZ database namee.g Europe/Paris
breakdownsNoarray of stringsee breakdowns-list section, e.g breakdowns[0]=DAILY&breakdowns[1]=FORMAT

Example

$ curl -H 'Authorization: fbe74e915898ee0d560643d0f3dd722eb17bade3' \
-H 'Accept: application/json' \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://xxx.com/buyer-reporting" \
--data 'output=direct' \
--data 'timezone=Europe/Paris' \
--data 'metrics=displays,revenueEuro,revenueDollar' \
--data 'breakdowns[0]=DAILY' \
--data 'since=1547510400' \
--data 'until=1547683200'

Response

If you use Accept: application/json, we will return a json output. If you remove this header, we will return a csv output.

{
"data": [
{
"date": "2019-01-15",
"displays": 1740,
"revenueEuro": "0,40",
"revenueDollar": "0,46"
},
{
"date": "2019-01-16",
"displays": 1876,
"revenueEuro": "0,41",
"revenueDollar": "0,46"
}
],
"summary": {
"since": "2019-01-15T01:00:00+0100",
"until": "2019-01-17T01:00:00+0100",
"breakdowns": [
"DAILY"
],
"timezone": "Europe\/Paris"
}
}