Executing SuiteQL Queries Through REST Web Services

SuiteQL is a query language based on the SQL database query language. SuiteQL provides advanced dynamic query capabilities that can be used to access NetSuite records.

You can execute SuiteQL queries through REST web services by sending a POST request to the suiteql resource, and specifying the query in the request body after the body parameter q.

In the request URL you can also specify the number of results you want to return in a single page and the page offset.

Using SuiteQL queries, you can return a maximum of 100,000 results.

The following example shows a SuiteQL query executed through REST web services. Note that Prefer: transient is a required header parameter.

Sample Request:

POST https://demo123.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=10&offset=10
Prefer: transient
{
  "q": "SELECT email, COUNT(*) as count FROM transaction GROUP BY email"
}

Leave a comment

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