{"_id":"587a7ec21fe2370f001d085f","parentDoc":null,"category":{"_id":"56859e9c009a8d0d00797130","__v":3,"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"},"project":"564621e00c30fb2100ba3814","__v":6,"user":"564621d275c83f0d00e9d52d","version":{"_id":"564621e10c30fb2100ba3817","__v":14,"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,total_ex_bid_impressions,total_ex_bid_impression_errors&f:ex_demand_partner_id=60,513&f:inventory_id=4,10,12\""}]},"method":"get","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    \"total_ex_bid_impressions\",\n    \"total_ex_bid_impression_errors\"\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      1,\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      1,\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      1,\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      1,\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      1,\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      1,\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 dimensions to group/breakdown by. The list is delimited by comma characters (\",\"). By default, the data is grouped by the **timegroup**. Supported values are **documented below**.<br><br>","default":"","type":"string","name":"group"},{"_id":"56885bbfe1f9a00d00350ac9","ref":"","in":"query","required":false,"desc":"A list of totals to return. The allowed values are delimited by comma characters (\",\"). Supported fields are **documented below**.<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]\n\n[block:api-header]\n{\n  \"title\": \"Group\"\n}\n[/block]\nBelow you'll find all values you can use in the **group** parameter.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Value\",\n    \"h-1\": \"Description\",\n    \"0-2\": \"\",\n    \"0-0\": \"inventory_id\",\n    \"1-0\": \"country_code\",\n    \"2-0\": \"ex_demand_partner_id\",\n    \"2-1\": \"The ID of your endpoint at MobFox.\",\n    \"1-1\": \"Two-letter country code.\\n\\nExample: US, AT, IL\",\n    \"0-1\": \"The ID of the app your ads were placed on.\",\n    \"3-0\": \"ex_buyerseat\",\n    \"3-1\": \"Buyer seat as provided by the demand partner to MobFox.\",\n    \"4-0\": \"request_type\",\n    \"4-1\": \"Example: banner, video, native.\",\n    \"5-0\": \"ex_nobid_reason\",\n    \"5-1\": \"Types of errors MobFox encountered with the **ex_demand_partner_id**.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Totals\"\n}\n[/block]\nBelow you'll find all values you can use for the **totals** parameter.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Value\",\n    \"0-0\": \"total_ex_bid_requests\",\n    \"1-0\": \"total_ex_bid_responses\",\n    \"2-0\": \"total_ex_timeouts\",\n    \"3-0\": \"total_ex_errors\",\n    \"4-0\": \"total_ex_bids\",\n    \"5-0\": \"total_ex_valid_bids\",\n    \"6-0\": \"total_ex_nobids\",\n    \"7-0\": \"total_ex_bids_won\",\n    \"8-0\": \"ex_total_impression_price\",\n    \"11-0\": \"total_served\",\n    \"12-0\": \"total_impressions\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Total bid requests MF SSP made to your DSP.\",\n    \"1-1\": \"Total bid requests which resulted in something other than timeouts or connection issues.\",\n    \"2-1\": \"Total bid request timeouts with your DSP.\",\n    \"3-1\": \"Total bid request errors MF SSP encountered while making bid requests to your DSP.\\n\\n**Hint**: Group by \\\"ex_nobid_reason\\\" to find out which errors occurred.\",\n    \"4-1\": \"Total bids MF SSP received from your DSP no matter if valid or not.\",\n    \"5-1\": \"Total bids MF SSP used for auctions.\",\n    \"6-1\": \"Total bids MF SSP did not see as valid.\",\n    \"7-1\": \"Total ads won by your DSP.\",\n    \"8-1\": \"Final cost to demand partner.\",\n    \"11-1\": \"Total ads served by your DSP.\",\n    \"12-1\": \"Total impressions resulting from bids served by your DSP.\",\n    \"13-0\": \"total_clicks\",\n    \"9-0\": \"total_ex_bid_impressions\",\n    \"10-0\": \"total_ex_bid_impression_errors\",\n    \"9-1\": \"Total successful win notifications.\",\n    \"10-1\": \"Total failed win notifications.\\n\\n**Hint**: Group by \\\"ex_nobid_reason\\\" to find out which errors occurred.\",\n    \"13-1\": \"Total clicks resulting from bids served by your DSP.\"\n  },\n  \"cols\": 2,\n  \"rows\": 14\n}\n[/block]","excerpt":"This is for you if you are a demand partner on MobFox SSP","slug":"reporting-api-demand-partner","type":"endpoint","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 dimensions to group/breakdown by. The list is delimited by comma characters (","). By default, the data is grouped by the **timegroup**. Supported values are **documented below**.<br><br>
totals:
string
A list of totals to return. The allowed values are delimited by comma characters (","). Supported fields are **documented below**.<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] [block:api-header] { "title": "Group" } [/block] Below you'll find all values you can use in the **group** parameter. [block:parameters] { "data": { "h-0": "Value", "h-1": "Description", "0-2": "", "0-0": "inventory_id", "1-0": "country_code", "2-0": "ex_demand_partner_id", "2-1": "The ID of your endpoint at MobFox.", "1-1": "Two-letter country code.\n\nExample: US, AT, IL", "0-1": "The ID of the app your ads were placed on.", "3-0": "ex_buyerseat", "3-1": "Buyer seat as provided by the demand partner to MobFox.", "4-0": "request_type", "4-1": "Example: banner, video, native.", "5-0": "ex_nobid_reason", "5-1": "Types of errors MobFox encountered with the **ex_demand_partner_id**." }, "cols": 2, "rows": 6 } [/block] [block:api-header] { "title": "Totals" } [/block] Below you'll find all values you can use for the **totals** parameter. [block:parameters] { "data": { "h-0": "Value", "0-0": "total_ex_bid_requests", "1-0": "total_ex_bid_responses", "2-0": "total_ex_timeouts", "3-0": "total_ex_errors", "4-0": "total_ex_bids", "5-0": "total_ex_valid_bids", "6-0": "total_ex_nobids", "7-0": "total_ex_bids_won", "8-0": "ex_total_impression_price", "11-0": "total_served", "12-0": "total_impressions", "h-1": "Description", "0-1": "Total bid requests MF SSP made to your DSP.", "1-1": "Total bid requests which resulted in something other than timeouts or connection issues.", "2-1": "Total bid request timeouts with your DSP.", "3-1": "Total bid request errors MF SSP encountered while making bid requests to your DSP.\n\n**Hint**: Group by \"ex_nobid_reason\" to find out which errors occurred.", "4-1": "Total bids MF SSP received from your DSP no matter if valid or not.", "5-1": "Total bids MF SSP used for auctions.", "6-1": "Total bids MF SSP did not see as valid.", "7-1": "Total ads won by your DSP.", "8-1": "Final cost to demand partner.", "11-1": "Total ads served by your DSP.", "12-1": "Total impressions resulting from bids served by your DSP.", "13-0": "total_clicks", "9-0": "total_ex_bid_impressions", "10-0": "total_ex_bid_impression_errors", "9-1": "Total successful win notifications.", "10-1": "Total failed win notifications.\n\n**Hint**: Group by \"ex_nobid_reason\" to find out which errors occurred.", "13-1": "Total clicks resulting from bids served by your DSP." }, "cols": 2, "rows": 14 } [/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 }}