{"_id":"56892949ff344617001e7bb2","project":"564621e00c30fb2100ba3814","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"},"editedParams2":true,"user":"564621d275c83f0d00e9d52d","parentDoc":null,"__v":2,"editedParams":true,"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":"2016-01-03T13:59:37.680Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"columns\": [\"day_hour\", \"campaign_id\", \"total_impressions\", \"total_clicks\", \"total_conversions\", \"total_cost\"],\n  \"results\": [\n    [\"2014-03-11 03:00\", 48682, 27697, 187, 60, 25.7706],\n    [\"2014-03-11 04:00\", 48682, 23179, 165, 39, 22.9922],\n    [\"2014-03-11 05:00\", 48682, 27173, 208, 65, 30.5134],\n    [\"2014-03-11 06:00\", 48682, 77931, 449, 179, 66.2237]\n  ],\n  \"rowcount\": 4,\n  \"currentness\": {\n    \"from\": \"2014-03-23 02:00:00\",\n    \"to\": \"2014-04-15 13:59:59\"\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. */","name":""},{"name":"","status":403,"language":"json","code":"{\n  \"error\": \"unknown api key\"\n}"}]},"settings":"56871d3743a8590d00983adb","examples":{"codes":[{"language":"curl","code":"curl \"http://api-v2.mobfox.com/advertiser/report?apikey={apikey}&from=2014-03-11&to=2014-03-23+12tz=Europe/London&group=campaign_id&f:country_code=GB&timegroup=hour\"\n\n# This API request would return statistics for a period of three calendar days (2014-03-11 to 2014-03-13) relative to the timezone of London, grouped by campaign and limited to only activity from Great Britain. The statistics will be grouped hourly."}]},"method":"get","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","default":"","type":"string","name":"apikey"},{"_id":"56885ae36ac8f90d0043c4d0","ref":"","in":"query","required":false,"desc":"Is one of: **today**, **yesterday**, **week_to_day**, **month_to_day**, **last_month**. 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.","default":"yesterday","type":"string","name":"period"},{"_id":"56885b5ca448420d002a257e","ref":"","in":"query","required":false,"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.","default":"00:00:00","type":"string","name":"from"},{"_id":"56885b5ca448420d002a257d","ref":"","in":"query","required":false,"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.","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.","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 (\",\"). Supported fields are: **campaign_id, adgroup_id, ad_id, publisher_id, inventory_id, sub_id, country_code, region_code, city_code, state_code, device_id, device_os_version, carrier_id, publication_name, publication_url, publication_type**. By default, totals are only grouped by the specified time group timegroup.","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 (\",\"). Supported fields are: **total_impressions, total_clicks, total_conversions, total_cost**.","default":"","type":"string","name":"totals"},{"_id":"56885bbfe1f9a00d00350ac8","ref":"","in":"query","required":false,"desc":"The granularity of the time group. Supported values are **month, week, day, hour and interval**. Hour granularity is only supported for periods of up to 72 hours (3 days). The default time granularity is interval.","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:campaign_id=98&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.","default":"","type":"string","name":"f:{field}"}],"url":"/advertiser/report"},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Advertiser Reporting API Overview\"\n}\n[/block]\nThe MobFox Advertising Reporting API allows you pull data regarding your MobFox Advertiser Platform activity. This API requires an **API key**, which can be found in your MobFox account by navigating to [My Account -> Account Information](https://account.mobfox.com/www/cp/edit_profile.php).\n\nThis endpoint provides a near real-time report with **metrics such as impressions, clicks, conversions** and cost for your MobFox advertiser account. Optionally, you can get statistics broken down by certain certain attributes like country or campaign, and filter data to only certain values for these attributes.","excerpt":"","slug":"reporting-api-advertiser-new","type":"endpoint","title":"Reporting API - Advertiser"}

getReporting API - Advertiser


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
period:
stringyesterday
Is one of: **today**, **yesterday**, **week_to_day**, **month_to_day**, **last_month**. 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.
from:
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.
to:
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.
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.
group:
string
A list of dimension fields to group totals by. The list is delimited by comma characters (","). Supported fields are: **campaign_id, adgroup_id, ad_id, publisher_id, inventory_id, sub_id, country_code, region_code, city_code, state_code, device_id, device_os_version, carrier_id, publication_name, publication_url, publication_type**. By default, totals are only grouped by the specified time group timegroup.
totals:
string
A list of totals to calculate. The list is delimited by comma characters (","). Supported fields are: **total_impressions, total_clicks, total_conversions, total_cost**.
timegroup:
stringinterval
The granularity of the time group. Supported values are **month, week, day, hour and interval**. Hour granularity is only supported for periods of up to 72 hours (3 days). The default time granularity is interval.
f:
string
A dimension field and value to filter by. This parameter can be repeated for each field you want to filter, eg. **f:campaign_id=98&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.

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Advertiser Reporting API Overview" } [/block] The MobFox Advertising Reporting API allows you pull data regarding your MobFox Advertiser Platform activity. This API requires an **API key**, which can be found in your MobFox account by navigating to [My Account -> Account Information](https://account.mobfox.com/www/cp/edit_profile.php). This endpoint provides a near real-time report with **metrics such as impressions, clicks, conversions** and cost for your MobFox advertiser account. Optionally, you can get statistics broken down by certain certain attributes like country or campaign, and filter data to only certain values for these attributes.

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 }}