Home

PHP

Impression Report

Parameters:

Name
Type
Description
username
string
Your API username. You should have received this with your account
subscription_id
string
Your Subscription ID. You can copy or regenerate it from your API management interface
start_date/end_date
string
These parameters will allow you to filter results based on date. You can use these parameters to display records who are valid between a set start and expiration date. You can input any date string accepted by PHP but we recomed you use the "Y-m-D H:i:s" format
merchant_id
numeric
The ID of the desired merchant. You can use this parameter to get records provided by a specific merchant. To obtain a list of merchants please read the "Merchants" section
referrer
string
You can pass a referrer to filter the report
client_ip
string
You can pass a client ip to filter the report

Response fields:

statistics_date
string
Statistics date
merchant_name
string
The merchant's name
merchant_id
numeric
The ID of the merchant who is supplying this offer
referrer
string
The referrer for the impression
client ip
string
The ip of the client
              
              
              
              
<?php   
$api_username      = '*******';
$api_subscription  = '*******';

$api_start_date    = '';  // replace with start date
$api_end_date      = '';  // replace with end date

$api_merchant_id   = 0;   // replace with your network id
$api_referrer      = '';  // return report for this referrer only
$api_client_ip     = '';  // return the report for this client ip only

try
{
        $client    = new SoapClient('https://synced.io/api/v2?wsdl');
        $report    = $client->get_impressions_report($api_username, $api_subscription, $api_start_date, $api_end_date, $api_referrer, $api_client_ip);			
}
catch(Exception $e)
{
        echo $e->getMessage();
}    


if(!empty($report))
{
    print_r($report);
}
?>