> For the complete documentation index, see [llms.txt](https://docs.pandium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pandium.com/connectors/connectors-101/netsuite.md).

# Netsuite

Set up the NetSuite connector in Pandium using consumer key and secret so tenants can authenticate securely and sync financial data, CRM records, inventory, and order information.

## **Connector Overview**

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2Fgit-blob-375666aaecd16d3009c0ec0fc3681ab190dc94d1%2Fnetsuite-logo.jpeg?alt=media" alt="" width="377"><figcaption></figcaption></figure>

NetSuite is a cloud-based enterprise resource planning (ERP) system that offers financial management, CRM, eCommerce, and supply chain management solutions.

## **Authentication Type**

Oauth1

## **Webhook Supported**

No

## **Secrets**

* PAN\_SEC\_NETSUITE\_OAUTH\_TOKEN
* PAN\_SEC\_NETSUITE\_COMPANY\_ID
* PAN\_SEC\_NETSUITE\_CONSUMER\_SECRET
* PAN\_SEC\_NETSUITE\_OAUTH\_TOKEN\_SECRET
* PAN\_SEC\_NETSUITE\_CONSUMER\_KEY

## **API Client Supported**

No

## **Requirements for Provisioning**

No provisioning is required for this connector.

## **How to Connect Your Integration**

After creating a tenant, connect NetSuite with the following:

* Account ID (for example `1234567` or `1234567-sb1` for a sandbox)
* Consumer Key
* Consumer Secret

## **Using the Proxy API**

You can call NetSuite on behalf of a connected tenant through the [proxy endpoint](/reference/pandium-api.md#proxy-endpoints). Pandium signs each request with the tenant's NetSuite Token-Based Authentication credentials (OAuth 1.0, HMAC-SHA256), so you never handle the consumer key, token, or signature yourself. Send the NetSuite URL, method, optional query params and headers, and a body. Pandium adds the `Authorization` header and forwards the call.

Use the `{PAN_SEC_NETSUITE_COMPANY_ID}` placeholder in `target_url`. It expands to the tenant's NetSuite account id (for example `1234567` or `1234567-sb1`), so the same request works for any tenant.

### SuiteQL query

```bash
curl --location --request POST 'https://api.pandium.io/v2/tenants/<tenant_id>/connectors/netsuite/call' \
  --header 'X-API-KEY: <pandium api key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "target_url": "https://{PAN_SEC_NETSUITE_COMPANY_ID}.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql",
    "method": "POST",
    "headers": { "Prefer": "transient" },
    "query_params": { "limit": 10, "offset": 0 },
    "body": { "q": "SELECT id, name FROM subsidiary" }
  }'
```

NetSuite's response is returned under `data.results.output`:

```json
{
  "data": {
    "results": {
      "output": {
        "links": [ { "rel": "self", "href": "https://1234567.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=10&offset=0" } ],
        "count": 1,
        "hasMore": false,
        "offset": 0,
        "totalResults": 1,
        "items": [ { "links": [], "id": "1", "name": "Parent Company" } ]
      }
    }
  }
}
```

### Fetch a record

```bash
curl --location --request POST 'https://api.pandium.io/v2/tenants/<tenant_id>/connectors/netsuite/call' \
  --header 'X-API-KEY: <pandium api key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "target_url": "https://{PAN_SEC_NETSUITE_COMPANY_ID}.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder/12345",
    "method": "GET",
    "query_params": { "expandSubResources": "true" }
  }'
```

### Notes

* `method` is the method sent to NetSuite. The request to Pandium is always `POST`.
* `query_params` are signed and appended to the URL. Put them there rather than in `target_url`.
* `headers` are passed through as-is. Any `Authorization` header you send is replaced with Pandium's signed one.
* NetSuite errors come back with NetSuite's status code and error body under `detail`. A `401` from NetSuite means the tenant's token is invalid or has been revoked; reconnect the tenant.
* RESTlets work the same way. Use `https://{PAN_SEC_NETSUITE_COMPANY_ID}.restlets.api.netsuite.com/app/site/hosting/restlet.nl` as `target_url` with `script` and `deploy` in `query_params`.

## **API Resources**

For more information on how to utilize the Netsuite API, feel free to reference the following [documentation](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_157373386674.html).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pandium.com/connectors/connectors-101/netsuite.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
