Difference between revisions of "Offerit API Get Affiliate Stats"
From Offerit
OfferitRob (talk | contribs) |
OfferitMegan (talk | contribs) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
* '''startDate''' - (optional) The date to start getting stats | * '''startDate''' - (optional) The date to start getting stats | ||
* '''endDate''' - (optional) The date to end 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 | ||
Line 21: | Line 22: | ||
'startDate' => '2011-10-01', //(optional) The date to start getting stats | 'startDate' => '2011-10-01', //(optional) The date to start getting stats | ||
'endDate' => '2011-10-03', //(optional) The date to end 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'); | $result = $client->call('get_affiliate_stats', $values, 'offeritapiadmin_wsdl'); | ||
Line 36: | Line 39: | ||
[total_sales] => 0 | [total_sales] => 0 | ||
) | ) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> |
Latest revision as of 13:53, 1 February 2013
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 )