Difference between revisions of "Offerit API Get Affiliate Stats"
From Offerit
OfferitJames (talk | contribs) |
OfferitMegan (talk | contribs) |
||
(15 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
| show_api_admin_section = true | | show_api_admin_section = true | ||
}} | }} | ||
− | This function allows you to get statistics of a specific affiliate. To use this function, you must make a SOAP call with the following parameters: | + | 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 == | == NuSOAP Example == | ||
− | This example continues from the [[Offerit_API#Example|main article NuSOAP Example]] | + | This example continues from the [[Offerit_API#Example|main article NuSOAP Example]]: |
<pre> | <pre> | ||
− | $result = $client->call('get_affiliate_stats', | + | $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'); | ||
</pre> | </pre> | ||
− | == Sample Output == | + | === Sample Output === |
<pre> | <pre> | ||
Line 51: | Line 40: | ||
) | ) | ||
</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 )