This documentation provides detailed information on the available parameters, their possible values, usage examples, and defaults for making requests to the reporting endpoint. The Reporting API allows publishers to retrieve advertising performance metrics by specifying various parameters to filter and customize the data returned.
Base URL
https://app.impactify.io/api/reportingHTTP Method
GET
Request Parameters
report_date
Specifies the date or date range for which the report is generated.
- Type: String
- Required: No
- Default:
yesterday - Possible Values:
todayyesterdaylast-3-dayslast-7-dayslast-15-dayslast-30-daysthis-weeklast-weekthis-monthlast-month- Date range using:
[min]=YYYY-MM-DDand[max]=YYYY-MM-DD
- Examples:
- Single Day:
?report_date=yesterday - Date Range:
?report_date[min]=2023-01-01&report_date[max]=2023-01-15
per_page
Defines the number of results per page in the paginated response.
- Type: Integer
- Required: No
- Default: None (all results in one page)
- Example:
?per_page=20
page
Specifies the page number of results to retrieve in a paginated dataset.
- Type: Integer
- Required: No
- Default:
1 - Example:
?page=2
device_category
Filters the data based on the device category.
- Type: Integer
- Required: No
- Possible Values:
0– Not available1– Desktop2– Mobile3– Tablet- Example:
?device_category=2
app_id
Unique identifier for the application/site for which the report is being requested.
- Type: String
- Required: No
- Example:
?app_id=abc123
Examples
- Requesting a report for a specific date for mobile devices:
- Requesting a detailed paginated report for the last week:
Notes
- Dates must be in the format
YYYY-MM-DD. - If no
report_dateis specified, the default value isyesterday. - Pagination parameters (
per_pageandpage) are optional; if not used, all results are returned in a single response.
Response Format
The API returns a JSON object containing a single key, rows, which is an array of objects. Each object in this array represents a collection of metrics for a specific report.
Response Fields
rows
An array of objects where each object contains the following metrics:
- app: Identifier of the app/site.
- Type: String
- Example:
"ExampleSite123"
- revenue: The net revenue amount.
- Type: Integer
- Example:
4500
- revenue_currency: The currency of the revenue.
- Type: String
- Example:
"USD"
- requests: The number of ad requests made.
- Type: Integer
- Example:
3771000
- impressions: The total number of ads actually displayed.
- Type: Integer
- Example:
1975000
- format_impressions: The total number of formats with ads actually displayed.
- Type: Integer
- Example:
1013000
- external_publisher_id: The external identifier for the publisher could be the publisher’s ID as it appears in the Ad Network system or dashboard. This will match the ID entered on our dashboard.
- Type: String
- Example:
"Pub12345"
- external_app_id: The external identifier for the site could be the site’s ID as it appears in the publisher’s system or dashboard. This will also match the ID entered on our dashboard.
- Type: String
- Example:
"App54321"
- adstext_status: The status of the publisher’s Ads.txt.
- Type: Boolean
- Example:
true
- completed_views_100: The count of ads that have been viewed to their full length.
- Type: Integer
- Example:
1382500
- clicks: The number of times ads were clicked.
- Type: Integer
- Example:
4800
Example Response
{
"rows": [
{
"app": "ExampleSite123",
"revenue": 4500,
"revenue_currency": "USD",
"requests": 3771000,
"impressions": 1975000,
"external_publisher_id": "Pub12345",
"external_app_id": "App54321",
"adstext_status": true,
"completed_views_100": 1382500,
"clicks": 4800
}
]
}
Authentication
Authentication Method
Authentication to the Reporting API is done using an API key which must be included in the headers of each request. The API key should be treated as sensitive information and not exposed in client-side code.
Required Header
The API key must be included in the request header as follows:
- Header Name:
X-IMPACTIFY-APIKEY - Header Value:
Your_API_Key - Header Name:
X-IMPACTIFY-APIUSER - Header Value:
Your_API_User(Main account email; if different check with your account manager)
Code Examples
Using PHP
In PHP, you can use the file_get_contents function with a stream context to include the header. Here’s an example:
<?php
$apiUrl = 'https://app.impactify.io/api/reporting'; // Reporting API endpoint URL
$apiKey = 'Your_API_Key'; // Replace with your actual API key
$apiUser = 'Your_API_User'; // If different from your main account email, check with your account manager
$response = file_get_contents($apiUrl, false, stream_context_create([
'http' => [
'header' => "X-IMPACTIFY-APIKEY: $apiKey\r\n" .
"X-IMPACTIFY-APIUSER: $apiUser",
'method' => 'GET'
]
]));
echo $response;
?>
Notes
- Ensure that your API key is stored securely and not hardcoded in your source code for production applications. Consider using environment variables or secure vault solutions.
- If you encounter authentication issues, verify that the API key has not expired and is correctly inputted in the header.