<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://oitlp.com/index.php?action=history&amp;feed=atom&amp;title=Offerit_REST_API_Add_Tracking_Domain</id>
		<title>Offerit REST API Add Tracking Domain - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://oitlp.com/index.php?action=history&amp;feed=atom&amp;title=Offerit_REST_API_Add_Tracking_Domain"/>
		<link rel="alternate" type="text/html" href="http://oitlp.com/index.php?title=Offerit_REST_API_Add_Tracking_Domain&amp;action=history"/>
		<updated>2026-04-03T17:46:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>http://oitlp.com/index.php?title=Offerit_REST_API_Add_Tracking_Domain&amp;diff=3722&amp;oldid=prev</id>
		<title>Offeritnick at 21:32, 12 May 2017</title>
		<link rel="alternate" type="text/html" href="http://oitlp.com/index.php?title=Offerit_REST_API_Add_Tracking_Domain&amp;diff=3722&amp;oldid=prev"/>
				<updated>2017-05-12T21:32:55Z</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 21:32, 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-l78&quot; &gt;Line 78:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&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;&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;&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>http://oitlp.com/index.php?title=Offerit_REST_API_Add_Tracking_Domain&amp;diff=3655&amp;oldid=prev</id>
		<title>Offeritnick: Created page with &quot;{{Offerit  Manual | show_rest_api_section = true }} == '''POST /offer/add_tracking_domain''' == '''Description'''  *add_tracking_domain adds a new tracking domain  '''Resource...&quot;</title>
		<link rel="alternate" type="text/html" href="http://oitlp.com/index.php?title=Offerit_REST_API_Add_Tracking_Domain&amp;diff=3655&amp;oldid=prev"/>
				<updated>2017-05-11T23:54:35Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Offerit  Manual | show_rest_api_section = true }} == &amp;#039;&amp;#039;&amp;#039;POST /offer/add_tracking_domain&amp;#039;&amp;#039;&amp;#039; == &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;  *add_tracking_domain adds a new tracking domain  &amp;#039;&amp;#039;&amp;#039;Resource...&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_rest_api_section = true&lt;br /&gt;
}}&lt;br /&gt;
== '''POST /offer/add_tracking_domain''' ==&lt;br /&gt;
'''Description''' &lt;br /&gt;
*add_tracking_domain adds a new tracking domain&lt;br /&gt;
&lt;br /&gt;
'''Resource URL'''&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;http://domain/api/offer/add_tracking_domain&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*Enable a new tracking domain for the network&lt;br /&gt;
&lt;br /&gt;
'''Response Format'''&lt;br /&gt;
*JSON&lt;br /&gt;
&lt;br /&gt;
'''[[Offerit_REST_API_Overview#Allowed_HTTP_Request_Methods|Request Method''']]&lt;br /&gt;
*POST&lt;br /&gt;
&lt;br /&gt;
'''[[Offerit_REST_API_Overview#Authentication|Authentication]]'''&lt;br /&gt;
*HTTP headers&lt;br /&gt;
&lt;br /&gt;
== '''Parameters''' ==&lt;br /&gt;
*domain&lt;br /&gt;
**'''''type: string'''''&lt;br /&gt;
**'''''required'''&lt;br /&gt;
** domain including protocol. ex http://t.mydomain.com&lt;br /&gt;
*redirect_domain&lt;br /&gt;
**'''''type: string'''''&lt;br /&gt;
** url destination for non tracking requests.  This prevents the affiliate portal from displaying on this domain.&lt;br /&gt;
*template_protect&lt;br /&gt;
**'''''type: Bool'''''&lt;br /&gt;
** if true, an error message will display instead of the affiliate portal for this domain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Example Request''' ==&lt;br /&gt;
&lt;br /&gt;
'''POST'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;http://domain/api/offer/add_tracking_domain&lt;br /&gt;
domain=https://t.mydomain.com&lt;br /&gt;
template_protect=TRUE&lt;br /&gt;
&amp;lt;/nowiki&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;
{&lt;br /&gt;
  &amp;quot;result&amp;quot;:&amp;quot;Success&amp;quot;,&lt;br /&gt;
  &amp;quot;message&amp;quot;:&amp;quot;Access modified&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Example Code''' ==&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/offer/add_tracking_domain';&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;
&lt;br /&gt;
$data = Array(&lt;br /&gt;
  'domain' =&amp;gt; 'https://t.mydomain.com',&lt;br /&gt;
  'template_protect' =&amp;gt; TRUE,&lt;br /&gt;
&lt;br /&gt;
);   &lt;br /&gt;
&lt;br /&gt;
curl_setopt($curl, CURLOPT_POST, 1);&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_POSTFIELDS, http_build_query($data));&lt;br /&gt;
curl_setopt($curl, CURLOPT_URL, $url); &lt;br /&gt;
&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;
&lt;br /&gt;
[[Category:Offerit API Articles]]&lt;/div&gt;</summary>
		<author><name>Offeritnick</name></author>	</entry>

	</feed>