The API (Application Programming Interface) provides automated communication between connected systems.
To gather the credentials for NetSuite Token-based Authentication, follow these required steps in order:
When these steps are complete, you will have gathered the following required credentials:
1: Create an Integration Record
The Integration Record identifies the application in NetSuite’s system. Follow these steps to create the required Integration Record.
- In NetSuite, go to the Integrations page, or perform a global search for page:integrations.
- Create an Integration Record if none exists.
- After you create the record, retain the displayed Consumer Key and Consumer Secret.
- If the Integration Record already exists, but it doesn't have a Consumer Key and Consumer Secret: edit the Integration Record, then click Reset Credentials, and set them to:
- Name: Your-Application-Name
- Authentication: Token-Based Authentication
- State: Enabled
2: Enable Token-based Authentication
- In NetSuite, go to Setup > Company > Setup Tasks > Enable Features > SuiteCloud > Manage Authentication.
- Make sure Token Based Authentication is enabled.
- Click Save.
3: Create a Token Role
The administrator does not have token permissions by default. If you do not create a token role and assign it to your administrator, you will get a Login access has been disabled for this role error when creating a token.
- In NetSuite, perform a global search for page:role, then choose New Role.
- Click Permissions > Setup.
- Add the following permissions:
- User Access Token: Full
- Access Token Management: Full
- Web Services: Full
4: Add Token Management Permissions
- In NetSuite, perform a global search for page:employees.
- Edit your employee record.
- Go to Access > Roles, and add the token auth role you just created.
5: Create Access Tokens
- Perform a global search for page:tokens.
- Click New Access Token.
- Select the application and role you created earlier, then click Save.
- Retain the Token ID and Token secret.
You can also view a video guide of the above steps:
6: Account ID
- In NetSuite Admin, click Setup > Integration > Web Service Preferences.
- Retain the Account ID displayed under the Account ID heading.
7: Grant full permission to the Token Role
Next, grant FULL permission to the role for Sales Order, Item Fulfillment, and Purchase Order:
- Go to Setup > Permissions > Transactions.
- Enter FULL level permissions for Sales Order, Purchase Order, Item Fulfillment, Fulfill Orders and Find Transaction.
8: Gather NetSuite Location ID (optional)
The Location ID is an optional parameter which is only used when Multi-Location Inventory feature is enabled.
There should be a single location to represent inventory in the third-party fulfillment center.
- From NetSuite Admin, click Setup > Company > Locations.
- Click View next to the location.
- Retain the numerical Location ID, displayed under the heading Internal ID.
Next: Enable API Access