NetSuite REST
NetSuite REST enables companies to manage all key business processes within a single online system.
CRITICAL v5.0 UPDATE - BREAKING CHANGES: Version 5.0 introduces significant authentication changes that require immediate action:
- Authentication Method Changed: OAuth 2.0 Authorization Grant has been replaced with OAuth 2.0 Client Credentials with JWT-based assertion
- Field Renamed: The authentication field
companyhas been renamed toaccount_idfor clarity - Certificate ID and Private Key Required: You must now provide the Certificate ID from your NetSuite M2M integration and the corresponding Private Key for JWT authentication
- Migration Required: Existing v4.0 authentications will not work with v5.0. You must create new authentication credentials and update all workflows.
See the Migration Guide below for detailed instructions on updating your workflows.
Overview
Companies use NetSuite REST for enterprise resource planning (ERP) and to manage inventory, track their financials, host e-commerce stores and maintain customer relationship management (CRM) systems. This flexible platform can be applied to a range of business applications.
PLEASE NOTE: Make sure before continuing that you are using the correct NetSuite API. We have a separate page for the NetSuite SOAP connector as there are several differences and they cannot be used interchangeably.
API Information
The Base URL used for the NetSuite REST connector is https://{account-id}.suitetalk.api.netsuite.com. More information can be found on their main API documentation (v1.0) at the NetSuite REST documentation site.
Version 5.0 Authentication: This version uses OAuth 2.0 Client Credentials with JWT-based assertion (Machine-to-Machine authentication). For setup instructions, refer to NetSuite's OAuth 2.0 Client Credentials with Certificate-Based Authentication documentation.
Authentication
Version 5.0 uses OAuth 2.0 Client Credentials with JWT-based assertion (Machine-to-Machine authentication). If you're upgrading from v4.0, see the Migration Guide below for step-by-step instructions on updating your authentication and workflows.
Migration from v4.0 to v5.0
If you're upgrading from version 4.0 to 5.0, here's what has changed:
| v4.0 Field | v5.0 Field | Change |
|---|---|---|
| Company | Account ID | ✅ Renamed - same value, clearer name |
| Consumer Key / Client Id | Client ID | ✅ Same - terminology updated |
| Consumer Secret / Client Secret | Client Secret | ✅ Same - terminology updated |
| N/A | Certificate ID | ✅ New Required - Certificate ID from NetSuite M2M integration |
| N/A | Certificate(Private Key) | ✅ New Required - Private key for JWT authentication |
What you need to do:
-
Set up M2M authentication in NetSuite
- Enable OAuth 2.0 Client Credentials with Certificate-Based Authentication
- Generate public/private key pair (see Certificate Generation Guide)
- Create M2M integration in NetSuite (see M2M Setup Guide)
-
Create new v5.0 authentication in Tray.io
- Navigate to the NetSuite connector authentication settings
- Create new authentication with v5.0
- Enter Account ID (previously called "company")
- Enter Client ID and Client Secret from your NetSuite M2M integration
- Enter the Certificate ID from your NetSuite M2M integration
- Provide your Private Key for JWT authentication
-
Update existing workflows
- Update all workflows to use the new v5.0 of the connector
- Test each workflow to ensure connectivity
- No operation changes required - inputs and outputs remain the same
Prerequisites
To use NetSuite REST web services with version 5.0, you must enable:
- REST Web Services - Allow REST API access
- OAuth 2.0 - Enable OAuth authentication
- OAuth 2.0 Client Credentials with Certificate-Based Authentication (M2M) - Required for v5.0
- SuiteAnalytics - Enable analytics features
Additionally, the integration must have the required permissions assigned. For detailed setup instructions, refer to NetSuite's OAuth 2.0 Client Credentials with Certificate-Based Authentication guide.
If you already have your features and permissions set up, please move straight to Stage 3: Creation.
Stage 1: Enable Features
This accordion guides you through the process of enabling REST Web Services, OAuth 2.0 authentication, and SuiteAnalytics for NetSuite REST API authentication integration with Tray.io.
Stage 2: Enable Permissions
This accordion guides you through the process of** setting the permissions required** for the respective features enabled in the previous section.
Stage 3: Create
This section begins and ends in the Tray.io builder so please have your workflow space set up before continuing.
Available Operations
New in v5.0: Three new operations have been added to enhance NetSuite integration capabilities:
- Get Currency Rate - Retrieve currency exchange rates for multi-currency transactions
- Get Governance Limits - Monitor API usage and concurrency limits to prevent rate limiting
- Get Item Availability - Access real-time inventory availability information
See detailed documentation for these operations below.
The examples below show one or two of the available connector operations in use. Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.
New Operations in v5.0
Get Currency Rate
Retrieve currency exchange rate information for multi-currency transactions and financial reporting.
Get Governance Limits
Monitor API usage and concurrency limits to prevent rate limiting and optimize integration performance.
Get Item Availability
Access real-time inventory availability information for items in your NetSuite account.
Notes on key operations
Find record
Create Record
IMPORTANT!: It is imperative to pay attention to the field requirements in the schema browser when using this operation. A summary of what and why is below. See the Creating a record instance API page for more details.
You must be very precise when using this operation. It is critical that you keep in mind the following points:
- All field references are correctly 'typed' - object / string / boolean, etc
- There are no missing fields
- Any field requirements match the schema
Execute SuiteQL (advanced query)
You execute SuiteQL queries by sending a POST request to the suiteql resource and specifying the query in the request body after the body parameter "q".
Check out the following links for more information:
NetSuite Sales orders
There are 3 main points to be aware of when creating a NetSuite Sales order:
- Your associated NetSuite Role has the correct permissions.
- "NetSuite Role" -> Permissions -> Transactions: Please make sure the following 3 permission sets are added and have
Level: Fullfor each as a general rule. - Sales order
- Sales order approval
- Find Transaction
- "NetSuite Role" -> Permissions -> Lists: Please make sure the following permission set is added and has
Level: Fullas a general rule. - Items
- "NetSuite Role" -> Permissions -> Transactions: Please make sure the following 3 permission sets are added and have
- It is possible to 'use' your item within a sales order.
- For example you may be able to create a purchase order for an item but not be able to sell it. You may get unusual error messages as a result.
- The data being sent to NetSuite is being sent in the format it requires.
- Please see the accordion step below for a clear demonstration.
Renaming fields
Any fields customers may have renamed within their NetSuite instance will still display as their native name within any of the dropdown options available inside the Tray.io properties panel. The NetSuite UI may display your updated field name but what it is referring to in the NetSuite database will not have. Look for your endpoint in the REST API Browser and under the I****nsert record -> Request body select the clickable 'endpoint' link to see a list of Fields. This will display the native name for all the field references.
Using the Raw HTTP Request ('Universal Operation')
As of version 2.0 you can effectively create your own operations. This is a very powerful feature which you can use if you need an endpoint that is not currently provided.
Please the example below for a full walkthrough.
NetSuite REST templates
Please note that we have the following NetSuite REST templates available. These will give you pre-configured best practice ways of working with NetSuite REST and integrating it with other connectors.
PLEASE NOTE: To help avoid the most common user errors we strongly advise you read through the Authentication, Important notes sections, etc, before applying any templates. Every service is unique and each has its own nuances you need to be aware of before proceeding.
Further Info (REST & SOAP)
The following sections are mainly relevant to SOAP users however there is some cross over for our REST customers. Please see the NetSuite SOAP: Further Info section for references pertaining to: