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”

}

Leave a comment

Your email address will not be published. Required fields are marked *