NetSuite icon

NetSuite

NetSuite REST API

Raw Request

AI-generated

Overview

The node performs raw HTTP requests to the NetSuite REST API, allowing users to specify the request type (Record, SuiteQL, Workbook, Dataset), HTTP method, request path, and optional request body. It supports concurrency control and can return either the full HTTP response or just the response body. This node is useful for advanced users who need to make custom or less common API calls to NetSuite that are not covered by predefined operations, such as querying specific endpoints or executing SuiteQL queries directly.

Use Case Examples

  1. Making a GET request to retrieve sales order records from NetSuite by specifying the path and request type.
  2. Executing a POST request with a JSON body to create or update records in NetSuite.
  3. Running a SuiteQL query by sending a POST request to the SuiteQL endpoint with the query in the body.

Properties

Name Meaning
Request Type Specifies the type of NetSuite request to make, such as Record, SuiteQL, Workbook, or Dataset.
HTTP Method The HTTP method to use for the request, e.g., GET, POST, PATCH, DELETE.
Path The API endpoint path to send the request to, relative to the NetSuite REST API base URL.
Body Optional request body as a JSON string or object, used for methods like POST or PATCH.
Options Additional options for the request, including concurrency control and whether to return the full HTTP response.

Output

JSON

  • statusCode - HTTP status code of the response (only if full response option is enabled).
  • headers - HTTP response headers (only if full response option is enabled).
  • body - The main response body from the NetSuite API, containing the requested data or error information.

Dependencies

  • Requires NetSuite API credentials including account ID, consumer key, consumer secret, token key, and token secret for authentication.

Troubleshooting

  • Ensure the API path is correct and relative to the NetSuite REST API base URL; full URLs are normalized to relative paths.
  • If the request body is provided as a string, it must be valid JSON; otherwise, the node attempts to parse it and may throw an error if invalid.
  • Concurrency option should be set carefully to avoid hitting NetSuite API rate limits or causing request failures.
  • If the node throws errors about unsupported operations, verify that the operation parameter is set to 'rawRequest'.
  • Check that the credentials are correctly configured and have sufficient permissions to perform the requested API calls.

Discussion