Recently, our team had the opportunity to integrate with NetSuite which is а unified business management suite, encompassing ERP/Financials, CRM and ecommerce. This integration experience allowed us to enhance Aurinko API with a new connector and also provided us with valuable insights into NetSuite API. In this blog post, we will share our learnings.

What We Learned about NetSuite API:

  1. Authentication and Authorization: OAuth 2.0 authentication is supported by NetSuite, and developers need to enable this feature in their instance and then register their app (create client Id & Secret):

    Aurinko users: You need to upload your application’s client Id & Secret to your Aurinko app to be able to use Aurinko’s unified auth flow. Read this blog post about storing access tokens in Aurinko.

  2. “Green” REST API: The NetSuite REST API aims to cover all aspects of data management in the platform, but it’s not there yet. Here are our observations:

    • We found that the default API lacks comprehensive coverage of data management on the platform. For example, it does not provide endpoints to work with opportunities. As a result, we opted to utilize API’s beta version for opportunities. However, not all CRM objects are supported in the beta version either (for example there is no way to create or update opportunity line items).
    • Specific permissions or access levels may be necessary for different endpoints, so you will most probably need NetSuite support, i.e. allow beta API access, configure endpoint permissions.
    • When receiving a collection, you only get record ID and a link for loading more information. In order to manipulate the full dataset, it is necessary to make one or more requests for additional information (get by id).
    • An additional request is needed to obtain details of a created/updated record as only an http status and id is returned in response.

Collection

{
  "links": [
    {
      "rel": "next",
      "href": "https://inst.suitetalk.api.netsuite.com/services/rest/record/v1/contact?limit=10&offset=10"
    },
    {
      "rel": "last",
      "href": "https://inst.suitetalk.api.netsuite.com/services/rest/record/v1/contact?limit=10&offset=9990"
    },
    {
      "rel": "self",
      "href": "https://inst.suitetalk.api.netsuite.com/services/rest/record/v1/contact?limit=10"
    }
  ],
  "count": 10,
  "hasMore": true,
  "items": [
    {
      "links": [
        {
          "rel": "self",
          "href": "https://inst.suitetalk.api.netsuite.com/services/rest/record/v1/contact/51569"
        }
      ],
      "id": "51569"
    },
    {
      "links": [
        {
          "rel": "self",
          "href": "https://inst.suitetalk.api.netsuite.com/services/rest/record/v1/contact/59089"
        }
      ],
      "id": "59089"
    },
    ...
  ],
  "offset": 0,
  "totalResults": 10000
}

HTTP Response after create and update

HTTP/1.1 204 No Content
...
Location: https://inst.suitetalk.api.netsuite.com/services/rest/record/v1/contact/62451
  1. Search Capabilities: There are numerous query operators that are useful for searching through a collection of records (see Record Collection Filtering). These operators include equals, contains, comparison operations, and so on. It is worth noting that many of these operators are linked to specific field types and can only be used with them.

  2. Sync/Deltas API: The API supports queries to filter by last modification date, which was the solution in our case for loading updates incrementally. We could not find methods to receive deleted records.

  3. Metadata API: Metadata API is available in two formats: Open API and object properties but neither of them is 100% complete or accurate. In certain cases, you need to combine responses from both sources in order to obtain complete information about entities.

  4. Documentation and Resources: The NetSuite documentation is covers all aspects of the API, such as endpoint descriptions and object details. However, some inaccuracies are present like in the example below (account vs. list of records):

Conclusion

The NetSuite API presents a remarkable opportunity for businesses to seamlessly integrate their operations, enabling data-driven insights, streamlined processes, and enhanced customer experiences.

We have extended Aurinko to support NetSuite API to make it a connector for our CRM Contact sync logic, so NetSuite contacts could sync to Salesforce, Hubspot, SugarCRM, and other CRMs. Developers can also access NetSuite contacts through our Unified Contacts API or define their own unified data models using our Virtualized API.