<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.offerit.com/index.php?action=history&amp;feed=atom&amp;title=Offerit_REST_API_Overview</id>
		<title>Offerit REST API Overview - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.offerit.com/index.php?action=history&amp;feed=atom&amp;title=Offerit_REST_API_Overview"/>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;action=history"/>
		<updated>2026-04-29T23:54:15Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3918&amp;oldid=prev</id>
		<title>OfferitRob at 16:22, 27 August 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3918&amp;oldid=prev"/>
				<updated>2018-08-27T16:22:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:22, 27 August 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Offerit REST API is accessible at &amp;lt;nowiki&amp;gt;http://&amp;lt;domain&amp;gt;/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Offerit REST API is accessible at &amp;lt;nowiki&amp;gt;http://&amp;lt;domain&amp;gt;/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*The API is accessible to admins. '''/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt; is available only to admins.''' &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*The API is accessible to admins. '''/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt; is available only to admins.''' &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Replace &amp;lt;domain&amp;gt; with your &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;NATS &lt;/del&gt;install domain name.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Replace &amp;lt;domain&amp;gt; with your &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Offerit &lt;/ins&gt;install domain name.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Replace &amp;lt;endpoint&amp;gt; with the endpoint that you are trying to access&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Replace &amp;lt;endpoint&amp;gt; with the endpoint that you are trying to access&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Some of the endpoints do not require &amp;lt;action&amp;gt; in the url and all of the urls will be specified in the documentation&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Some of the endpoints do not require &amp;lt;action&amp;gt; in the url and all of the urls will be specified in the documentation&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>OfferitRob</name></author>	</entry>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3728&amp;oldid=prev</id>
		<title>Offeritnick: /* Example Authentication */</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3728&amp;oldid=prev"/>
				<updated>2017-05-12T21:37:35Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example Authentication&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:37, 12 May 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l83&quot; &gt;Line 83:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 83:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$resp = curl_exec($curl); &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$resp = curl_exec($curl); &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//dumps an associative array representation of the json &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//dumps an associative array representation of the json &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;response&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;var_dump(&lt;/del&gt;json_decode($resp, true)); &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;$output = &lt;/ins&gt;json_decode($resp, true)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;if($output !== NULL) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	//json was valid. Dump the decoded array&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	print_r($output);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;else {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	//invalid json, just dump the raw response&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	print_r($resp&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;} &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// Close request to clear up some resources &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// Close request to clear up some resources &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl_close($curl); &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;curl_close($curl); &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Offeritnick</name></author>	</entry>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3603&amp;oldid=prev</id>
		<title>OfferitRob at 20:45, 22 March 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3603&amp;oldid=prev"/>
				<updated>2017-03-22T20:45:54Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:45, 22 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Offerit Manual&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Offerit Manual&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;show_api_admin_section &lt;/del&gt;= true&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;show_rest_api_section&lt;/ins&gt;= true&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>OfferitRob</name></author>	</entry>

	<entry>
		<id>https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3536&amp;oldid=prev</id>
		<title>OfferitDave: Created page with &quot;{{Offerit Manual | show_api_admin_section = true }}   == Overview ==  The Offerit REST API is accessible at &lt;nowiki&gt;http://&lt;domain&gt;/api/&lt;endpoint&gt;/&lt;action&gt;&lt;/nowiki&gt; *The API i...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.offerit.com/index.php?title=Offerit_REST_API_Overview&amp;diff=3536&amp;oldid=prev"/>
				<updated>2015-12-21T16:16:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Offerit Manual | show_api_admin_section = true }}   == Overview ==  The Offerit REST API is accessible at &amp;lt;nowiki&amp;gt;http://&amp;lt;domain&amp;gt;/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt; *The API i...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Offerit Manual&lt;br /&gt;
