<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>oauth1 Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/oauth1/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/oauth1/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 11 Dec 2025 11:54:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>oauth1 Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/oauth1/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to call NetSuite RESTlet API in SSIS / ODBC</title>
		<link>https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 23 May 2022 21:18:19 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9657</guid>

					<description><![CDATA[<p>Introduction In our previous post we saw how to read API data in SSIS. This post we will cover how to call NetSuite RESTlet to read / write data in SSIS or ODBC Apps. For demo purpose we will use SSIS PowerPack REST API Task but concepts and many UI elements remain same for ODBC [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png"><img loading="lazy" decoding="async" class=" wp-image-9658 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png" alt="" width="144" height="114" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png 309w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo-300x238.png 300w" sizes="(max-width: 144px) 100vw, 144px" /></a>In our previous post we saw how to <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">read API data in SSIS</a>. This post we will cover how to call <a href="https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N2979684.html">NetSuite RESTlet</a> to read / write data in SSIS or ODBC Apps. For demo purpose we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS PowerPack REST API Task</a> but concepts and many UI elements remain same for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/">ODBC JSON Driver</a> too. This article assumes you know how to write Netsuite RESTlet and you have obtained Credentials to call RESTlet from extranal app.</p>
<h2></h2>
<h2></h2>
<h2>What is NetSuite RESTlets</h2>
<p>NetSuite added a really nice feature to expose business data and workflows as API by writing Javascript functions which they call it <strong>RESTlets</strong>. You can secure and customize these restlets as per your need.</p>
<p>You can automate CRUD (Create /Read / Write / Delete) operations in NetSuite by writing special functions in JavaScript and expose those functions as API URL which can be called by any external Systems (i.e. SSIS Packages , ODBC Apps like Power BI, Informatica, SSRS).</p>
<p>RESTlet can be secured few ways such as OAuth 1.0 and OAuth 2.0 authentication. We will cover both approach briefly in this article. You can choose any one as per your need</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Creating NetSuite RESTlet / Obtain OAuth Credentials (Client ID and Secret)</h2>
<p>Below video shows how to obtain necessary credentials to call Netsuites API (RESTlet).</p>
<p>At mark 4:30 seconds it will show you How to use OAuth 2.0 for calling RESTlet</p>
<a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FMAOMQp5dh0U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Create NetSuite RESTlet Connection</h2>
<p>There are few ways to authenticate NetSuite RESTlet. If you are using ZappySys Products then it makes it super easy to use either approach. Lets look at both approaches.</p>
<h3>Using OAuth 2.0 (Recommended)</h3>
<p>As per above video if you obtained Client ID and Secret for OAuth 2.0 you can follow below steps to configure OAuth connection to call RESTlet.</p>
<p>What you need to use OAuth 2.0.</p>
<ul>
<li>Your Account ID (it goes in URL)</li>
<li>Your Client ID and Secret (Obtained from Netsuite Portal) &#8211; See above video Mark 04:30</li>
<li>Register Redirect URL in NetSuite portal (we recommend you use <strong>https://zappysys.com/oauth</strong> as call back Url for Automatic Code extraction)</li>
</ul>
<p><strong>Steps to configure OAuth Connection</strong></p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type<br />
<strong><strong><br />
</strong></strong></p>
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li> Enter following things<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On General Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
ClientID and Secret: <strong>&lt;get it from NetSuite&gt;</strong><br />
Authorization URL: <strong>https://&lt;accountID&gt;.</strong><a href="http://app.netsuite.com/app/login/oauth2/authorize.nl" target="_blank" rel="noopener noreferrer"><strong>app.netsuite.com/app/login/oauth2/authorize.nl</strong></a><br />
Token URL: <strong>https://&lt;accountID&gt;.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token<br />
</strong>Scope: <strong><strong><strong>restlet</strong></strong></strong></p>
<div id="attachment_9660" style="width: 642px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9660" class="size-full wp-image-9660" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png" alt="Configure NetSuite OAuth 2.0 Connection for API call" width="632" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png 632w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection-300x198.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-9660" class="wp-caption-text">Configure NetSuite OAuth 2.0 Connection for API call</p></div>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On Advanced Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Callback / Redirect URL:  <strong>https://zappysys.com/oauth </strong> (this must be entered same way in NetSuite Portal)</p>
<div id="attachment_9659" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9659" class="size-full wp-image-9659" src="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png" alt="OAuth2 Connection - Callback / Redirect URL" width="553" height="201" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url-300x109.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9659" class="wp-caption-text">OAuth2 Connection &#8211; Callback / Redirect URL</p></div></li>
<li>Now go back to General Tab and click <strong>Generate Token</strong> button</li>
<li>Follow login screen and try to finish the flow. At the end it will generate Tokens and populate on UI</li>
<li>Click OK to save</li>
</ol>
<h3>Using OAuth 1.0</h3>
<p>Another approach is use OAuth 1.0 (Older version). If you have enabled OAuth 1.0 in NetSuite then follow below steps (Create connection is same as before).</p>
<ol>
<li>Setup General Tab and Advanced Tab as below.<br />
On <strong>==== </strong><strong>General Tab====</strong>:<br />
Enter ClientID, ClientSecret, AccessToken, AccessToken Secret<br />
On <strong>==== </strong><strong>Advanced Tab ====</strong>:<br />
Check <strong>Do Not Include Empty Key/Value Pairs</strong><br />
Select Signature Method as <strong>HMAC-SHA256</strong><br />
For Extra Token Attribute enter <strong>realm=&lt;your-account-number&gt;_SB1</strong></li>
<li>Click OK to Save</li>
</ol>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9662" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9661" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<h2></h2>
<h2>Call NetSuite RESTlet in SSIS</h2>
<ol>
<li>Create a new SSIS Package</li>
<li>Drag REST API Task from SSIS Toolbox<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click the Task to configure</li>
<li>Select <strong>URL from Connection </strong></li>
<li>From Connection dropdown select OAuth connection we created in the earlier section (either OAuth 1 or OAuth 2)</li>
<li>Enter the URL as below. Assuming you copied URL from NetSuite Replace script ID and account number<br />
<pre class="crayon-plain-tag">https://&lt;account-number&gt;-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=&lt;scriptid&gt;&amp;deploy=1</pre>Enter <strong>&lt;account-number&gt;</strong><br />
Enter <strong>&lt;scriptid&gt;</strong></li>
<li>Change Method to POST if your script supports Parameters (Else you can supply id=xxxx and recordtype=xxxxx in the URL for GET request)</li>
<li>If its POST request then chnage ContentType to ApplicationJSON (application/json)</li>
<li>Enter your Input in the body. In below example our RESTlet takes sql query as input so we enter just one parameter named query but you can have different parameter(s)<br />
<pre class="crayon-plain-tag">Syntax:  { param1_name : &lt;value&gt; , param2_name : &lt;value&gt; ....  }</pre>
</li>
<li>Now click Test see everything works
<div id="attachment_9663" style="width: 1178px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9663" class="size-full wp-image-9663" src="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png" alt="Calling NetSuite RESTlet in SSIS (Using REST API Task)" width="1168" height="928" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png 1168w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-768x610.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-1024x814.png 1024w" sizes="(max-width: 1168px) 100vw, 1168px" /></a><p id="caption-attachment-9663" class="wp-caption-text">Calling NetSuite RESTlet in SSIS (Using REST API Task)</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>We saw how easy it is to call NetSuite RESTlets or other NetSuite API in SSIS / other BI Apps using ODBC Drivers provided by ZappySys. <a href="https://zappysys.com/products/ssis-powerpack/download/">Download SSIS PowerPack</a> and try your self see how easy it is to consume virtually any API in SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read/load data in Xero using SSIS</title>
		<link>https://zappysys.com/blog/reading-loading-data-in-xero-sql-server-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 25 Jul 2017 03:02:24 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[API Integration]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[OAuth2.0]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis json source]]></category>
		<category><![CDATA[ssis oauth connection]]></category>
		<category><![CDATA[X509]]></category>
		<category><![CDATA[Xero]]></category>
		<category><![CDATA[Xero Api]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=1602</guid>

					<description><![CDATA[<p>Introduction Xero is well known Cloud based Accounting Software. In this post you will learn how to implement Xero API Integration with SQL Server or any other RDBMS (e.g. Oracle, MySQL, Postgresql) using SSIS in few clicks. We will use SSIS JSON Source to Read data from Xero and Load into SQL Server / other [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/reading-loading-data-in-xero-sql-server-ssis/">How to read/load data in Xero using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="//zappysys.com/blog/wp-content/uploads/2017/07/xero-integration.png"><img loading="lazy" decoding="async" class="alignleft wp-image-1621" src="//zappysys.com/blog/wp-content/uploads/2017/07/xero-integration.png" alt="" width="120" height="120" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/xero-integration.png 375w, https://zappysys.com/blog/wp-content/uploads/2017/07/xero-integration-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2017/07/xero-integration-300x300.png 300w" sizes="(max-width: 120px) 100vw, 120px" /></a>Xero is well known Cloud based Accounting Software. In this post you will learn how to implement <a href="https://developer.xero.com/documentation/getting-started/getting-started-guide" target="_blank" rel="noopener">Xero API</a> Integration with SQL Server or any other RDBMS (e.g. Oracle, MySQL, Postgresql) using <strong>SSIS</strong> in few clicks. We will use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> to <strong>Read data from Xero</strong> and Load into SQL Server / other target (Using OAuth Connection). We will also discuss reverse scenario to <strong>Write data to Xero</strong> (API POST for Insert or Update in Xero) using <a href="//zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">SSIS JSON Generator Transform</a></p>
<h2></h2>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we look into Step-By-Step section to extract and load data from <strong>Xero to SQL Server</strong> let’s make sure you met following requirements.</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li><a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener"><em>ZappySys SSIS PowerPack</em> installed</a>. Click on the link to download FREE trial.</li>
<li>You have basic familiarity with REST API concepts and Xero API.</li>
</ol>
<h2>Concepts of Xero REST API</h2>
<h3>API Authorization</h3>
<p>Before you can access Xero API you must register account and App. There are 3 types of Apps to access Xero API.</p>
<ol>
<li>Private App (X509 Certificate used to sign requests)</li>
<li>Public App (Use 3-legged OAuth. Token expires in 30 mins and then you have to authorize again from UI)</li>
<li>Partner App (Use 3-legged OAuth. Token expires in 30 mins.. but refresh token supported to get new token for unlimited times without Authorization via Login UI)</li>
<li><a href="https://developer.xero.com/documentation/oauth2/auth-flow" target="_blank" rel="noopener">OAuth2.0 Authentication (Recommended) </a></li>
</ol>
<p>In this article we will use <a href="https://developer.xero.com/documentation/auth-and-limits/private-applications" target="_blank" rel="noopener">Private App</a> to access your company data in Xero.</p>
<h3>Data formats</h3>
<p>Xero API supports Xml and JSON both formats over the same URL (endpoints). If you want data in JSON format then you have to pass following Header (else data in Xml format will be returned). If you are using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> then make sure following header is added. For <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a> no need to add this header.</p><pre class="crayon-plain-tag">Accept : application/json</pre><p>
<h2>Step-By-Step : Xero API Integration in SSIS</h2>
<p>Now lets look at steps needed to fetch data from Xero and load into SQL Server.</p>
<h3><span id="Configure_OAuth_Connection_for_Google_BigQuery_API">Configure OAuth2.0 Connection for Xero API (Recommended)</span></h3>
<p>So let&#8217;s how to create the Xero OAuth2.0 connection. For more on OAuth2.0 refer to <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">this article</a>.</p>
<ol>
<li>Right-click inside the Connection Managers area again and click “New Connection…”</li>
<li>From the connection type list select “ZS-OAUTH” connection type.
<div id="attachment_1569" style="width: 687px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="wp-image-1569 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div></li>
<li>Select<em> OAuth Provider </em>which Custom, enter the CleintID and Secret and set the URLs as below and desired <a href="https://developer.xero.com/documentation/oauth2/scopes" target="_blank" rel="noopener">scopes</a> that are required for the API Call.<br />
Auth URL:<br />
<pre class="crayon-plain-tag">https://login.xero.com/identity/connect/authorize</pre>
Token URL:<br />
<pre class="crayon-plain-tag">https://identity.xero.com/connect/token</pre>
Scopes: Add your desired scopes based on your API call requirements.<br />
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Note: To get a refresh token, you must request the offline_access scope. A refresh token allows you to refresh your access token and maintain an offline connection.<br />
<strong>offline_access</strong></p>
<p><a href="https://developer.xero.com/documentation/guides/oauth2/scopes/#offline-access" target="_blank" rel="noopener">https://developer.xero.com/documentation/guides/oauth2/scopes/#offline-access</a></div></div>
<div id="attachment_8858" style="width: 681px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-configuration.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8858" class="wp-image-8858 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-configuration.png" alt="OAuth2.0 Connection" width="671" height="695" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-configuration.png 671w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-configuration-290x300.png 290w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-8858" class="wp-caption-text">OAuth2.0 Connection</p></div></li>
<li> Now go to the Advanced tab and set the redirect URL as below and also you need to set the same URL in the Xero API App.<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth2</pre>
<div id="attachment_1345" style="width: 581px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-oauth-setting-redirect-url1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1345" class="wp-image-1345 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-oauth-setting-redirect-url1.png" alt="" width="571" height="123" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-oauth-setting-redirect-url1.png 571w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-oauth-setting-redirect-url1-300x65.png 300w" sizes="(max-width: 571px) 100vw, 571px" /></a><p id="caption-attachment-1345" class="wp-caption-text">Set Callback/Return Url in OAuth Connection</p></div></li>
<li>Now Click on the Generate Token Button and logged in with Xero username and password and grant permission.</li>
<li>That&#8217;s it your token is generated. If you got the blank Screen like this after following all the steps. Close that window.
<div id="attachment_8859" style="width: 671px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-blank-screen.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8859" class="wp-image-8859 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-blank-screen.png" alt="OAuth2.0 connection : Blank Window at last" width="661" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-blank-screen.png 661w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-oauth2.0-connection-blank-screen-300x296.png 300w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-8859" class="wp-caption-text">OAuth2.0 connection : Blank Window at last</p></div></li>
<li>And it will ask you to use the Different Method to generate the Token using system default browser <strong>click on YES</strong>.
<div id="attachment_8860" style="width: 671px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-default-browser-to-generate-toekn.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8860" class="size-full wp-image-8860" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-default-browser-to-generate-toekn.png" alt="Different Method to generate the Token using system default browser" width="661" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-default-browser-to-generate-toekn.png 661w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-default-browser-to-generate-toekn-300x296.png 300w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-8860" class="wp-caption-text">Different Method to generate the Token using system default browser</p></div></li>
<li>It will open the URL in the browser there you need to log in and grant the permission.</li>
<li>After that, you will able to view the access token in the browser. you can copy from there also.
<div id="attachment_8861" style="width: 738px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-default-browser-generated-token.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8861" class="wp-image-8861 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-default-browser-generated-token.png" alt="Generated Token" width="728" height="347" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-default-browser-generated-token.png 728w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-default-browser-generated-token-300x143.png 300w" sizes="(max-width: 728px) 100vw, 728px" /></a><p id="caption-attachment-8861" class="wp-caption-text">Generated Token</p></div></li>
<li>At the last, it will again focus on the connection and there it will ask you to save the token if you want to store it. if not then you can manually copy and paste that token.
<div id="attachment_8862" style="width: 671px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-popup-to-store-token.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8862" class="wp-image-8862 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-popup-to-store-token.png" alt="OAuth Connection : Store the Tokens" width="661" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-popup-to-store-token.png 661w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-popup-to-store-token-300x296.png 300w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-8862" class="wp-caption-text">OAuth Connection : Store the Tokens</p></div></li>
<li>That&#8217;s it now click on the Test Connection button to test it.
<div id="attachment_6415" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-quickbooks-oauth-test.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6415" class="size-medium_large wp-image-6415" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-quickbooks-oauth-test-768x735.png" alt="" width="720" height="689" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-quickbooks-oauth-test-768x735.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-quickbooks-oauth-test-300x287.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-quickbooks-oauth-test.png 771w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6415" class="wp-caption-text">Generate Token and Test Connection</p></div></li>
</ol>
<h3>Register OAuth App Private for Xero (Private App) OAuth Connection (Depreciated)</h3>
<p>Here is how to configure Xero to use Private App (click on below link).</p>
<p><a href="https://developer.xero.com/documentation/auth-and-limits/private-applications" target="_blank" rel="noopener">https://developer.xero.com/documentation/auth-and-limits/private-applications</a></p>
<p>In the above link during <a href="https://developer.xero.com/documentation/api-guides/create-publicprivate-key" target="_blank" rel="noopener">these steps</a> <strong>openssl</strong> command may throw error about <strong>openssl.cnf is missing</strong> or cannot load. If you face such error then don&#8217;t worry just refer to following workaround.</p>
<p><a href="https://stackoverflow.com/questions/14459078/unable-to-load-config-info-from-usr-local-ssl-openssl-cnf" target="_blank" rel="noopener">https://stackoverflow.com/questions/14459078/unable-to-load-config-info-from-usr-local-ssl-openssl-cnf</a></p>
<p>Basically you can either supply config file path in each command OR set path by issuing SET command before any other command. See below examples (Assuming you installed OpenSSL to c:\OpenSSL-Win64 folder)</p><pre class="crayon-plain-tag">c:\OpenSSL-Win64&amp;gt;openssl req -x509 -config &quot;C:\OpenSSL-Win64\bin\openssl.cnf&quot;</pre><p>
&#8212; OR &#8212;  type before command before any other openssl commands</p><pre class="crayon-plain-tag">c:\OpenSSL-Win64&amp;gt;set OPENSSL_CONF=c:\OpenSSL-Win64\bin\openssl.cnf

c:\OpenSSL-Win64&amp;gt;openssl req -x509 -config &quot;C:\OpenSSL-Win64\bin\openssl.cnf&quot;</pre><p>
Once you generate public key, private key and, pfx file we are ready to <strong>call Xero API in SSIS</strong></p>
<h4><span id="Configure_OAuth_Connection_for_Google_BigQuery_API">Configure Xero (Private App) OAuth Connection</span></h4>
<p>Once you generate certificate using openssl and register Private App for Xero we are ready to move to SSIS piece. Lets see how to do that.</p>
<ol>
<li>Open Visual Studio</li>
<li>Open existing SSIS Project or create new using File &gt; New &gt; Project &gt; Choose &#8220;Integration Services Project&#8221; Type under Business Intelligence template category</li>
<li>Open Package</li>
<li>Right click inside Connection Managers area and click “New Connection…”</li>
<li>From the connection type list select “ZS-OAUTH” connection type.
<div id="attachment_1569" class="wp-caption alignnone">
<p><a href="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" class="size-full wp-image-1569" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png?resize=677%2C220" sizes="(max-width: 677px) 100vw, 677px" srcset="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png?w=677 677w, https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png?resize=300%2C97 300w" alt="Create new SSIS OAuth API Connection Manager" width="643" height="209" data-attachment-id="1569" data-permalink="https://zappysys.com/blog/get-data-google-bigquery-using-ssis/ssis-oauth-create-new-connection/#main" data-orig-file="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png?fit=677%2C220&amp;ssl=1" data-orig-size="677,220" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-oauth-create-new-connection" data-image-description="&lt;p&gt;Create new SSIS OAuth API Connection Manager&lt;/p&gt; " data-medium-file="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png?fit=300%2C97&amp;ssl=1" data-large-file="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png?fit=677%2C220&amp;ssl=1" /></a></p>
<p class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p>
</div>
</li>
<li>On the connection select “Xero (Private App)” from Service Provider Dropdown</li>
<li>Enter Client ID (Obtain this from <a href="https://app.xero.com/Application/" target="_blank" rel="noopener">App created</a> in Previous section) App Selection leave “Use Default OAuth App” selected. If you <a href="//zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">created custom OAuth App</a> then select “Use Custom OAuth App” Option</li>
<li>Enter some fake value in Client Secret (not needed when you use Private App). Secret will come from certificate file like below.
<div id="attachment_1612" style="width: 685px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-for-xero-private-app-x509-certificate.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1612" class="size-full wp-image-1612" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-for-xero-private-app-x509-certificate.png" alt="SSIS OAuth Connection - Configure Xero API Connectivity using Private App (Certificate File Approach)" width="675" height="512" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-for-xero-private-app-x509-certificate.png 675w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-connection-for-xero-private-app-x509-certificate-300x228.png 300w" sizes="(max-width: 675px) 100vw, 675px" /></a><p id="caption-attachment-1612" class="wp-caption-text">SSIS OAuth Connection &#8211; Configure Xero API Connectivity using Private App (Certificate File Approach)</p></div></li>
<li>Now go to Certificate tab and Check Use Certificate Enter, Enter certificate location and password like below.
<div id="attachment_1611" style="width: 685px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-xero-x509-certificate-public-private-key-example-pfx-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1611" class="size-full wp-image-1611" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-xero-x509-certificate-public-private-key-example-pfx-file.png" alt="SSIS OAuth Connection - Configure X509 Certificate File Option for Xero Private App (Select PFX file)" width="675" height="512" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-xero-x509-certificate-public-private-key-example-pfx-file.png 675w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-xero-x509-certificate-public-private-key-example-pfx-file-300x228.png 300w" sizes="(max-width: 675px) 100vw, 675px" /></a><p id="caption-attachment-1611" class="wp-caption-text">SSIS OAuth Connection &#8211; Configure X509 Certificate File Option for Xero Private App (Select PFX file)</p></div></li>
<li>Click OK to save OAuth connection manager</li>
</ol>
<p>So <strong>in the next section</strong> from the upper connections, <strong>we need to use any of the one connection only</strong> for Xero API now let&#8217;s try to read data from Xero using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a>.</p>
<p><strong>Xero recently added OAuth 2.0 support so that now recommended way to use as Connection.</strong></p>
<h3>Configure JSON / REST API Source &#8211; Read data from Xero</h3>
<p>Now let&#8217;s look at how to configure SSIS JSON Source to read data from Xero API</p>
<ol>
<li>In the control flow ssis toolbox Drag and drop data flow task</li>
<li>Double click Data flow</li>
<li>Drag ZS JSON Source (REST API or File) from SSIS Toolbox and drop on Data flow designer</li>
<li>Double click <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> to configure it.</li>
<li>Set the following properties
<ol>
<li>Enter URL<br />
<pre class="crayon-plain-tag">https://api.xero.com/api.xro/2.0/Invoices</pre>
</li>
<li>Check Use Credentials and select OAuth connection we created in the previous section</li>
<li>For Headers grid. Click on <strong>Raw Edit</strong> button and remove enter following (remove default headers)<br />
<pre class="crayon-plain-tag">Accept: application/json</pre>
</li>
<li>Click on Select filter and select an array node as below to generate filter expression (e.g. $.Invoices[*] )</li>
</ol>
</li>
</ol>
<div id="attachment_1615" style="width: 1120px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-read-invoices-using-json-rest-api-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1615" class="size-full wp-image-1615" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-read-invoices-using-json-rest-api-source.png" alt="Configure SSIS JSON /REST API Source - Read Xero Invoices" width="1110" height="714" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-read-invoices-using-json-rest-api-source.png 1110w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-read-invoices-using-json-rest-api-source-300x193.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-read-invoices-using-json-rest-api-source-768x494.png 768w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-read-invoices-using-json-rest-api-source-1024x659.png 1024w" sizes="(max-width: 1110px) 100vw, 1110px" /></a><p id="caption-attachment-1615" class="wp-caption-text">Configure SSIS JSON /REST API Source &#8211; Read Xero Invoices</p></div>
<p>Also, add following header in case of multiple tenants are being used in XERO environment &#8211;</p><pre class="crayon-plain-tag">xero-tenant-id: &lt;TENANT ID FROM XERO&gt;</pre><p>
<h3>Configure Xero REST API Pagination in SSIS JSON Source</h3>
<p>By default, Xero may not send you all records and you may have to setup pagination to read more data after the first response.</p>
<p>For example, you like to read LineItems from Invoices. For that make sure you use below URL and include page=1 to start with. If you do not include page=1 then Line items are not returned (Yes its ODD but clearly <a href="https://developer.xero.com/documentation/api/invoices" target="_blank" rel="noopener">documented here</a>).</p>
<ol>
<li>Enter URL as<br />
<pre class="crayon-plain-tag">https://api.xero.com/api.xro/2.0/Invoices?page=1</pre>
</li>
<li>Select Filter as <pre class="crayon-plain-tag">$.Invoices[*].LineItems[*]</pre></li>
<li>Go to Pagination tab</li>
<li>Select Pagination by URL Parameter</li>
<li>Enter <strong>page</strong> as pagination parameter name like below
<div id="attachment_457" style="width: 843px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-looping-url-parameter-mode.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-457" class="size-full wp-image-457" src="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-looping-url-parameter-mode.png" alt="REST API Looping/Pagination via URL Page Number Parameter (Loop until last page detected)" width="833" height="585" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-looping-url-parameter-mode.png 833w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-looping-url-parameter-mode-300x211.png 300w" sizes="(max-width: 833px) 100vw, 833px" /></a><p id="caption-attachment-457" class="wp-caption-text">REST API Looping/Pagination via URL Page Number Parameter (Loop until last page detected)</p></div></li>
<li>Click OK to save</li>
</ol>
<p>Now when you run package you will see all LineItems for each Invoice will be returned.</p>
<h3>Loading Xero data to SQL Server</h3>
<p>Now last step is loading Xero data to SQL Server. For example purpose we will load data into SQL Server but you can load into any Target (e.g. Flat file, Oracle, Excel) using Microsoft or ZappySys Destination connectors</p>
<p>To load Xero data into SQL Server perform following steps</p>
<ol>
<li>Drag OLEDB destination on Data Flow surface</li>
<li>Connect ZS JSON Source to Destination</li>
<li>On OLEDB destination select / create new SQL Connection and then Click &#8220;New Table&#8221;</li>
<li>Click on Mappings tab and click OK to save</li>
<li>Execute Package</li>
</ol>
<div id="attachment_1617" style="width: 792px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-to-sql-server-data-load.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1617" class="size-full wp-image-1617" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-to-sql-server-data-load.png" alt="Configure SSIS OLEDB Destination - Loading Xero Data into SQL Server Table" width="782" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-to-sql-server-data-load.png 782w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-to-sql-server-data-load-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-to-sql-server-data-load-768x582.png 768w" sizes="(max-width: 782px) 100vw, 782px" /></a><p id="caption-attachment-1617" class="wp-caption-text">Configure SSIS OLEDB Destination &#8211; Loading Xero Data into SQL Server Table</p></div>
<div id="attachment_1618" style="width: 744px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-sql-server-load-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1618" class="size-full wp-image-1618" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-sql-server-load-mappings.png" alt="Xero to SQL Server Column Mappings for OLEDB Destination" width="734" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-sql-server-load-mappings.png 734w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-sql-server-load-mappings-300x222.png 300w" sizes="(max-width: 734px) 100vw, 734px" /></a><p id="caption-attachment-1618" class="wp-caption-text">Xero to SQL Server Column Mappings for OLEDB Destination</p></div>
<div id="attachment_1619" style="width: 293px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-loading-data-from-xero-to-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1619" class="size-full wp-image-1619" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-loading-data-from-xero-to-sql-server.png" alt="Loading Xero data to SQL Server in SSIS" width="283" height="391" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-loading-data-from-xero-to-sql-server.png 283w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-loading-data-from-xero-to-sql-server-217x300.png 217w" sizes="(max-width: 283px) 100vw, 283px" /></a><p id="caption-attachment-1619" class="wp-caption-text">Loading Xero data to SQL Server in SSIS</p></div>
<h2>POST data to Xero (Insert or Update)</h2>
<p>So far we have seen how to read data from Xero. Now let&#8217;s look at how to write data to Xero.</p>
<p>There are two ways you can achieve this.</p>
<ol>
<li>Use <a href="//zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> in Data Flow</li>
<li>Use <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> in Control Flow</li>
</ol>
<p>Read this article to learn more about <a href="//zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/" target="_blank" rel="noopener">API POST using SSIS</a></p>
<h3>Using SSIS Web API Task (Write data from SQL Server to Xero)</h3>
<h3><img decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination-post-json-to-rest-api-url.png?resize=503%2C403" alt="SSIS Web API Destination - POST JSON to REST API Endpoint, Create / Update records" /></h3>
<h3>Using REST API Task to POST data to Xero</h3>
<p>If you have JSON/XML data already prepared and if you like to POST it to Xero API then REST API Task would be easy to use.</p>
<p>REST API Task Body can be direct string, variable (e.g. {{User::varSomeData}} or <a href="https://zappysys.com/blog/rest-api-file-upload-using-ssis-multi-part-post/" target="_blank" rel="noopener">Body can come from File </a></p>
<div id="attachment_1616" style="width: 872px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-post-data-xero-api-create-contacts-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1616" class="size-full wp-image-1616" src="//zappysys.com/blog/wp-content/uploads/2017/07/ssis-post-data-xero-api-create-contacts-example.png" alt="SSIS REST API Task - POST data to Xero (Create contacts)" width="862" height="602" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-post-data-xero-api-create-contacts-example.png 862w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-post-data-xero-api-create-contacts-example-300x210.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-post-data-xero-api-create-contacts-example-768x536.png 768w" sizes="(max-width: 862px) 100vw, 862px" /></a><p id="caption-attachment-1616" class="wp-caption-text">SSIS REST API Task &#8211; POST data to Xero (Create contacts)</p></div>
<h2>Read data from Xero Report API</h2>
<p>In previous examples we saw how to read data from various Xero API endpoints but now lets look at how to call <a href="https://developer.xero.com/documentation/api/reports" target="_blank" rel="noopener">Xero Report API</a>. For example if you like to extract data displayed in below then you can extract it in Xml or JSON format. Below report is in HTML format but we will show you how to get similar information in JSON format and load into SQL Server Table.</p>
<div style="width: 460px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://www.xero.com/blog/wp-content/uploads//2008/10/pandlreport.png" alt="Xero Report Example - View Profit and Loss Report in Xero Portal" width="450" height="257" /><p class="wp-caption-text">Xero Report Example &#8211; View Profit and Loss Report in Xero Portal</p></div>
<p>To extract above information you can call below API Endpoint (e.g. <a href="https://developer.xero.com/documentation/api/reports#ProfitAndLoss" target="_blank" rel="noopener">Profit &amp; Loss Report</a>)</p><pre class="crayon-plain-tag">GET 
https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2017-02-01&amp;toDate=2017-02-28</pre><p>
You can use Variables to make above URL dynamic in JSON Source as below</p><pre class="crayon-plain-tag">https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate={{User::StartDate,yyyy-MM-dd}}&amp;toDate={{User::EndDate,yyyy-MM-dd}}</pre><p>
Each report has its own API URL so make sure you refer to the connect URL for calling different report.</p>
<p>Here is sample response from API</p><pre class="crayon-plain-tag">{
  "Reports": [
    {
      "ReportID": "ProfitAndLoss",
      "ReportName": "Profit and Loss",
      "ReportType": "ProfitAndLoss",
      "ReportTitles": [
        "Profit &amp; Loss",
        "Demo Company (AU)",
        "1 February 2018 to 28 February 2018"
      ],
      "ReportDate": "25 February 2018",
      "UpdatedDateUTC": "\/Date(1519593468971)\/",
      "Rows": [
        {
          "RowType": "Header",
          "Cells": [
            { "Value": "" },
            { "Value": "28 Feb 18" },
            { "Value": "28 Jan 18" }
          ]
        },
        {
          "RowType": "Section",
          "Title": " Income",
          "Rows": [
            {
              "RowType": "Row",
              "Cells": [
                {
                  "Value": "Sales",
                  "Attributes": [
                    {
                      "Value": "e2bacdc6-2006-43c2-a5da-3c0e5f43b452",
                      "Id": "account"
                    }
                  ]
                },{
                  "Value": "9220.05",
                  "Attributes": [
                    {
                      "Value": "e2bacdc6-2006-43c2-a5da-3c0e5f43b452",
                      "Id": "account"
                    }
                  ]
                },{
                  "Value": "5120.05",
                  "Attributes": [
                    {
                      "Value": "e2bacdc6-2006-43c2-a5da-3c0e5f43b452",
                      "Id": "account"
                    }
                  ]
                }
              ]
            },
            {
              "RowType": "SummaryRow",
              "Cells": [
                { "Value": "Total Income" },
                { "Value": "9220.05" },
                { "Value": "1250.09" }
              ]
            }
          ]
        },{
          "RowType": "Section",
          "Rows": [
            {
              "RowType": "Row",
              "Cells": [
                { "Value": "NET PROFIT" },
                { "Value": "-6250.09" },
                { "Value": "-7250.09" }
              ]
            }
          ]
        }
      ]
    }
  ]
}</pre><p>
&nbsp;</p>
<p>Now lets look at steps to configure JSON Source to extract your Xero Report Data.</p>
<ol>
<li>Drag new JSON Source from SSIS Toolbox</li>
<li>Double click JSON Source to configure it</li>
<li>In the Path / Web URL, enter API Report URL to call desired Report Start / End Date or any other expected Parameter by report (<strong>Refer to API Documentation</strong>). For our example we will enter below URL<br />
<pre class="crayon-plain-tag">https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2017-02-01&amp;toDate=2017-02-28</pre>
</li>
<li>Check <strong>Use Credentials</strong> and Select Connection we created in the Previous Section</li>
<li>In the Filter enter <pre class="crayon-plain-tag">$.Reports[*].Rows[*].Rows[*]</pre></li>
<li>Now go to 2D Array Transform Tab and configure like below. If your UI varies then use Properties window to edit property manually.<br />
Basically you need to edit<br />
<strong>Transformation Type:</strong> <pre class="crayon-plain-tag">2-dimensional array</pre>
<strong>Column Name Filter:</strong> <pre class="crayon-plain-tag">$.Reports[0].Rows[*].Cells[*].Value</pre>
<strong>Row Values Filter:</strong> <pre class="crayon-plain-tag">$.Cells[*].Value</pre></li>
<li>Now Click Preview Data. If you get error Column &#8221; does not belong to table nosqldata. Then most likely you using old version with Known Issue (i.e. v2.9.7.10822 or older). Get latest version for fix. For workaround of this issue you must follow next section to specify columns manually. Columns must match count.</li>
</ol>
<p>Here is how it will look like.</p>
<div id="attachment_8037" style="width: 680px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-filter-options-extract-report.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8037" class="size-full wp-image-8037" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-filter-options-extract-report.png" alt="Configure Transform Options for Xero Report API (Dynamic Column Title)" width="670" height="166" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-filter-options-extract-report.png 670w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-api-filter-options-extract-report-300x74.png 300w" sizes="(max-width: 670px) 100vw, 670px" /></a><p id="caption-attachment-8037" class="wp-caption-text">Configure Transform Options for Xero Report API (Dynamic Column Title)</p></div>
<div id="attachment_8039" style="width: 842px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-json-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8039" class="size-full wp-image-8039" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-json-source.png" alt="Read from Xero Report API using JSON Source in SSIS (Dynamic Columns Example)" width="832" height="526" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-json-source.png 832w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-json-source-300x190.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-json-source-768x486.png 768w" sizes="(max-width: 832px) 100vw, 832px" /></a><p id="caption-attachment-8039" class="wp-caption-text">Read from Xero Report API using JSON Source in SSIS (Dynamic Columns Example)</p></div>
<h3>Fixing Dynamic Columns Problem in for Xero Report API</h3>
<p>Now let&#8217;s look at one common scenario which you have to think. SSIS data flow has fixed metadata so if your Report is generating Dynamic Columns each time based on Date Range then it will be trouble for you because all your columns may come as null if initial date range changes.</p>
<p>To address this issue you have to use Static Column Names as below.</p>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: You must enter exact same number of columns returned in the Header Row section or more. If you enter less number of columns then you will get error. For example in previous sample report screen we have following 6 Columns. Portal HTML report page shows YTD as extra column but API may not return this column so you will have to count it as 5 columns in below example. Best thing is enter 13 or more columns (typically covers 12 months data). If report doesn&#8217;t return all columns then you will get some as NULL but its ok because it will not fail.</div></div>
<pre class="crayon-plain-tag">Account (or sometimes blank) | Oct 08 | Sep 08 | Aug 08 | Jul 08 | YTD</pre>
In above case you have to enable following properties. (Below Screenshot has Col1,Col2&#8230;.. Col13  but you can enter less number of columns based on above logic of column count).</p>
<p><strong>NOTE:</strong> Use <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task</a> to obtain Raw JSON and review First Row which contains Number of columns<br />
For example if your API return some thing like below then you can use <strong>5 columns</strong> (<strong>one Blank header + 4 Months</strong>)</p><pre class="crayon-plain-tag">"Rows": [
        {
          "RowType": "Header",
          "Cells": [
            { "Value": "" },
            { "Value": "28 Feb 18" }
            { "Value": "28 Mar 18" }
            { "Value": "28 Apr 18" }
            { "Value": "28 May 18" }
          ]
        },</pre><p>
Once we know how many columns we should expect from API response, we can perform following steps. We will now configure our JSON Source component to use Static Columns.</p>
<ol>
<li>Drag new JSON Source from SSIS Toolbox</li>
<li>Right click JSON Source &gt; Click on Properties (You can do below using UI too but in old version no option for that &#8211; See below this section)</li>
<li>Enter following values for property
<ol>
<li><strong>Filter:</strong> <pre class="crayon-plain-tag">$.Reports[*].Rows[*].Rows[*]</pre></li>
<li><strong>ArrayTransformationType:</strong> <pre class="crayon-plain-tag">TransformComplexTwoDimensionalArray</pre></li>
<li><strong>ArrayTransCustomColumns:</strong> <pre class="crayon-plain-tag">Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13</pre>    <strong>(Assuming you have 12 months to compare)</strong></li>
<li><strong>ArrayEnableCustomColumn:</strong> <pre class="crayon-plain-tag">True</pre></li>
<li><strong>ArrayTransRowValueFilter:</strong> <pre class="crayon-plain-tag">$.Cells[*].Value</pre></li>
</ol>
</li>
<li>Now double click JSON Source to configure</li>
<li>In the Path / Web URL, enter API Report URL to call desired Report Start / End Date or any other expected Parameter by report (<strong>Refer to API Documentation</strong>). For our example we will enter below URL<br />
<pre class="crayon-plain-tag">https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2017-02-01&amp;toDate=2017-02-28</pre>
</li>
<li>Check <strong>Use Credentials</strong> and Select Connection we created in the Previous Section</li>
<li>In the Filter enter <pre class="crayon-plain-tag">$.Reports[*].Rows[*].Rows[*]</pre></li>
<li>Now click Preview.</li>
</ol>
<p><strong>For Old Version use Properties Grid</strong></p>
<div id="attachment_8040" style="width: 946px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/configure-json-source-xero-api-extract.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8040" class="size-full wp-image-8040" src="https://zappysys.com/blog/wp-content/uploads/2017/07/configure-json-source-xero-api-extract.png" alt="Configure Xero Report Data Extract using SSIS Property Grid (For Older Version)" width="936" height="321" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/configure-json-source-xero-api-extract.png 936w, https://zappysys.com/blog/wp-content/uploads/2017/07/configure-json-source-xero-api-extract-300x103.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/configure-json-source-xero-api-extract-768x263.png 768w" sizes="(max-width: 936px) 100vw, 936px" /></a><p id="caption-attachment-8040" class="wp-caption-text">Configure Xero Report Data Extract using SSIS Property Grid (For Older Version)</p></div>
<p><strong>For New Version Use UI (It has Specify Columns Manually Option)</strong></p>
<div id="attachment_8038" style="width: 915px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-static-columns.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8038" class="size-full wp-image-8038" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-static-columns.png" alt="Read from Xero Report API using parameters in JSON Source in SSIS (Static Columns Example)" width="905" height="532" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-static-columns.png 905w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-static-columns-300x176.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-xero-read-report-api-static-columns-768x451.png 768w" sizes="(max-width: 905px) 100vw, 905px" /></a><p id="caption-attachment-8038" class="wp-caption-text">Read from Xero Report API using parameters in JSON Source in SSIS (Static Columns Example)</p></div>
<p>&nbsp;</p>
<h2>Common Errors</h2>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<h2>Deployment to Production</h2>
<div class="content_block" id="custom_post_widget-1932"><p style="text-align: justify;">In SSIS package <a href="https://docs.microsoft.com/en-us/sql/integration-services/security/access-control-for-sensitive-data-in-packages" target="_blank" rel="noopener">sensitive data such as tokens and passwords are by default encrypted by SSIS</a> with your Windows account which you use to create a package. So SSIS will fail to decrypt tokens/passwords when you run it from another machine using another Windows account. To circumvent this when you are creating an SSIS package which uses authentication components (e.g. an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> or an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">HTTP Connection Manager</a> with credentials, etc.), consider using parameters/variables to pass tokens/passwords. In this way, you won’t face authentication related errors when a package is deployed to a production server.</p>
<p style="text-align: justify;">Check our article on <a href="https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/" target="_blank" rel="noopener">how to configure packages with sensitive data on your production or development server</a>.</p></div>
<h2><span id="ConclusionWhat8217s_next">Conclusion. What’s next?</span></h2>
<p>In this article we have learned how to load data from Xero to SQL Server using SSIS ( drag and drop approach without coding). We used <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS JSON / REST API Connector</a> to extract data from Xero REST API using OAuth. JSON Source makes it super simple to parsing complex / large JSON Files or any Web API Response into rows and column so you can load into database like SQL Server. <a href="//zappysys.com/products/ssis-powerpack/">Download SSIS PowerPack</a> to try many other automation scenarios not discussed in this article.</p>
<p><strong>Keywords:</strong></p>
<p>Xero Integration with SQL Server | How to extract data from Xero in SSIS? | How to read data from Xero API? | Loading Xero Data into SQL Server. | Xero to SQL Server | SQL Server to Xero | SSIS Xero Integration</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/reading-loading-data-in-xero-sql-server-ssis/">How to read/load data in Xero using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Call Semantics3 REST API in SSIS use OAuth1</title>
		<link>https://zappysys.com/blog/call-semantics3-rest-api-in-ssis-use-oauth1/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 15 Oct 2016 02:00:27 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[semantics3]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis json source]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[ssis rest api task]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=823</guid>

					<description><![CDATA[<p>Introduction In this post you will learn how to call Sementics3 REST API using SSIS PowerPack. Using drag and drop approach you can consume data from Semantics3 REST API service. In this post we will use ZappySys JSON Source to read data from Amazon MWS API and load into SQL Server. We will also use REST API Task to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-semantics3-rest-api-in-ssis-use-oauth1/">Call Semantics3 REST API in SSIS use OAuth1</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post you will learn how to <em>call <a href="http://docs.semantics3.com/docs/api-requests" target="_blank" rel="noopener">Sementics3</a> REST API</em> using <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>.</p>
<p>Using drag and drop approach you can <em>consume data from Semantics3 REST API service.</em> In this post we will use <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">ZappySys JSON Source</a> to read data from Amazon MWS API and load into SQL Server. We will also use <a href="//zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task</a> to call any API from Marketplace Web service and save output into Variable.</p>
<h2>Assumption</h2>
<p>This post assumes following things</p>
<ol>
<li>You have basic knowledge of SSIS and JSON format.</li>
<li>You have registered for Semantics3 API Access. If not then it takes less than 5 minutes to <a href="https://dashboard.semantics3.com/signup" target="_blank" rel="noopener">register for free here</a> to get started.</li>
<li>You have tested few API calls using <a href="https://dashboard.semantics3.com/p#/playground" target="_blank" rel="noopener">Semantics3 REST API Playground</a> this will give you idea about various API you can call and parameters you need to pass.</li>
</ol>
<h2>Step-By-Step &#8211; Call Semantics3 REST API using SSIS</h2>
<p>To consume data from any JSON Source (File or REST API) you can use  <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZappySys JSON Source.</a> or <a href="//zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task.</a> In below example you will see how to call Semantics3 REST API and save output into SSIS Variable. With this approach you can call any API (GET / POST / DELETE / PUT)</p>
<ol>
<li>Download and Install SSIS PowerPack</li>
<li>Create test package</li>
<li>From SSIS toolbox drag <a href="//zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a>  and double click on the task to configure it</li>
<li>Select Request URL Access Mode = [Url from Connection]</li>
<li>Enter URL as below<br />
<pre class="crayon-plain-tag">https://api.semantics3.com/v1/products?q=%7b%22search%22%3a%22iphone%22%7d</pre>
In above URL<br />
** q=%7b%22search%22%3a%22iphone%22%7d =&gt; This is your search query in URL encoded format. Data without URL encode may look like this q={&#8220;search&#8221; : &#8220;iphone&#8221; }<br />
** If you have stored query in plain text (not encoded) in SSIS variable then you can use URLENC format specifier like this q={{User::varQ,URLENC}} . This will automatically encode data for you.</li>
<li>In Select Url Connection dropdown select New OAUTH connection option.</li>
<li>When prompted on OAuth connection UI select Provider=Custom, Enter ApiKey (i.e. Client ID) and Secret (i.e. Client Secret). If you not sure what is this then check your Developer console &gt; Applications Tab. Select OAuth1 from Version dropdown.
<div id="attachment_840" style="width: 685px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-oauth-1-connection-manager-semantics3-rest-api-call.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-840" class="size-full wp-image-840" src="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-oauth-1-connection-manager-semantics3-rest-api-call.png" alt="Semantics3 API Call using SSIS OAuth1 Connection Manager" width="675" height="491" srcset="https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-oauth-1-connection-manager-semantics3-rest-api-call.png 675w, https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-oauth-1-connection-manager-semantics3-rest-api-call-300x218.png 300w" sizes="(max-width: 675px) 100vw, 675px" /></a><p id="caption-attachment-840" class="wp-caption-text">Semantics3 API Call using SSIS OAuth1 Connection Manager</p></div></li>
<li>Click OK to save UI. Do not click test because it may not work yet.</li>
<li>Now click Test and see content in the Preview window.
<div id="attachment_841" style="width: 711px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-841" class="size-full wp-image-841" src="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth.png" alt="Call Semantics3 REST API using SSIS REST API Task" width="701" height="579" srcset="https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth.png 701w, https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth-300x248.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-841" class="wp-caption-text">Call Semantics3 REST API using SSIS REST API Task</p></div></li>
<li>If you wish to save response data into SSIS variable then goto response Tab and check save option and select variable name.</li>
</ol>
<h2>Load Semantics3 data into SQL Server using SSIS (REST API Call)</h2>
<p>In this section we will see how to use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZappySys JSON Source</a> to read data from Semantics3 REST API and load into SQL Server</p>
<p>For making things simple we are calling</p>
<ol>
<li>Download and Install SSIS PowerPack</li>
<li>Create test package</li>
<li>From SSIS toolbox drag Data Flow task and double click task to go to Data Flow designer</li>
<li>Drag <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox</li>
<li>Configure JSON Source as below. You can use Select Filter option to select hierarchy (JSON Array). Then click Preview to see data.
<div id="attachment_839" style="width: 849px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth1-read-json-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-839" class="size-full wp-image-839" src="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth1-read-json-source.png" alt="Get data from Semantics3 API using SSIS JSON Source" width="839" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth1-read-json-source.png 839w, https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-call-semantics3-rest-api-oauth1-read-json-source-300x227.png 300w" sizes="(max-width: 839px) 100vw, 839px" /></a><p id="caption-attachment-839" class="wp-caption-text">Get data from Semantics3 API using SSIS JSON Source</p></div></li>
<li>Drag OLEDB destination from SSIS Toolbox.</li>
<li>Connect JSON Source to OLEDB Destination and map input column to target table</li>
<li>Execute dataflow to load Semantics3 Data into SQL Server (or any destination such as File, Oracle, MySQL)
<div id="attachment_838" style="width: 591px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-extract-data-semantics3-rest-api-load-into-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-838" class="size-full wp-image-838" src="//zappysys.com/blog/wp-content/uploads/2016/10/ssis-extract-data-semantics3-rest-api-load-into-sql-server.png" alt="Read from Semantics3 REST API Call - Load into SQL Server using SSIS" width="581" height="379" srcset="https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-extract-data-semantics3-rest-api-load-into-sql-server.png 581w, https://zappysys.com/blog/wp-content/uploads/2016/10/ssis-extract-data-semantics3-rest-api-load-into-sql-server-300x196.png 300w" sizes="(max-width: 581px) 100vw, 581px" /></a><p id="caption-attachment-838" class="wp-caption-text">Read from Semantics3 REST API Call &#8211; Load into SQL Server using SSIS</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>Semantics3 API provides great way to automate many functionality for searching and ordering millions of products into your custom App. Using ZappySys <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> you can consume data from any REST API or Web service without replying on SDK / coding approach (e.g. C#, Java, Python, Ruby).</p>
<p>The post <a href="https://zappysys.com/blog/call-semantics3-rest-api-in-ssis-use-oauth1/">Call Semantics3 REST API in SSIS use OAuth1</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
