Documentation for REST API

Prerequisites:

IMPORTANT: To use REST web services, the relevant features must be enabled in your account. Additionally, the REST web services user must have the required permissions assigned to the user’s role.

To enable REST Web Services and the SuiteAnalytics Workbook features, head over to the 'Setup' tab, then 'Company' and in the 'Setup Tasks' category click on 'Enable Features'.

netsuite-auth-step-pre-1

Now select the 'SuiteCloud' tab, scroll down to the 'Manage Authentication' section and check the 'TOKEN-BASED AUTHENTICATION' option. To use the feature, you must accept the SuiteCloud Terms of Service.

netsuite-auth-step-pre-2
netsuite-auth-step-pre-3

On the same 'Enable Features' page, select the 'Analytics' tab and scroll down to the 'SuiteAnalytics Workbook' section and check the 'SUITEANALYTICS WORKBOOK' option.

netsuite-auth-step-pre-5

Now click 'Save' to enable your chosen features.

To enable permissions for those features, head over to the 'Setup' tab, then 'Users/Roles' and in the 'User Management' category click on 'Manage Roles'.

Either create a new role, or edit an existing role that you want to enable permissions for.

On the 'Role' page select the 'Permissions' tab and then the 'Setup' sub-tab. Add permissions for 'Log in using Access Tokens' and 'REST Web Services'.

netsuite-auth-step-pre-6

Now select the 'Reports' sub-tab and add permission for 'SuiteAnalytics Workbook' to the role.

netsuite-auth-step-pre-7

Now click 'save' to enable those permissions on the role.

You have now completed the prerequisite steps to creating an authentication for a user.

The following credentials are needed to set up the integration between Nectar and NetSuite:

'Account ID'

'Consumer key'

'Consumer secret'

'Token ID'

'Token secret'

Step 1 - Login to NetSuite

In order to get these, first head to your NetSuite login page and login with your email and password. Note: this will probably be a task for someone on your IT team.

netsuite-auth-step-1

Step 2 - Find Account ID

After logging in, head over to the 'Setup' tab, then 'Company' and in the 'Setup Tasks' category click on Company Information.

netsuite-auth-step-2

This will take you to another page where you can find your 'Account ID'.

netsuite-auth-step-3

Step 3 - Create an Integration Record

To get your 'Consumer Key' and 'Consumer Secret' you need to create an integration record. For this, go back to the main dashboard page of the NetSuite application and click the 'Setup' tab in the menu, then 'Integration' and in the 'Integration Management' category click on 'Manage Integrations'.

netsuite-auth-step-4

On this page click on the 'New' button and fill in the information required. Make sure that you have enabled 'Token-Based Authentication' by checking the box. Click 'Save' and you will be redirected to a page where you will find your 'Consumer Key' and 'Consumer Secret'. Note that this information will only be shown once so please make a secure note of it.

netsuite-auth-step-5

Step 4 - Generate a user 'Token ID' and a 'Token Secret'

The next step is to generate a user 'Token ID' and a 'Token Secret'. On the main dashboard, access the 'Setup' menu and navigate through 'Users/Roles' and 'User Management' and click on the 'Access Tokens' sub-menu item.

netsuite-auth-step-5

On the Access Tokens page, click 'New Access Token'.

On the Access Token page, select the 'Application Name' (of the integration record that you created earlier), select the 'User' and select the 'Role'.

netsuite-auth-step-5

The Token Name is already populated by default with a concatenation of Application Name, User, and Role. Enter your own name for this token, if desired. Click 'Save'.

The confirmation page displays the Token ID and Token Secret. Make a secure note of these values.

netsuite-auth-step-5
Warning: For security reasons, the only time the Token ID and Token Secret values are displayed is on the confirmation page. After you leave this page, these values cannot be retrieved from the system. If you lose or forget these credentials, you will need to create a new token and obtain new values. Treat these values as you would a password. Never share these credentials with unauthorized individuals and never send them by email.

Step 5 - Securely pass these values to Nectar

The final step on your end to getting the integration set up is to securely pass all of the above values over to Nectar. If they haven't already, the Nectar team will provide you with a safe method of doing this.

Did this answer your question?