REST Query to fetch the transactions created between two time intervals

POST https://{ACCOUNT_ID}.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=100&offset=0 { “q” : “SELECT BUILTIN_RESULT.TYPE_STRING(TRANSACTION.id) AS internalid FROM TRANSACTION, transactionLine WHERE TRANSACTION.ID = transactionLine.TRANSACTION AND ((transactionLine.subsidiary IN (‘x’) AND TRANSACTION.TYPE IN (‘<transactiontype> ex:PurchOrd‘) AND TRANSACTION.createddate BETWEEN TO_TIMESTAMP(‘2024-05-15 23:00:00’, ‘YYYY-MM-DD HH24:MI:SS’) AND TO_TIMESTAMP(‘2024-05-16 23:00:00’, ‘YYYY-MM-DD HH24:MI:SS’) AND transactionLine.mainline = ‘T’)) ORDER BY TRANSACTION.id DESC” }

Where to find the response of a successful REST call to NetSuite

REST web services help to directly create, fetch, update and delete most of the NetSuite records. This mainly supports POST, GET, PUT and DELETE requests. While sending REST API responses, the successful execution results in returning a 204 code, which sometimes is treated as a failure as no response is returned in the body from… Continue reading Where to find the response of a successful REST call to NetSuite

Oath 2.0 Machine to Machine flow not working with Code Grant flow checkbox unchecked and client credentials checked

OAuth 2.0 access is based on the authorization code grant flow for the generation of access tokens and refresh tokens, or the client credentials flow. The client credentials flow is a machine-to-machine flow for the generation of access tokens. If we only require client credentials, still the authorization code grant flow should be checked and… Continue reading Oath 2.0 Machine to Machine flow not working with Code Grant flow checkbox unchecked and client credentials checked

Suitescript Function to fetch web-view links of files from a Shared Drive on the Google Drive storage using the file name

Suitescript function for fetching the web-view link of a file in a Shared Drive inside Google Drive using the file name. Please note that this only works when filenames are unique. /**         * Function to get Google Drive link for a file         * @param {string} accessToken Access token… Continue reading Suitescript Function to fetch web-view links of files from a Shared Drive on the Google Drive storage using the file name

How to create a Transfer Order in NetSuite through REST API call

We can create a Transfer Order in NetSuite through REST API request using the values: subsidiary, location, transferLocation, department, and item details. We can also provide a memo value if needed. Request Type: HTTPS POST Request URL: <https://<NetSuite> App Domain>.suitetalk.api.netsuite.com/services/rest/record/v1/transferOrder Headers: Content-Type: application/json Body: { “subsidiary”: { “id”: “<SUBSIDIARY INTERNAL ID>” }, “location”: { “id”:… Continue reading How to create a Transfer Order in NetSuite through REST API call

How to get Transfer Order details through REST API

We can get details of a transfer order in NetSuite through a REST API call: Request Type: HTTPS GET Request URL: <NetSuite App Domain>.suitetalk.api.netsuite.com/services/rest/record/v1/transferOrder/<Transfer Order Internal ID> Use parameter ‘?expandSubResources=true’ with the request to view all the related record details in the response. Make sure to add proper authentication values as well e.g: Request: GET… Continue reading How to get Transfer Order details through REST API

NetSuite Industry 4.0 Integration: Navigating the Next Industrial Revolution with Smart Manufacturing and Automation

Introduction: Industry 4.0 represents a seismic shift in manufacturing, characterized by the integration of digital technologies to create “smart factories” and enable automation at every stage of the production process. NetSuite, a leading provider of cloud-based ERP solutions, is at the forefront of this transformation, empowering manufacturers to embrace Industry 4.0 principles and unlock new… Continue reading NetSuite Industry 4.0 Integration: Navigating the Next Industrial Revolution with Smart Manufacturing and Automation

REST Query to fetch the transactions created in the last n hours

POST https://{ACCOUNT_ID}.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=100&offset=0 { “q” : “SELECT BUILTIN_RESULT.TYPE_STRING(TRANSACTION.id) AS internalid FROM TRANSACTION, transactionLine WHERE TRANSACTION.ID = transactionLine.TRANSACTION AND ((transactionLine.subsidiary IN (‘x’) AND TRANSACTION.TYPE IN (‘<transactiontype> ex:PurchOrd‘) AND TRANSACTION.createddate > BUILTIN.RELATIVE_RANGES(‘hago<n>’, ‘END’, ‘DATETIME_AS_DATE’) AND transactionLine.mainline = ‘T’)) ORDER BY TRANSACTION.id DESC” }