Importing the Postman Collection
To import the Postman collection:
- Download the REST web services Postman collection of sample requests from the SuiteTalk tools download page at https://<accountID>.app.netsuite.com/app/external/integration/integrationDownloadPage.nl. To access this page, you must substitute your account ID, and the REST web services permission must be assigned to your role.
- Unzip the archive.
- Click Import in the top menu of the Postman Application, and select the NetSuite REST API Tutorial.postman_collection.json file from the requests folder of the downloaded collection.
- Click the Collections tab in the left panel of the Postman Application to see the newly imported request collection.

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.
You can use the Records Catalog to get information about all record types and fields that are available through the analytics data source. The browser includes a page for each record type with all available fields and joined record types, if applicable. For each field, you can also find whether that field is available for use in SuiteAnalytics Workbook, SuiteScript, SuiteTalk REST web services, and SuiteAnalytics Connect.
Using SuiteQL queries, you can return a maximum of 100,000 results. If you expect your queries to return more than 100,000 results, you can use SuiteAnalytics Connect with the NetSuite2.com data source.
The following example shows a SuiteQL query executed through REST web services. Note that Prefer: transient is a required header parameter.
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"
}
The following is a shortened response.
{
"links": ...,
"count": 3,
"offset": 10,
"totalResults": 53,
"items": [
{
"links": [],
"email": "test@netsuite.com",
"count": "143"
},
{
"links": [],
"email": "test2@netsuite.com",
"count": "144"
},
{
"links": [],
"email": "test3@netsuite.com",
"count": "145"
}
],
...
}
Developed Queries:
SELECT
transaction.id AS upstreamId,
customer.companyName,
customer.entitytitle,
customer.entityid,
transaction.number,
‘D/M/YYYY’ AS dateFormat,
transaction.tranDate AS invoiceDate,
transaction.dueDate AS paymentDueDate,
transaction.total AS invoiceValue,
transaction.total AS grossAmount,
transactionShippingAddress.addr1 AS shippingAddress1,
transactionShippingAddress.addr2 AS shippingAddress2,
transactionShippingAddress.city AS shipToCity,
transactionShippingAddress.state AS shipToState,
transactionShippingAddress.zip AS shipToPincode,
transactionShippingAddress.country AS shipToCountry,
transactionBillingAddress.addr1 AS billingAddress1,
transactionBillingAddress.addr2 AS billingAddress2,
transactionBillingAddress.city AS billToCity,
transactionBillingAddress.state AS billToState,
transactionBillingAddress.zip AS billToPincode,
transactionBillingAddress.country AS billToCountry,
item.itemid AS productId,
item.description AS productDescription,
unitstype.name AS productUnit,
transactionLine.rate AS productRate,
transactionLine.taxrate1 AS taxPercent,
transaction.exchangerate AS exchangeRate,
transactionLine.rateamount,
transactionLine.netamount,
transactionLine.quantity AS productQuantity,
transactionLine.memo,
contact.id AS contactId,
contact.entityid AS contactName,
contact.email AS contactEmail,
contact.mobilephone AS contactMobile,
contact.homephone AS contactLandLine,
currency.symbol AS currencyCode,
transaction.transactionnumber,
transaction.type AS type,
transaction.foreignamountunpaid AS balance,
transaction.foreignamountpaid AS paymentReceived,
transaction.foreigntotal AS billingAmount,
transaction.currency AS billingCurrencyCode,
employee.email AS collectorEmail
FROM
TRANSACTION TRANSACTION
LEFT JOIN transactionLine transactionLine ON transaction.id = transactionLine.transaction
RIGHT JOIN item item ON transactionLine.item = item.id
LEFT JOIN customer customer ON customer.id = transaction.entity
LEFT JOIN transactionBillingAddress transactionBillingAddress ON transactionBillingAddress.nkey = transaction.billingaddress
LEFT JOIN transactionShippingAddress transactionShippingAddress ON transactionShippingAddress.nkey = transaction.shippingaddress
LEFT JOIN employee employee ON transaction.employee = employee.id
LEFT JOIN unitstype unitstype ON transactionLine.units = item.unitstype
LEFT JOIN contact contact ON customer.contact = contact.id
LEFT JOIN currency currency ON transaction.currency = currency.id