Offerit API Get Affiliate Stats
From Offerit
This function allows you to get statistics such as the clicks, payout, and total sales of a specific affiliate for a specified date range. To use this function, you must make a SOAP call with the following parameters:
- loginid - The ID of the affiliate whose stats you are requesting
- offerid - (optional) The ID of the offer to get set to 0 for all offers
- startDate - (optional) The date to start getting stats
- endDate - (optional) The date to end getting stats
- subaffs - (optional) an array of sub affiliate ids to include for the stats lookup
- subid - (optional) the single subid to filter stats on
NuSOAP Example
This example continues from the main article NuSOAP Example:
$values = Array( 'loginid' => 2, 'offerid' => 1, //(optional) The ID of the offer to get set to 0 for all offers 'startDate' => '2011-10-01', //(optional) The date to start getting stats 'endDate' => '2011-10-03', //(optional) The date to end getting stats 'subaffs' => Array('subaff' => 'gotleads', 'subaff2' => 'googleads'), 'subid' => "subid" ); $result = $client->call('get_affiliate_stats', $values, 'offeritapiadmin_wsdl');
Sample Output
Array ( [loginid] => 2 [clicks] => 121 [unique] => 3 [payout_amount] => 23900 [total_sales] => 0 )