Aller au contenu principal

Seller 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 /seller-reporting : Publisher Reporting Service

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

Metrics

MetricDefinition
requestsAn attempt to MAS adserver to fill an impression.
displaysNumber of times an ad is served and displayed according Viewbility .
clicksNumber of times an ad is clicked.
downloadsNumber of conversions from Conversion API or Appsfire [Buyer Integration]
leadsNumber of leads from Conversion API or Appsfire [Buyer Integration]
landingsNumber of landings from Conversion API or Appsfire [Buyer Integration]
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)
ADNETWORKProvides a breakdown by our core Ad network (mngperf or appsfire)
ZONEProvides a breakdown by placement (banner, Interstitial, NativeAd, ...)
PUBLISHERProvides a breakdown by Publisher
SUBPUBLISHERIDProvides a breakdown by Sub Publisher Id for appsfire adnetwork, arg3 parameter on adrequest
SUBSUBPUBLISHERIDProvides a breakdown by Sub Publisher Id for appsfire adnetwork, arg4 parameter on adrequest
APPCOUNTYProvides a breakdown by country (FR, DE or IT), Madvertise manage apps from different countries
APPProvides a breakdown by App
BUNDLEIDProvides a breakdown by packageName for android and bundleId for IOS
FORMATProvides a breakdown by format (interstitial, banner, nativeAd ...)
COUNTRYProvides a breakdown by country (FR, US,...)
REGIONProvides a breakdown by Region (Admin Level 1)
DEPARTMENTProvides a breakdown by Department (Admin Level 2)
CITYProvides a breakdown by City (Paris, ...)
POSTALCODEProvides a breakdown by Postal Code
OSProvides a breakdown by mobile OS
DEVICETYPEProvides a breakdown by DeviceType (phone or tablet)
DEVICEBRANDProvides a breakdown by BrandName (e.g Apple)
DEVICEMODELProvides a breakdown by Model (e.g iPhone 7 Plus)
CARRIERProvides a breakdown by Carrier (e.g Orange) Mobile carrier name or Wireless carrier
BUYERNAMEProvides a breakdown by buyer (Vectaury, Adot, Bidswitch,..) connected to madvertiseSSP
DEALIDProvides a breakdown by deal connected to madvertiseSSP
DMPProvides a breakdown by dmp (Adobe, 1px, ...) connected to madvertiseSSP

Filters

Parameter nameRequired?FormatDefinition
sinceYeseurope/paris unix timestampe.g 1417392000
untilYeseurope/paris unix timestampe.g 1420070399
breakdownsNoarray of stringsee breakdowns-list section, e.g breakdowns[0]=HOURLY&breakdowns[1]=ZONE
publisherIdnoarray of publishers IDsFor admin only Filter reporting on specific publishers e.g publisherId[0]=1&publisherId[1]=2
subPublisherIdnoarray of subpublishers IDsFilter reporting on specific sub publishers e.g subPublisherId[0]=1
subSubPublisherIdnoarray of subSubPublisherId IDsFilter reporting on specific sub publishers e.g subSubPublisherId[0]=1
platformIdnoarray of platformIdFilter reporting on specific platformId e.g platformId[0]=1
appIdnoarray of apps IDsFilter reporting on specific apps e.g appId[0]=1&appId[1]=2
snoarray of placements IDsFilter reporting on a specific placement e.g s[0]=1&s[1]=2
osIdnoArray of mobile OSFilter reporting on a mobile OS see os-list e.g osId[0]=1&osId[1]=2
formatIdnoArray of formatFilter reporting on a specific placement format formats-list e.g formatId[0]=1&formatId[1]=2
countryIdnoArrayFilter reporting on a specific placement country based on geonameid
regionIdnoArrayFilter reporting on a specific placement region (admin level 1) based on geonameid
departmentIdnoArrayFilter reporting on a specific placement department (admin level 2) based on geonameid
cityIdnoArrayFilter reporting on a specific placement city based on geonameid
postalcodenoArrayFilter reporting on a specific placement postalcode based on geonameid
adNetworkIdnoArrayFilter reporting on a specific Ad network
carriernoArray Filter reporting on a specific carrier (free, Orange,...)
deviceTypeIdnoArrayFilter reporting on a specific brandId
deviceBrandIdnoArrayFilter reporting on a specific brandId
deviceModelnoArrayFilter reporting on a specific model (iPhone X, ...)
buyerIdnoArrayFilter reporting on a buyer connected to Madvertise SSP
dealIdnoArrayFilter reporting on a deal created by Madvertise SSP
dmpIdnoArrayFilter reporting on a dmp created by Madvertise SSP
dmpSourceIdnoArrayFilter reporting on a dmp (1px, Adobe, ...) created by Madvertise SSP

