NetSuite Rest API Setup : Building a Connected System Landscape

Believe it or not, NetSuite can’t do everything. There are some processes and lines of work better suited to more niche systems. That doesn’t, however, rule out a single, simple system architecture. This can be achieved through integrations.

The NetSuite REST API is one tool businesses can use to help achieve this.

The NetSuite API can be used to connect to third party business systems, provide real time data for analysis and streamline data entry.

If you have users logging in to multiple systems on a daily basis and entering duplicate data you might want to be looking in to API integrations in more detail.

In this article I will give you an introduction to APIs and run through a basic set up for the NetSuite REST API using Postman.

A computer connected via a network to the world. The possibilities provided by the NetSuite REST API.
Integration can be something you may need to consider during implementation planning. Make sure you read our NetSuite limitations if you are pre-implementation, as these could save a lot of money and frustration

What is an API

An API (Application Programming Interface) is a facility that enables two applications to communicate with each other and transfer data between one another.

In a NetSuite context, an API enables integration with the NetSuite system and automation of data transfer across your whole business system landscape.

The NetSuite REST API, for example, can be a powerful tool to maximize efficiency across the business, reduce manual data entry and minimize errors.

It is not, however, a simple piece of work for functional users. Setting up an API is normally left to the developers as it includes a few technical steps normally beyond the means of a regular system administrator.

Read this article and approach the set up with care if you are not used to this type of development.

What is the NetSuite REST API

There are different types of API. In NetSuite it is common to use REST API to interact with the system data.

REST is a specific set of constraints that an API must conform to. It is generally considered easier to implement than more rigid protocols such as SOAP.

If you are interested more generally in APIs and how they work, take a look at this series of articles at Red Hat.

How to Set Up a NetSuite REST API

Enable features

Navigate to Setup > Company > Enable Features. Under the SuiteCloud tab find the SuiteTalk (Web Services) section and check the box for REST Web Services.

Enabling the relevant features before setting up a NetSuite REST API.

In the Manage Authentication section ensure OAuth 2.0 is checked.

Setup the Integration Record

Enter a Name and Description for the Integration. Set the Status to Enabled.

Setting up the integration record for a NetSuite REST API integration.

For this basic setup we are not going to be using Token Based Authentication so untick the associated checkboxes.

In the OAuth 2.0 section check Authorization Code Grant and REST Web Services checkboxes.

Enter the Redirect URL from which the authorization code will be handled. This will be specific to the system you are integrating with. For this example we will use our own computer, found at https://localhost.

You can now Save the integration record.

Obtain the Client ID and Client Secret

Immediately after saving the Integration record you will notice at the bottom of the form a section called Client Credentials. In this section you will find the Client ID and Client Secret.

These are only shown when you create the Integration record so you need to write these down.

The client credentials shown at the bottom of the NetSuite integration record after saving.

Setup OAuth 2.0 Authentication

For this example we will use Postman. Postman is a popular, easy to use API building platform. Whatever tool you use for your integration, the steps here should be reasonably transferrable.

First you need to set up a new Collection in your Postman Workspace. Click the Add button for a new collection. Give the Collection a Name. In the Authorization section select OAuth 1.0.

Set the signature method as HMAC-SHA256.

Enter your Consumer Key and Consumer Secret (otherwise known as Client ID and Client Secret).

Set the Version as 1.0.

In the Realm field enter you NetSuite account number.

The above information will be used for all requests made within the Collection.

Add a New Request in your collection by clicking the three dots and selecting Add Request. Set the request type as GET.

You then need to enter the request link which is made up of the following sections (this is specific to this example).


For example, if my NetSuite account ID is 123456 and I want to to test pulling data from Sales Order id 222654, then the URL will look as follows.
Remember, your Sandbox account ID is not the same as production. The above test will only work for a production account. If you are testing in a Sandbox environment your account ID will likely be something similar to {accountID}_SB1.
The easiest way to check is to log in to your Sandbox and look at the URL you are accessing. It will begin with your Sandbox account ID.
You can learn more about all the different types of NetSuite environment here.

For building requests for this and other integrations in future, you will want to become familiar with the NetSuite Schema browser which provides detail of all records, sublists, and other objects available in NetSuite

The API Response

If all goes well, after sending the GET request for the above URL, the Body panel below will populate with the source data of the requested Sales Order.

You should also see Status 200 OK.

NetSuite REST API : Next Steps

Now you have a basic foundational understanding of setting up a NetSuite REST API you can hopefully put this in to practice.

If you are a functional NetSuite user rather than a developer, this article will hopefully be sufficient to allow you to work with a third party and complete the NetSuite portion of an integration project.

Are you considering a Salesforce integration? Take a look at our review of the integration options for these two systems here.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *