{"__v":0,"_id":"587a7ec21fe2370f001d085f","category":{"__v":3,"_id":"56859e9c009a8d0d00797130","pages":["5685a737009a8d0d0079713a","56885d7a73922d1700d7cb69","56892949ff344617001e7bb2"],"project":"564621e00c30fb2100ba3814","version":"564621e10c30fb2100ba3817","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-31T21:31:08.683Z","from_sync":false,"order":7,"slug":"reporting-api","title":"Reporting API"},"parentDoc":null,"project":"564621e00c30fb2100ba3814","user":"564621d275c83f0d00e9d52d","version":{"__v":14,"_id":"564621e10c30fb2100ba3817","project":"564621e00c30fb2100ba3814","createdAt":"2015-11-13T17:46:09.275Z","releaseDate":"2015-11-13T17:46:09.275Z","categories":["564621e10c30fb2100ba3818","564624cf0c30fb2100ba3822","564628d69f3f550d00fa3db6","564dafeeda00e82b00ed601d","564daff8fc36dc3700882b95","564db0ccda00e82b00ed601f","564dcf87d3320b0d0028ca10","5661a6e436398e0d00f79566","568585153703ed1700e420b0","56858767d96a760d00545da6","56858d693703ed1700e420b2","56858d8d22c41b0d00e4666c","56859e9c009a8d0d00797130","5685a6453703ed1700e420d3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-14T19:40:50.687Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl \"http://api-v2.mobfox.com/dsppartner/report?apikey=YOUR_API_KEY&tz=America/New_York&timegroup=interval&period=yesterday&group=inventory_id,ex_demand_partner_id&totals=total_served,total_impressions,total_clicks,total_ex_bids,total_ex_bid_requests,total_ex_nobids,total_ex_bids_won,ex_total_impression_price&f:ex_demand_partner_id=60,513&f:inventory_id=4,10,12\""}]},"results":{"codes":[{"name":"","code":"{\n  \"columns\": [\n    \"interval\",\n    \"inventory_id\",\n    \"ex_demand_partner_id\",\n    \"total_served\",\n    \"total_impressions\",\n    \"total_clicks\",\n    \"total_ex_bids\",\n    \"total_ex_bid_requests\",\n    \"total_ex_nobids\",\n    \"total_ex_bids_won\",\n    \"ex_total_impression_price\"\n  ],\n  \"results\": [\n    [\n      \"2017-01-14 00:00:00 - 2017-01-14 23:00:00\",\n      4,\n      60,\n      0,\n      0,\n      0,\n      0,\n      27,\n      27,\n      0,\n      0\n    ],\n    [\n      \"2017-01-14 00:00:00 - 2017-01-14 23:00:00\",\n      4,\n      513,\n      0,\n      0,\n      0,\n      0,\n      17,\n      17,\n      0,\n      0\n    ],\n    [\n      \"2017-01-14 00:00:00 - 2017-01-14 23:00:00\",\n      10,\n      60,\n      0,\n      0,\n      0,\n      0,\n      16,\n      16,\n      0,\n      0\n    ],\n    [\n      \"2017-01-14 00:00:00 - 2017-01-14 23:00:00\",\n      10,\n      513,\n      0,\n      0,\n      0,\n      0,\n      6,\n      6,\n      0,\n      0\n    ],\n    [\n      \"2017-01-14 00:00:00 - 2017-01-14 23:00:00\",\n      12,\n      60,\n      0,\n      0,\n      0,\n      0,\n      55,\n      55,\n      0,\n      0\n    ],\n    [\n      \"2017-01-14 00:00:00 - 2017-01-14 23:00:00\",\n      12,\n      513,\n      0,\n      0,\n      0,\n      0,\n      28,\n      28,\n      0,\n      0\n    ]\n  ],\n  \"rowcount\": 6,\n  \"currentness\": [\n    \"2016-04-30 08:00:00\",\n    \"2017-01-14 23:00:00\"\n  ]\n}\n\n/* The columns field specifies the structure of each of the results. The rowcount field indicates how many rows were returned. The currentness field indicates what the last aggregated timestamp of the MobFox analytics database currently is. */","language":"json","status":200},{"name":"","code":"{\n  \"code\": 401,\n  \"message\": \"api key unknown\"\n}","language":"json","status":401},{"status":400,"language":"json","code":"{\n  \"code\": 400,\n  \"message\": \"invalid group field(s): ex_demand_partner_id-\"\n}"}]},"settings":"56871d3743a8590d00983adb","auth":"required","params":[{"_id":"56885ae36ac8f90d0043c4d1","ref":"","in":"query","required":true,"desc":"The API key for your account. We recommend using the HTTP request header **X-MOBFOX-APIKEY** instead, for additional security. The API key is required for this endpoint. Your API key can be found on this page: https://account.mobfox.com/www/cp/edit_profile.php<br><br>","default":"","type":"string","name":"apikey"},{"_id":"56885ae36ac8f90d0043c4d0","ref":"","in":"query","required":true,"desc":"**Supported values are:**<br> **today**<br> **yesterday**<br> **week_to_day**<br> **month_to_day**<br> **last_month**<br> <br> Instead of **period**, the combination of **from/to** can also be used. If neither **period nor from/to** are specified, the period defaults to the last fully passed calendar day of the specified timezone tz.<br><br>","default":"yesterday","type":"string","name":"period"},{"_id":"56885b5ca448420d002a257e","ref":"","in":"query","required":true,"desc":"The start date of the report interval, in format **YYYY-MM-DD HH:MI:SS**. Time is optional and is interpreted as **00:00:00** when missing. **The start date is inclusive**. Instead of from/to, period can also be used. If neither period nor from/to are specified, the period defaults to the last fully passed calendar day of the specified timezone tz.<br><br>","default":"00:00:00","type":"string","name":"from"},{"_id":"56885b5ca448420d002a257d","ref":"","in":"query","required":true,"desc":"The end date of the report interval, in format **YYYY-MM-DD HH:MI:SS**. Time is optional and is interpreted as **23:59:59** when missing. **The end date is inclusive**. Instead of from/to, period can also be used. If neither period nor from/to are specified, the period defaults to the last fully passed calendar day of the specified timezone tz.<br><br>","default":"23:59:59","type":"string","name":"to"},{"_id":"56885b7fb0ee6d0d00d4b1bb","ref":"","in":"query","required":false,"desc":"The time zone for period/from/to date(time) values. [Supported time zone values are listed here](http://www.php.net/manual/en/timezones.php). Exceptions to this list are the aliases *CET, EET, EST, Factory, GMT, HST, MET, MST, UCT, UTC, WET, Zulu which are not supported!* We recommend using geographical time zones (eg. **Europe/London**) instead of offset-based time zones (eg. Etc/GMT-2) in order to implicitly account for daylight saving time changes. If **tz** is not specified, **Etc/UTC** is used as default.<br><br>","default":"Etc/UTC","type":"string","name":"tz"},{"_id":"56885b7fb0ee6d0d00d4b1ba","ref":"","in":"query","required":false,"desc":"A list of dimension fields to group totals by. The list is delimited by comma characters (\",\").<br><br> **Supported fields are:**<br> **inventory_id:** id of the inventory on MobFox SSP<br> **country_code:** e.g.: US, AT, DE, CN<br> **ex_demand_partner_id:** this is the ID of the demand partner endpoint<br> **ex_buyerseat:** buyer seat as provided by the demand partner to MobFox<br> **request_type:** banner, video, native<br> **ex_nobid_reason:** types of errors MobFox encountered with the **ex_demand_partner_id**<br> <br> By default, totals are only grouped by the specified time group timegroup.<br><br>","default":"","type":"string","name":"group"},{"_id":"56885bbfe1f9a00d00350ac9","ref":"","in":"query","required":false,"desc":"A list of totals to calculate. The list is delimited by comma characters (\",\").<br> <br> **Supported fields are:**<br> **total_ex_bid_requests**<br> **total_ex_bid_responses**<br> **total_ex_timeouts**<br> **total_ex_bids**<br> **total_ex_valid_bids**<br> **total_ex_nobids:** includes nobids and errors MobFox SSP encountered with the **ex_demand_partner_id**<br> **total_ex_bids_won**<br> **ex_total_impression_price:** final cost to demand partner<br> **total_served**<br> **total_impressions**<br> **total_clicks** <br><br>","default":"","type":"string","name":"totals"},{"_id":"56885bbfe1f9a00d00350ac8","ref":"","in":"query","required":false,"desc":"The granularity of the time group.<br><br> **Supported values are:**<br> **month**<br> **week**<br> **day**<br> **hour**: hour granularity is only supported for periods of up to 72 hours (3 days)<br> **interval**: sums totals for the whole timeframe provided in **period** or **from/to**<br> <br> The default time granularity is interval. <br> <br>","default":"interval","type":"string","name":"timegroup"},{"_id":"56885bbfe1f9a00d00350ac7","ref":"","in":"query","required":false,"desc":"A dimension field and value to filter by. This parameter can be repeated for each field you want to filter, eg. **f:inventory_id=65&f:country_code=GB**. All fields supported by the parameter group can also be filtered. The syntax for requiring or excluding empty values is ** &f:inventory_id=*EMPTY* or &f:inventory_id=*!EMPTY* **, respectively. Currently, only equality filters are supported. By default, no filters are applied.<br><br>","default":"","type":"string","name":"f"},{"_id":"56885ceb73922d1700d7cb68","ref":"","in":"query","required":false,"desc":"An API option and its corresponding value.<br> <br>  **Supported options are:**<br>  **o:include_legacy_publisher_id=true**: Will add the legacy publisher_id in response should you need it.<br> <br>","default":"","type":"string","name":"o"}],"url":"/dsppartner/report/"},"isReference":false,"order":5,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Fetch reporting data for only one endpoint\",\n  \"body\": \"Some user accounts use multiple endpoints inside MobFox SSP.\\nIn order to fetch data for only one of your endpoints please add this to your API URL:\\n**&f:ex_demand_partner_id=YOUR_MF_ENDPOINT_ID**\\n\\nThe **f:** stands for a **filter** you are applying to the reporting result and it is explained above.\\n\\nIn our system a **ex_demand_partner_id = an endpoint id** for historic reasons.\\nThe **Demand Partner** is the user account itself.\"\n}\n[/block]","excerpt":"This is for you if you are a demand partner on MobFox SSP","slug":"reporting-api-demand-partner","type":"get","title":"Reporting API - Demand Partner"}

getReporting API - Demand Partner

This is for you if you are a demand partner on MobFox SSP

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

apikey:
required
string
The API key for your account. We recommend using the HTTP request header **X-MOBFOX-APIKEY** instead, for additional security. The API key is required for this endpoint. Your API key can be found on this page: https://account.mobfox.com/www/cp/edit_profile.php<br><br>
period:
required
stringyesterday
**Supported values are:**<br> **today**<br> **yesterday**<br> **week_to_day**<br> **month_to_day**<br> **last_month**<br> <br> Instead of **period**, the combination of **from/to** can also be used. If neither **period nor from/to** are specified, the period defaults to the last fully passed calendar day of the specified timezone tz.<br><br>
from:
required
string00:00:00
The start date of the report interval, in format **YYYY-MM-DD HH:MI:SS**. Time is optional and is interpreted as **00:00:00** when missing. **The start date is inclusive**. Instead of from/to, period can also be used. If neither period nor from/to are specified, the period defaults to the last fully passed calendar day of the specified timezone tz.<br><br>
to:
required
string23:59:59
The end date of the report interval, in format **YYYY-MM-DD HH:MI:SS**. Time is optional and is interpreted as **23:59:59** when missing. **The end date is inclusive**. Instead of from/to, period can also be used. If neither period nor from/to are specified, the period defaults to the last fully passed calendar day of the specified timezone tz.<br><br>
tz:
stringEtc/UTC
The time zone for period/from/to date(time) values. [Supported time zone values are listed here](http://www.php.net/manual/en/timezones.php). Exceptions to this list are the aliases *CET, EET, EST, Factory, GMT, HST, MET, MST, UCT, UTC, WET, Zulu which are not supported!* We recommend using geographical time zones (eg. **Europe/London**) instead of offset-based time zones (eg. Etc/GMT-2) in order to implicitly account for daylight saving time changes. If **tz** is not specified, **Etc/UTC** is used as default.<br><br>
group:
string
A list of dimension fields to group totals by. The list is delimited by comma characters (",").<br><br> **Supported fields are:**<br> **inventory_id:** id of the inventory on MobFox SSP<br> **country_code:** e.g.: US, AT, DE, CN<br> **ex_demand_partner_id:** this is the ID of the demand partner endpoint<br> **ex_buyerseat:** buyer seat as provided by the demand partner to MobFox<br> **request_type:** banner, video, native<br> **ex_nobid_reason:** types of errors MobFox encountered with the **ex_demand_partner_id**<br> <br> By default, totals are only grouped by the specified time group timegroup.<br><br>
totals:
string
A list of totals to calculate. The list is delimited by comma characters (",").<br> <br> **Supported fields are:**<br> **total_ex_bid_requests**<br> **total_ex_bid_responses**<br> **total_ex_timeouts**<br> **total_ex_bids**<br> **total_ex_valid_bids**<br> **total_ex_nobids:** includes nobids and errors MobFox SSP encountered with the **ex_demand_partner_id**<br> **total_ex_bids_won**<br> **ex_total_impression_price:** final cost to demand partner<br> **total_served**<br> **total_impressions**<br> **total_clicks** <br><br>
timegroup:
stringinterval
The granularity of the time group.<br><br> **Supported values are:**<br> **month**<br> **week**<br> **day**<br> **hour**: hour granularity is only supported for periods of up to 72 hours (3 days)<br> **interval**: sums totals for the whole timeframe provided in **period** or **from/to**<br> <br> The default time granularity is interval. <br> <br>
f:
string
A dimension field and value to filter by. This parameter can be repeated for each field you want to filter, eg. **f:inventory_id=65&f:country_code=GB**. All fields supported by the parameter group can also be filtered. The syntax for requiring or excluding empty values is ** &f:inventory_id=*EMPTY* or &f:inventory_id=*!EMPTY* **, respectively. Currently, only equality filters are supported. By default, no filters are applied.<br><br>
o:
string
An API option and its corresponding value.<br> <br> **Supported options are:**<br> **o:include_legacy_publisher_id=true**: Will add the legacy publisher_id in response should you need it.<br> <br>

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "Fetch reporting data for only one endpoint", "body": "Some user accounts use multiple endpoints inside MobFox SSP.\nIn order to fetch data for only one of your endpoints please add this to your API URL:\n**&f:ex_demand_partner_id=YOUR_MF_ENDPOINT_ID**\n\nThe **f:** stands for a **filter** you are applying to the reporting result and it is explained above.\n\nIn our system a **ex_demand_partner_id = an endpoint id** for historic reasons.\nThe **Demand Partner** is the user account itself." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}