output

{
"response": {
"status": "OK",
"report_id": "20e5cee104f3ebb0011fbeb8852fafdf9d237113"
}
}

Example

$ curl -H 'Authorization: fbe74e915898ee0d560643d0f3dd722eb17bade3' \
-H 'Accept: application/json' \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://xxx.com/seller-reporting" \
--data 'metrics=requests,displays,clicks,downloads,leads,landings,revenueEuro,eyesTrackings' \
--data 'since=1508485191' \
--data 'until=1508830791' \
--data 'publisherId[0]=5961' \
--data 'breakdowns[1]=PUBLISHER' \
--data 'breakdowns[2]=APP' \
--data 'breakdowns[4]=APPCOUNTRY'

POST /status-reporting : Request the status of a report

Make a POST call with the report ID to retrieve the status of the report. Continue making this call until the status is ready. Then use the /download-reporting end point to save the reporting data to a file. (This is described in the next step.)

$ curl -H 'Authorization: 1be3546f0bed0e3f03b08673d1a635c81fb55bba' \
-H 'Accept: application/json' \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://xxx.com/status-reporting" \
--data 'id=7e65da22fca0cad8db34556f11466960b11dba74' \
{
"response": {
"status": "progress",
"message": "progress",
"report_id": "7e65da22fca0cad8db34556f11466960b11dba74"
}
}

POST /download-reporting : Retrieve report data

To download the report data to a file, make another POST call with the report ID. You can find report ID on previous POST response (/status-reporting), **for ready status only. Must be called when /status-reporting returns ready status

$ curl -H 'Authorization: 1be3546f0bed0e3f03b08673d1a635c81fb55bba' \
-H 'Accept: application/json' \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST "https://xxx.com/download-reporting" \
--data 'id=7e65da22fca0cad8db34556f11466960b11dba74' > /tmp/seller_stats.csv

Response

{
"data": [
{
"country": "France",
"city": null,
"eyesTrackings": 0,
"requests": 0,
"displays": 59,
"platform": "Android",
"zoneHash": "/1085857/banner/af",
"downloads": 0,
"postalcode": null,
"appId": "1085857",
"subpublisherId": null,
"landings": 0,
"deviceType": "phone",
"os": "Android",
"subSubPublisherId": null,
"appName": "FR_Mondadori_PleineVie_App_AndroidTab_Madvertise",
"adminLevel1": null,
"adminLevel2": null,
"format": "banner",
"bundleId": "com.mondadori.pleinevie",
"appOwner": "MBRAND",
"encodedSubpublisherId": null,
"carrier": "orange",
"leads": 0,
"publisher": "Mondadori",
"clicks": 2,
"valueDollar": 0,
"deviceModel": "B3-A20",
"Adnetwork": "appsFire",
"deviceBrand": null,
"revenueEuro": 0
},
...
],
"summary": {
"since": "2017-10-20T09:39:51+0200",
"until": "2017-10-24T09:39:51+0200",
"breakdowns": [
"PUBLISHER",
"APP",
"OS",
"FORMAT",
"DEVICETYPE",
"BUNDLEID",
"DEVICEBRAND",
"DEVICEMODEL",
"COUNTRY",
"REGION",
"ZONE",
"SUBPUBLISHERID",
"ADNETWORK",
"DEPARTMENT",
"CITY",
"POSTALCODE",
"SUBSUBPUBLISHERID",
"PLATFORM",
"CARRIER"
],
"timezone": "europe/paris"
}
}