An API client library for NetSuite RESTlets.
npm install netsuite-restlet-api!CI
A JavaScript API client library for NetSuite RESTlets.
``bash`
npm i netsuite-restlet-api
The package is available to be consumed via both CommonJS and ESM modules. It exposes a single class named NetSuiteClient where a configuration has to be passed. Then you can invoke get method on the resulting object to fetch data from NetSuite restlet.
`js
import { NetSuiteClient } from 'netsuite-restlet-api'
const client = new NetSuiteClient({
certificateId: 'your-certificate-id',
clientId: 'your-client-id',
tokenUrl: 'https://your-token-url',
privateKey: 'your-private-key'
})
const data = await client.get('https://your-restlet-url')
``
