Offerit API Add Affiliate
From Offerit
This function allows you to add a sale data for a specfic affiliate. To use this function, you must make a SOAP call with the following parameters:
- username -
NuSOAP Example
This example continues from the main article NuSOAP Example):
$values = Array( 'username' => 'tmmtest', 'password' => 'fdsafdsa', 'firstname' => 'tester', 'lastname' => 'testtest', 'email' => 'test321@test.com', 'company' => 'testing co.', 'url' => 'test.com', 'tel' => '123-1234', 'icq' => '', 'aim' => '', 'msn' => '', 'address1' => '123 main st', 'address2' => '', 'city' => 'anytown', 'state' => 'nj', 'country' => 'usa', 'zip_code' => 12345, 'tax_id_or_ssn' => '', 'ref' => '', 'minimum_payout' => '50' ); $result = $client->call('add_affs', $values, 'offeritapiadmin_wsdl');
Sample Output
You will get a response similar to the following for each of the affiliate's sales:
Array Array ( [0] => Array ( [result] => 1 [loginid] => 5 ) )
Server Request
<?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:add_affs xmlns:tns="urn:offeritapiadmin_wsdl"> <username xsi:type="xsd:string">tmmtest</username> <password xsi:type="xsd:string">fdsafdsa</password> <firstname xsi:type="xsd:string">tester</firstname> <lastname xsi:type="xsd:string">testtest</lastname> <email xsi:type="xsd:string">test321@test.com</email> <company xsi:type="xsd:string">testing co.</company> <url xsi:type="xsd:string">test.com</url> <tel xsi:type="xsd:string">123-1234</tel> <icq xsi:type="xsd:string"></icq> <aim xsi:type="xsd:string"></aim> <msn xsi:type="xsd:string"></msn> <address1 xsi:type="xsd:string">123 main st</address1> <address2 xsi:type="xsd:string"></address2> <city xsi:type="xsd:string">anytown</city> <state xsi:type="xsd:string">nj</state> <country xsi:type="xsd:string">usa</country> <zip_code xsi:type="xsd:string">12345</zip_code> <tax_id_or_ssn xsi:type="xsd:string"></tax_id_or_ssn> <ref xsi:type="xsd:string"></ref> <minimum_payout xsi:type="xsd:string">50</minimum_payout></tns:add_affs></SOAP-ENV:Body></SOAP-ENV:Envelope>
Server Response
<?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:add_affsResponse xmlns:ns1="urn:offeritapiadmin_wsdl"> <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Add_aff[1]"> <item xsi:type="tns:Add_aff"><result xsi:type="xsd:string">1</result> <loginid xsi:type="xsd:int"></loginid></item></return></ns1:add_affsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>