Overview
Configuration is provided for establishing connections with NetSuite REST service. The configuration is used in the REST Connection Manager.
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from service resource.
Insert data
Use REST Destination component to insert data into service resource.
Quick Start
In this guide, we will show you step-by-step how to create a connection to NetSuite REST API using COZYROC's REST Connection Manager.
In this guide, we will show how to read data from the NetSuite service resource using the COZYROC REST Source component.
Configuration
Base URL address: https://[accountID].suitetalk.api.netsuite.com/services/rest
.
- OAuth 2
-
The authentication uses an authorized token. The token will be refreshed with the following expression:
{{=Date.now() + (response.expires_in - 300) * 1000}}
.The authentication has the following user-defined parameters:
- Scope:
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Bearer {{=token.Access}}
Documentation: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_158074210415.html.
- OAuth 1
-
The authentication uses a parameters-based authentication.
The authentication has the following user-defined parameters:
- ConsumerKey: Required. Specify consumer key.
- ConsumerSecret: Required. Specify consumer secret.
- TokenId: Required. Specify token identifier.
- TokenSecret: Required. Specify token secret.
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
{{= OA1a.getAuthorizationHeader( { realm: s.replaceAll(new Uri(connection.serverHost).host().split('.')[0].toUpperCase(), '-', '_'), ConsumerKey: connection.user.ConsumerKey, ConsumerSecret: connection.user.ConsumerSecret, Access: connection.user.TokenId + '&' + connection.user.TokenSecret }, request ) }}
Documentation: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_157652390285.html.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/query/v1/suiteql
.
The result is extracted from:{{=response.items}}
.
The action uses POST method.The action has the following user-defined parameters:
- Query: Required. Specify SuiteQL statement.
The following request parameters will be automatically processed:
-
Prefer:
transient
-
application/json:
{{={ q: parameters.Query } }}
- [External]
-
The external fields URL address:
/query/v1/suiteql
. The external fields list is extracted from:{{=response.items.length > 0 ? _.map(response.items[0], function(v, k) { return { name: k }; }) : []}}
.- {{=external.name}}
Template: ShortText.
- [Read] action
-
Endpoint URL address:
/query/v1/suiteql
.
The result is extracted from:{{=response.items}}
.
The action uses POST method.The action has the following user-defined parameters:
- WhereClause: Specify WHERE clause. Optional.
The following request parameters will be automatically processed:
-
Prefer:
transient
-
application/json:
{{={ q: 'SELECT ' + parameters.fields.join() + ' FROM ' + resource.external.name + (parameters.get('WhereClause') ? ' WHERE ' + parameters.WhereClause : '') } }}
Documentation: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_157909186990.html.
- [Read useless] action
-
Endpoint URL address:
/record/v1/{{=resource.external.name}}
.
The result is extracted from:{{=response.items}}
.The action has the following user-defined parameters:
- q: Specify N/Query statement. Optional.
Documentation: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1540810951.html.
- id
A key field. Template: ShortText.
- [External]
-
The external fields URL address:
/record/v1/metadata-catalog/{{=resource.external.name}}
. The external fields list is extracted from:{{=_.map( response['x-ns-filterable'].length > 0 ? response['x-ns-filterable'] : _.keys(response.properties), function(name) { return _.extend({ name: name }, response.properties[name]); } )}}
.- {{=external.name.toLowerCase()}}
Data type: {{=NetSuite.getDataType(external.type)}} ( length 255 )
The external resource list URL address: /record/v1/metadata-catalog
.
The external resource list is extracted from: {{=response.items}}
.
Based on resource template Base.
- [Read] action
-
The result is paginated.The following request parameters will be automatically processed:
-
limit:
{{=parameters.batchSize}}
-
offset:
{{=parameters.iterator}}
-
_includeUserParameters:
{{=parameters}}
-
limit:
- [Create] action
-
The action uses POST method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
application/json:
{{=item}}
-
_includeUserParameters:
- [Update] action
-
The action uses PUT method.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
application/json:
{{=item}}
-
_includeUserParameters:
- [Delete] action
-
The action uses DELETE method.
- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- DateTime
Data type: DT_DBTIMESTAMP
- Date
Data type: DT_DBDATE
Knowledge Base
What's New
- New: Introduced connection.
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.