Difference between revisions of "Offerit API Get Affiliate Stats"
From Offerit
OfferitJames (talk | contribs) |
OfferitMegan (talk | contribs) |
||
(13 intermediate revisions by 4 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 | ||
+ | |||
== NuSOAP Example == | == NuSOAP Example == | ||
Line 16: | Line 19: | ||
$values = Array( | $values = Array( | ||
'loginid' => 2, | 'loginid' => 2, | ||
− | 'offerid' => 1 //(optional) The ID of the offer to get set to 0 for all offers | + | '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 | + | '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'); | ||
</pre> | </pre> | ||
− | == Sample Output == | + | === Sample Output === |
<pre> | <pre> | ||
Line 35: | Line 40: | ||
) | ) | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 14: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 )