Offerit API Get Affiliate Stats
From Offerit
Revision as of 15:32, 19 October 2011 by OfferitJames (talk | contribs) (Created page with "{{Offerit Manual | show_api_admin_section = true }} This function allows you to get a list of available adtool types. To use this function, you must make a SOAP call with the fol...")
This function allows you to get a list of available adtool types. To use this function, you must make a SOAP call with the following parameters:
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:offeritapiadmin_wsdl"><SOAP-ENV:Body><tns:get_affiliate_stats xmlns:tns="urn:offeritapiadmin_wsdl"> <loginid xsi:type="xsd:int">2</loginid><offerid xsi:type="xsd:int">1</offerid> <startDate xsi:type="xsd:string">2011-8-14</startDate> <endDate xsi:type="xsd:string"></endDate> </tns:get_affiliate_stats></SOAP-ENV:Body></SOAP-ENV:Envelope>
You will get a response similar to the following:
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:offeritapiadmin_wsdl"><SOAP-ENV:Body><ns1:get_affiliate_statsResponse xmlns:ns1="urn:offeritapiadmin_wsdl"> <return xsi:type="tns:AffStats"><loginid xsi:type="xsd:int">2</loginid><clicks xsi:type="xsd:int">121</clicks> <unique xsi:type="xsd:int">3</unique> <payout_amount xsi:type="xsd:string">23900</payout_amount> <total_sales xsi:type="xsd:int">0</total_sales> </return></ns1:get_affiliate_statsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
NuSOAP Example
This example continues from the main article NuSOAP Example):
$result = $client->call('get_affiliate_stats', Array(), 'offeritapiadmin_wsdl');
Sample Output
16 adtool types were available, but have been reduced down to 4 for display:
Array ( [loginid] => 2 [clicks] => 121 [unique] => 3 [payout_amount] => 23900 [total_sales] => 0 )