<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.offerit.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=74.0.199.110</id>
		<title>Offerit - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.offerit.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=74.0.199.110"/>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Special:Contributions/74.0.199.110"/>
		<updated>2026-06-14T17:48:14Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_API_Add_Affiliate_Sale&amp;diff=393</id>
		<title>Offerit API Add Affiliate Sale</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_API_Add_Affiliate_Sale&amp;diff=393"/>
				<updated>2011-12-12T21:17:09Z</updated>
		
		<summary type="html">&lt;p&gt;74.0.199.110: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Offerit Manual&lt;br /&gt;
| show_api_admin_section = true&lt;br /&gt;
}}&lt;br /&gt;
This function allows you to add a sale for a specific affiliate. To use this function, you must make a SOAP call with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* '''orderid''' - Your unique orderid that will be associated with the OfferIt customer record&lt;br /&gt;
* '''amount''' - The amount spent on the offer by the customer (optional)&lt;br /&gt;
* '''offeritcode''' - This can be either the encoded, un-encoded, or shortname version of the OfferIt Code. You can take this code out of the URL during a conversion and just pass it along.  This will tell Offerit which offer, landing page, payout, and affiliate this traffic is for. (Explained in more detail below)&lt;br /&gt;
* '''customer''' - OPTIONAL: The name of the array used to pass in customer data with the following elements:&lt;br /&gt;
** '''username''' - The customer's User Name&lt;br /&gt;
** '''password''' - The customer's Password&lt;br /&gt;
** '''firstname''' - The customer's First name&lt;br /&gt;
** '''lastname''' - The customer's Last name&lt;br /&gt;
** '''address1''' - The customer's Address&lt;br /&gt;
** '''address2''' - The customer's Address 2&lt;br /&gt;
** '''zip''' - The customer's Zip Code&lt;br /&gt;
** '''city''' - The customer's City&lt;br /&gt;
** '''country''' - The customer's Country&lt;br /&gt;
** '''state''' - The customer's State&lt;br /&gt;
** '''shipping_firstname''' - The customer's Shipping First name&lt;br /&gt;
** '''shipping_lastname''' - The customer's Shipping Last name&lt;br /&gt;
** '''shipping_address1''' - The customer's Shipping Address&lt;br /&gt;
** '''shipping_address2''' - The customer's Shipping Address 2&lt;br /&gt;
** '''shipping_zip''' - The customer's Shipping Zip Code&lt;br /&gt;
** '''shipping_city''' - The customer's Shipping City&lt;br /&gt;
** '''shipping_country''' - The customer's Shipping  Country&lt;br /&gt;
** '''shipping_state''' - The customer's Shipping State&lt;br /&gt;
** '''phone''' - The customer's Phone Number&lt;br /&gt;
** '''email''' - The customer's Email Address&lt;br /&gt;
** '''mailok''' - Can OfferIt send the customer an Email?&lt;br /&gt;
** '''custom1''' - Store custom data about the customer&lt;br /&gt;
** '''custom2''' - Store custom data about the customer&lt;br /&gt;
** '''custom3''' - Store custom data about the customer&lt;br /&gt;
** '''custom4''' - Store custom data about the customer&lt;br /&gt;
** '''custom5''' - Store custom data about the customer&lt;br /&gt;
* '''currency''' - OPTIONAL: The three-letter abbreviation of the currency type&lt;br /&gt;
* '''time''' - OPTIONAL: The time the sale occurred as a unix timestamp or mysql date format&lt;br /&gt;
&lt;br /&gt;
== NuSOAP Example ==&lt;br /&gt;
&lt;br /&gt;
This example continues from the [[Offerit_API#Example|main article NuSOAP Example]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$values = Array(&lt;br /&gt;
    'orderid'=&amp;gt;'ABCDEFGHI',&lt;br /&gt;
    'amount'=&amp;gt;1,&lt;br /&gt;
    'offeritcode'=&amp;gt;'Mi4yLjEuMS4wLjAuMC4wLjAuMC4wLjA',&lt;br /&gt;
    'customer'=&amp;gt;Array(&lt;br /&gt;
        'firstname'=&amp;gt;'Ben',&lt;br /&gt;
        'lastname'=&amp;gt;'Warren'&lt;br /&gt;
    )&lt;br /&gt;
);&lt;br /&gt;
   &lt;br /&gt;
$result = $client-&amp;gt;call('set_aff_sales_add', $values, 'offeritapiadmin_wsdl');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample Output ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
On success:&lt;br /&gt;
  array(3) {&lt;br /&gt;
    [&amp;quot;message&amp;quot;]=&amp;gt;string(11) &amp;quot;Add Success&amp;quot;&lt;br /&gt;
    [&amp;quot;customerid&amp;quot;]=&amp;gt;int(124)&lt;br /&gt;
    [&amp;quot;orderid&amp;quot;]=&amp;gt;string(9) &amp;quot;ABCDEFGHI&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
On error:&lt;br /&gt;
      error message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Server Request/Response==&lt;br /&gt;
'''Request:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt;&amp;lt;SOAP-ENV:Envelope SOAP-ENV:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; &lt;br /&gt;
	xmlns:SOAP-ENV=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; &lt;br /&gt;
	xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:SOAP-ENC=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; &lt;br /&gt;
	xmlns:tns=&amp;quot;urn:offeritapiadmin_wsdl&amp;quot;&amp;gt;&amp;lt;SOAP-ENV:Body&amp;gt;&amp;lt;tns:set_aff_sales_add xmlns:tns=&amp;quot;urn:offeritapiadmin_wsdl&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;orderid xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;ABCDEFGHI&amp;lt;/orderid&amp;gt;&lt;br /&gt;
			&amp;lt;amount xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;1&amp;lt;/amount&amp;gt;&lt;br /&gt;
                        &amp;lt;offeritcode xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;Mi4yLjEuMS4wLjAuMC4wLjAuMC4wLjA&amp;lt;/offeritcode&amp;gt;&lt;br /&gt;
			&amp;lt;customer xsi:type=&amp;quot;tns:Member&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;firstname xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;Ben&amp;lt;/firstname&amp;gt;&lt;br /&gt;
				&amp;lt;lastname xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;OfferIt&amp;lt;/lastname&amp;gt;&lt;br /&gt;
			&amp;lt;currency xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
			&amp;lt;time xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;1319475600&amp;lt;/time&amp;gt;&lt;br /&gt;
		&amp;lt;/tns:set_aff_sales_add&amp;gt;&amp;lt;/SOAP-ENV:Body&amp;gt;&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt;&amp;lt;SOAP-ENV:Envelope SOAP-ENV:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; &lt;br /&gt;
	xmlns:SOAP-ENV=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; &lt;br /&gt;
	xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:SOAP-ENC=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;SOAP-ENV:Body&amp;gt;&amp;lt;ns1:set_aff_sales_addResponse xmlns:ns1=&amp;quot;urn:offeritapiadmin_wsdl&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;Add Success&amp;lt;/message&amp;gt;&amp;lt;customerid xsi:type=&amp;quot;xsd:int&amp;quot;&amp;gt;124&amp;lt;/customerid&amp;gt;&amp;lt;orderid xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;ABCDEFGHI&amp;lt;/orderid&amp;gt;&lt;br /&gt;
                &amp;lt;/ns1:set_aff_sales_addResponse&amp;gt;&amp;lt;/SOAP-ENV:Body&amp;gt;&lt;br /&gt;
        &amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Offerit API Articles]]&lt;/div&gt;</summary>
		<author><name>74.0.199.110</name></author>	</entry>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_API&amp;diff=392</id>
		<title>Offerit API</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_API&amp;diff=392"/>
				<updated>2011-12-12T17:54:35Z</updated>
		
		<summary type="html">&lt;p&gt;74.0.199.110: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Offerit Manual&lt;br /&gt;
| show_api_admin_section = true&lt;br /&gt;
}}&lt;br /&gt;
The Offerit API is accessible at http://&amp;lt;domain&amp;gt;/admin_api.php&lt;br /&gt;
*Replace &amp;lt;domain&amp;gt; with your Offerit install domain name.&lt;br /&gt;
&lt;br /&gt;
== Gaining Access to the Admin API ==&lt;br /&gt;
In order to access Offerit API, your IP address must be in the ADMIN_API_ALLOWED_IPS list.  You can add or remove IP addresses to this list via the Configurations Admin under the &amp;quot;Security&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
If you're also using ADMIN_IPS to restrict access to your admin, you must also add the IP to that list, as this is also an admin page.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
The Offerit API uses HTTP Authentication where the username is the Affiliate username and the password is the Affiliate API key.  To retrieve your API key simply select it from the login table of your Offerit database or put in a support ticket and we can retrieve it for you.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The easiest way to use SOAP when using PHP is using the [http://sourceforge.net/projects/nusoap/ NuSOAP Toolkit]. Assuming you've downloaded the toolkit into a directory called nusoap, here is an example of how to connect:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
require_once('nusoap/lib/nusoap.php');&lt;br /&gt;
&lt;br /&gt;
$url = 'http://offerit.site.com/admin_api.php'; // change to be the domain of your Offerit install&lt;br /&gt;
$username = 'OFFERITADMIN'; // your admin username&lt;br /&gt;
$apikey = 'afsb35gh8j3rgasfdgja9r8ebja59gb8'; // your api key&lt;br /&gt;
&lt;br /&gt;
$client = new nusoap_client($url.'?wsdl', true);&lt;br /&gt;
$client-&amp;gt;setCredentials($username,$apikey);&lt;br /&gt;
// Check for an error&lt;br /&gt;
$err = $client-&amp;gt;getError();&lt;br /&gt;
if ($err) {&lt;br /&gt;
    // Display the error&lt;br /&gt;
    echo 'Constructor error' . $err . &amp;quot;\n&amp;quot;;&lt;br /&gt;
    exit; // At this point, you know the call that follows will fail&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To give a complete example of this, here's an example using the [[Offerit_API_Ping|Ping]] function. This is how to call it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
require_once('nusoap/lib/nusoap.php');&lt;br /&gt;
&lt;br /&gt;
$url = 'http://offerit.site.com/admin_api.php'; // change to be the domain of your Offerit install&lt;br /&gt;
$username = 'offeritadmin'; // your admin username&lt;br /&gt;
$apikey = 'afsb35gh8j3rgasfdgja9r8ebja59gb8'; // your api key&lt;br /&gt;
&lt;br /&gt;
$client = new nusoap_client($url.'?wsdl', true);&lt;br /&gt;
$client-&amp;gt;setCredentials($username,$apikey);&lt;br /&gt;
// Check for an error&lt;br /&gt;
$err = $client-&amp;gt;getError();&lt;br /&gt;
if ($err) {&lt;br /&gt;
    // Display the error&lt;br /&gt;
    echo 'Constructor error' . $err . &amp;quot;\n&amp;quot;;&lt;br /&gt;
    exit; // At this point, you know the call that follows will fail&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
$result = $client-&amp;gt;call('ping', Array(), 'natsapiadmin_wsdl');&lt;br /&gt;
var_dump($result);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And this is the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool(true)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Offerit API Articles]]&lt;/div&gt;</summary>
		<author><name>74.0.199.110</name></author>	</entry>

	</feed>