Home

PHP

Commission Report

This API call returns a detailed report about all commissions.

API Function: get_commisions_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 input any date string accepted by PHP but we recomed you use the "Y-m-D H:i:s" format.
currency string Currency code if you want to convert values to a certain currency. The converted values will use the exchange from the current day.
source_id numeric Use source_id if you want to get the report for the selected source only.

 

Response fields:

Name Type Description
statistics_id numeric Unique ID of the statistics
statistics_date string The date when the action was recorded
merchant_name string The name of the merchant associated with the action
merchant_id numeric Unique ID of the merchant associated with the commission
network_name string The name of the affiliate network who recorded the action
program_name string The name of the affiliate program where this action was recorded
tracking_id string The tracking ID/ SubID used for this record
clicks string The number of clicks recorded
sales string The number of sales reported by the merchant
member_id string The ID of the client's member who initiated the action
commission_confirmed numeric Value of the confirmed commission
commission_unconfirmed numeric Value of unconfirmed comission
cashback string Cashback value for the current sale and comission
commission_status string Current status of the commission {pending, approved, paid, rejected}
member_commission string Commission value to be paid to the member
currency_code string Currency code for the values of the commission
payment_status string Payment status. It can take one of the following values: not_paid, pending, paid
user_more_tracking string If you sent subid2 in the short link , you will receive that value in this field

 

              
              
              
              
<?php   
$api_username      = '*******';
$api_subscription  = '*******';

$api_currency      = '';  // return the report in this currency if is set, use currency code  
$api_start_date    = '';  // replace with start date
$api_end_date      = '';  // replace with end date

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


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