Offerit API Record Affiliate Click
From Offerit
Revision as of 15:59, 19 October 2011 by OfferitJames (talk | contribs) (Created page with "{{Offerit Manual | show_api_admin_section = true }} This function allows you to record a sale for an affiliate. To use this function, you must make a SOAP call with the followin...")
This function allows you to record a sale for an affiliate. To use this function, you must make a SOAP call with the following parameters:
- loginid - The affiliate ID to record the click to
- payoutid - The payout ID you want to use
- offerid - The ID of the offer to record
- landing_pageid - (optional) The ID of the landing page to use, set to false to use the default landing page for the offer
- is_unique - (optional) Flag to determine if you want a unique click or not. Defaults to 1
- lang - (optional) The language to use, default is EN
<?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:record_affiliate_click xmlns:tns="urn:offeritapiadmin_wsdl"> <loginid xsi:type="xsd:int">3</loginid> <payoutid xsi:type="xsd:int">2</payoutid> <offerid xsi:type="xsd:int">1</offerid> <landing_pageid xsi:type="xsd:int">1</landing_pageid> <is_unique xsi:type="xsd:int">1</is_unique> <lang xsi:type="xsd:string">EN</lang></tns:record_affiliate_click></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/"> <SOAP-ENV:Body><ns1:record_affiliate_clickResponse xmlns:ns1="urn:offeritapiadmin_wsdl"> <return xsi:type="xsd:string">SUCCESS</return></ns1:record_affiliate_clickResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
NuSOAP Example
This example continues from the main article NuSOAP Example):
$values = Array( 'loginid' => 2, 'payoutid' => 2, 'offerid' => 1, 'landing_pageid' => 1, 'is_unique' => 1, 'lang' => "EN" ); $result = $client->call('record_affiliate_click', Array(), 'offeritapiadmin_wsdl');
Sample Output
on success: SUCCESS on error: ERROR: error message