Offerit API Get Affiliate Stats

From Offerit
Jump to: navigation, search
Offerit
SOAP API (*deprecated*)
API
Add Affiliate
Add Affiliate Sale
Add Offer
Approve Transaction
Creative Types
Decode Offeritcode
Deny Transaction
Disable Affiliate Landing Page
Edit Affiliate Sale
Enable Affiliate Landing Page
Get Affiliate Stats
Get Allowed Affiliates
Get Landing Page Details
Get Offer Details
Get Offer List
Get Profit Loss Report
List Affiliate Details
List Affiliate Subaffiliates
Ping
Set Affiliate Status
Set SubAffiliate Status
Set Member Details
Record Affiliate Click

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
)