| show_api_admin_section = true&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview == &lt;br /&gt;
The Offerit REST API is accessible at &amp;lt;nowiki&amp;gt;http://&amp;lt;domain&amp;gt;/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*The API is accessible to admins. '''/api/&amp;lt;endpoint&amp;gt;/&amp;lt;action&amp;gt; is available only to admins.''' &lt;br /&gt;
*Replace &amp;lt;domain&amp;gt; with your NATS install domain name.&lt;br /&gt;
*Replace &amp;lt;endpoint&amp;gt; with the endpoint that you are trying to access&lt;br /&gt;
*Some of the endpoints do not require &amp;lt;action&amp;gt; in the url and all of the urls will be specified in the documentation&lt;br /&gt;
&lt;br /&gt;
== Allowed Endpoints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''service'''&lt;br /&gt;
**'''''actions''''':&lt;br /&gt;
**[[Offerit REST API Ping| GET /service/ping]] &lt;br /&gt;
&lt;br /&gt;
'''report'''&lt;br /&gt;
**'''''actions''''':&lt;br /&gt;
*[[Offerit_REST_API_Get_Profit_Loss_Report|GET /report/profitloss]]&lt;br /&gt;
&lt;br /&gt;
'''transaction'''&lt;br /&gt;
**'''''actions''''':&lt;br /&gt;
*[[Offerit_REST_API_Get_Transaction_Payout_Preview|GET /transaction/transaction_payout_preview]]&lt;br /&gt;
&lt;br /&gt;
== Gaining Access to the REST  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;
== Allowed HTTP Request Methods ==&lt;br /&gt;
*'''GET'''&lt;br /&gt;
*'''POST'''&lt;br /&gt;
*'''PUT'''&lt;br /&gt;
*'''PATCH'''&lt;br /&gt;
&lt;br /&gt;
*For detailed information about these  HTTP Request methods, please refer to their official documentation here:&lt;br /&gt;
**http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html&lt;br /&gt;
&lt;br /&gt;
== Response Format ==&lt;br /&gt;
*[http://json.org/ '''JSON''']&lt;br /&gt;
&lt;br /&gt;
== Response Status Codes ==&lt;br /&gt;
'''200'''&lt;br /&gt;
*On Success, the API will return a ''''200'''' status and output the results of the API call. Please refer to the available API endpoints for possible responses.&lt;br /&gt;
*NOTE: As long as  the endpoint and HTTP request method are valid and there are no invalid parameters, a ''''200'''' response is returned.&lt;br /&gt;
'''400'''&lt;br /&gt;
*The API will return a ''''400'''' status if an invalid or unsupported HTTP request is sent. &lt;br /&gt;
'''404'''&lt;br /&gt;
*The API will return either a ''''404'''' status if an invalid parameter is sent, or if an HTTP request is sent to an invalid endpoint.&lt;br /&gt;
'''405'''&lt;br /&gt;
*The API will return a ''''405'''' status if an invalid HTTP request method is used.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
*The Offerit REST API uses HTTP Header Authentication. &lt;br /&gt;
*Each REST API request requires the Affiliate username and the Affiliate API key to be sent with the HTTP headers of the request.  &lt;br /&gt;
*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;
*If you do not have an API key, you can set one by going to the Affiliates Admin and clicking the icon labeled, &amp;quot;Change API Key&amp;quot;.  &lt;br /&gt;
*''Please note that only full admin accounts are authorized to use the API and set an API key.''&lt;br /&gt;
&lt;br /&gt;
== Required HTTP Headers ==&lt;br /&gt;
*'''api-key''': ''Affiliate api key''&lt;br /&gt;
*'''api-username''': ''Affiliate user name''&lt;br /&gt;
&lt;br /&gt;
**NOTE** The headers keys are NOT case sensitive. &lt;br /&gt;
&lt;br /&gt;
== Example Authentication ==&lt;br /&gt;
Authentication can be handled in various ways using different programming languages. Below are some complete example calls to the Ping endpoint with HTTP Header authentication. &lt;br /&gt;
&lt;br /&gt;
'''PHP'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
$url = 'http://domain/api/ping'&lt;br /&gt;
$curl = curl_init(); &lt;br /&gt;
 &lt;br /&gt;
$headers = array( &lt;br /&gt;
    'api-key: 44b5498dbcb481a0d00b404c0169af62', &lt;br /&gt;
    'api-username: productsupport' &lt;br /&gt;
); &lt;br /&gt;
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); &lt;br /&gt;
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); &lt;br /&gt;
curl_setopt($curl, CURLOPT_URL, $url); &lt;br /&gt;
                                                                                                                                                               &lt;br /&gt;
$resp = curl_exec($curl); &lt;br /&gt;
//dumps an associative array representation of the json &lt;br /&gt;
var_dump(json_decode($resp, true)); &lt;br /&gt;
// Close request to clear up some resources &lt;br /&gt;
curl_close($curl); &lt;br /&gt;
?&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Python'''&lt;br /&gt;
*This example requires pip and the request library which can be installed via pip by: 'pip install requests'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
url = 'http://domain/api/ping'&lt;br /&gt;
headers = {&lt;br /&gt;
	'api-key': '44b5498dbcb481a0d00b404c0169af62',&lt;br /&gt;
	'api-username': 'productsupport'&lt;br /&gt;
}&lt;br /&gt;
 params =  { &lt;br /&gt;
        'payvia_type_id': 1, &lt;br /&gt;
        'rule_type': 'enabled' &lt;br /&gt;
 }&lt;br /&gt;
	&lt;br /&gt;
res = requests.get(url, params=params, headers=headers)&lt;br /&gt;
print res.json()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''node.js'''&lt;br /&gt;
*This example requires npm and the request module which can be installed via npm by: 'npm install request'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var request = require('request');&lt;br /&gt;
                          &lt;br /&gt;
var options = {           &lt;br /&gt;
    url: 'http://domain/api/ping',&lt;br /&gt;
    method: 'GET',        &lt;br /&gt;
    json: true,           &lt;br /&gt;
    headers: {            &lt;br /&gt;
        'api-key': '44b5498dbcb481a0d00b404c0169af62',&lt;br /&gt;
        'api-username': 'productsupport'&lt;br /&gt;
    }                     &lt;br /&gt;
};                        &lt;br /&gt;
                          &lt;br /&gt;
function callback(error, response, body) {&lt;br /&gt;
    if (!error &amp;amp;&amp;amp; response.statusCode == 200) {&lt;br /&gt;
        console.log(body);&lt;br /&gt;
    }                     &lt;br /&gt;
    else{                 &lt;br /&gt;
        console.log(body);                                                                                                                                     &lt;br /&gt;
    }                     &lt;br /&gt;
                          &lt;br /&gt;
}                         &lt;br /&gt;
                          &lt;br /&gt;
request(options, callback);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Curl'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -X GET 'http://domain/api/ping' -H &amp;quot;api-key: 44b5498dbcb481a0d00b404c0169af62&amp;quot; -H &amp;quot;api-username: productsupport&amp;quot;&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;
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>OfferitDave</name></author>	</entry>

	</feed>