Wiki

Clone wiki

mobile.mng-ads.com-mngperf / mediation-reporting-api

Mediation 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.

Helpful Tools

|json_reformat formats your output nicely without reordering the fields.

POST /auth-reporting : Authentication Service

see auth-reporting

breakdowns list

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

breakdown comment Default?
DAILY Provides a breakdown by day (can't be combined with HOURLY, RANGE and DAILY) No
HOURLY Provides a breakdown by hour (can't be combined with MONTHLY, RANGE and DAILY) No
MONTHLY Provides a breakdown by Month (can't be combined with HOURLY, RANGE and DAILY) No
RANGE Provides a breakdown according since and until dates (can't be combined with HOURLY, MONTHLY and DAILY) No
ADNETWORK Provides a breakdown by our core Ad network (mngperf or appsfire) No
PUBLISHER Provides a breakdown by Publisher No
APP Provides a breakdown by App No
PLACEMENT Provides a breakdown by placement (banner, Interstitial, NativeAd, ...) No
FORMAT Provides a breakdown by format (interstitial, banner, nativeAd ...) No
COUNTRY Provides a breakdown by country (FR, IT, DE), not end-user country but country of Madvertise Office
APP_MEDIATION 1 = uur mediation SDK, 0 = our adserving platform
APP_STATONLY 1 = stats from other adnetworks without our mediation SDK

POST /mediation-reporting : Publisher Reporting Service

Use the token returned by auth-reporting service when making calls to

Parameters

Parameter name Required? Format Description
since Yes europe/paris unix timestamp e.g 1417392000
until Yes europe/paris unix timestamp e.g 1420070399
breakdowns No array of string see [breakdowns-list section], e.g breakdowns[0]=HOURLY&breakdowns[1]=ZONE
publisherId no array of publishers IDs For admin only Filter reporting on specific publishers e.g publisherId[0]=1&publisherId[1]=2
appId no array of apps IDs Filter reporting on specific apps e.g appId[0]=1&appId[1]=2
placementId no array of placements IDs For admin only Filter reporting on specific placements e.g placementId[0]=1&placementId[1]=2
formatId no Array of format Filter reporting on a specific placement format [formats-list] e.g formatId[0]=1&formatId[1]=2
adNetwork no Filter reporting on a specific Ad networks e.g smartAdserver, Facebook
app_statonly no 1 = stats from other adnetworks without our mediation SDK
app_mediation no 1 = uur mediation SDK, 0 = our adserving platform
countryCode no (FR, IT, DE), not end-user country but country of Madvertise Office

Output

#!json

{
    "data": [
        {
            "click": "1695",
            "request": 181483,
            "requestMediation": "1639327",
            "impression": "161294",
            "breakdowns": {
                "publisherId": "5746",
                "publisherName": "xxx",
                "appName": "xxxxxx",
                "appOwner": "MBRAND",
                "appId": "1697824",
                "date": "2017-10-15"
            },
            "revenue": "27.553169130999997",
            "revenueEuros": "27.114409424918936",
            "revenueDollar": "32.0221177026"
        },
        {
            "click": "31",
            "request": 45254,
            "requestMediation": "249237",
            "impression": "25144",
            "breakdowns": {
                "publisherId": "5746",
                "publisherName": "xxx",
                "appName": "xxxx",
                "appOwner": "MBRAND",
                "appId": "1191726",
                "date": "2017-10-15"
            },
            "revenue": "2.56965202",
            "revenueEuros": "2.3561616492127997",
            "revenueDollar": "2.7826269913"
        }
    ],
    "summary": {
        "since": "2017-10-15 00:00:00",
        "until": "2017-10-16 00:00:00",
        "breakdowns": [
            "DAILY",
            "PUBLISHER",
            "APP"
        ],
        "timezone": "europe/paris"
    }
}

Example

#!curl

curl -H 'Authorization: da57722f06c2c4359b03697584a8757c036c1359' -X POST "https://xxxx.com/mediation-reporting" \
--data "since=1508018400&until=1508104800&breakdowns[0]=DAILY&breakdowns[1]=PUBLISHER&breakdowns[2]=APP&publisherId[0]=5746" |json_reformat

Error

#!json

{
    "response": {
        "status": "ERROR",
        "message": "Unknown token, use auth service before"
    }
}

Updated