Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spojit.com/llms.txt

Use this file to discover all available pages before exploring further.

The NetSuite connector lets your workflows read and write NetSuite records through the SuiteTalk REST Web Services API. It exposes curated tools for the most common records (customers, sales orders, invoices, items, item fulfillments), a powerful run-suiteql tool for SQL-like reads, and a raw-request passthrough for any other REST endpoint.
Spojit authenticates to NetSuite using Token-Based Authentication (TBA). Per Oracle’s release notes, no new TBA authorizations can be created from NetSuite 2027.1 onward — existing credentials continue to work. OAuth 2.0 support is coming as an additional connection option.

Finding record types, fields, and SuiteQL tables

NetSuite accounts are heavily customizable, so record and field names vary between accounts. Use these Oracle-maintained references when writing queries or record payloads: You can also call list-record-types and get-record-metadata from a workflow to discover what the current NetSuite account exposes.

Connection setup

1

Enable TBA in NetSuite

In NetSuite go to Setup → Company → Enable Features → SuiteCloud. Under Manage Authentication, enable Token-Based Authentication and REST Web Services.
2

Create an integration record

Go to Setup → Integration → Manage Integrations → New. Give it a name (e.g. “Spojit”), enable Token-Based Authentication, leave TBA: Authorization Flow disabled, and save. Copy the Consumer Key and Consumer Secret that appear at the bottom of the page — they are shown only once.
3

Create an access token

Go to Setup → Users/Roles → Access Tokens → New. Select your integration, a user, and a role with the necessary permissions (commonly SuiteAnalytics Workbook, REST Web Services, and record-type-specific permissions). Save and copy the Token ID and Token Secret — again shown only once.
4

Note your Account ID

Find your account ID at Setup → Company → Company Information. Sandboxes have a _SB suffix (e.g. 1234567_SB1).
5

Add the connection in Spojit

Go to Connections in Spojit, click Add Connection, select NetSuite, and enter the five values: Account ID, Consumer Key, Consumer Secret, Token ID, Token Secret.

Tools

Utility

Fetches the REST metadata catalog root and returns success if credentials are valid.No parameters required.Example response:
{
  "success": true,
  "status": 200,
  "data": {
    "items": [
      { "name": "customer", "links": [{ "rel": "self", "href": ".../record/v1/metadata-catalog/customer" }] }
    ]
  }
}
query
string
required
SuiteQL query. Example: SELECT id, companyname FROM customer WHERE isinactive = 'F' FETCH FIRST 10 ROWS ONLY.
limit
number
Max rows per page (default 100, max 1000).
offset
number
Pagination offset.
Example request:
{
  "query": "SELECT id, tranid, trandate, entity FROM transaction WHERE type = 'SalesOrd' AND trandate >= '01/01/2025' FETCH FIRST 5 ROWS ONLY"
}
Example response:
{
  "success": true,
  "status": 200,
  "data": {
    "links": [{ "rel": "self", "href": ".../query/v1/suiteql" }],
    "count": 3,
    "hasMore": false,
    "items": [
      { "id": "4421", "tranid": "SO4421", "trandate": "02/14/2025", "entity": "128" },
      { "id": "4422", "tranid": "SO4422", "trandate": "02/14/2025", "entity": "129" },
      { "id": "4423", "tranid": "SO4423", "trandate": "02/15/2025", "entity": "130" }
    ],
    "offset": 0,
    "totalResults": 3
  }
}

Metadata / discovery

Returns the REST metadata catalog root — every record type the account exposes via REST.No parameters required.
recordType
string
required
Record type name, e.g. customer, salesOrder, invoice.
Example request:
{ "recordType": "customer" }
The response is a JSON-Schema document listing every field, sublist, and enumeration — use it to discover what payload shape the record expects.

Customers

q
string
SuiteTalk query filter (e.g. companyName START_WITH 'Acme').
limit
number
Page size (default 100, max 1000).
offset
number
Pagination offset.
Example request:
{ "q": "isInactive IS false", "limit": 5 }
Example response:
{
  "success": true,
  "status": 200,
  "data": {
    "links": [{ "rel": "self", "href": ".../customer" }],
    "count": 5,
    "hasMore": true,
    "totalResults": 342,
    "items": [
      { "links": [{ "rel": "self", "href": ".../customer/128" }], "id": "128" },
      { "links": [{ "rel": "self", "href": ".../customer/129" }], "id": "129" }
    ]
  }
}
id
string
required
Customer internal ID.
expandSubResources
boolean
Inline sublists (addresses, contacts).
Example response:
{
  "success": true,
  "status": 200,
  "data": {
    "id": "128",
    "companyName": "Acme Inc",
    "email": "ap@acme.example",
    "phone": "+1-415-555-0123",
    "isPerson": false,
    "isInactive": false,
    "subsidiary": { "id": "1", "refName": "Parent Company" },
    "terms": { "id": "4", "refName": "Net 30" }
  }
}
body
object
required
Customer payload. Common fields: companyName, email, phone, subsidiary, isPerson, firstName, lastName.
Example request:
{
  "body": {
    "companyName": "Globex Corporation",
    "email": "contact@globex.example",
    "subsidiary": { "id": "1" },
    "isPerson": false
  }
}
Example response:
{ "success": true, "status": 204, "data": null }
The new customer’s internal ID is returned in the Location response header (e.g. /record/v1/customer/512).
id
string
required
Customer internal ID.
body
object
required
Fields to update.
Example request:
{ "id": "128", "body": { "phone": "+1-415-555-9999" } }

Sales orders

q
string
SuiteTalk filter (e.g. tranDate ON_OR_AFTER '01/01/2025').
limit
number
Page size.
offset
number
Pagination offset.
id
string
required
Sales order internal ID.
expandSubResources
boolean
Inline line items.
Example response (truncated):
{
  "success": true,
  "status": 200,
  "data": {
    "id": "4421",
    "tranId": "SO4421",
    "tranDate": "2025-02-14",
    "entity": { "id": "128", "refName": "Acme Inc" },
    "status": { "id": "B", "refName": "Pending Fulfillment" },
    "total": 1245.50,
    "item": {
      "items": [
        { "line": 1, "item": { "id": "301", "refName": "Widget" }, "quantity": 10, "rate": 120.00, "amount": 1200.00 }
      ]
    }
  }
}

Invoices

q
string
SuiteTalk filter (e.g. status IS "Invoice:A" for open invoices).
limit
number
Page size.
offset
number
Pagination offset.
id
string
required
Invoice internal ID.
expandSubResources
boolean
Inline invoice lines.

Items

NetSuite has several item subtypes (inventoryItem, assemblyItem, nonInventorySaleItem, serviceSaleItem, …). The tools below default to inventoryItem. To list across all subtypes, use run-suiteql with SELECT id, itemid, itemtype FROM item.
recordType
string
default:"inventoryItem"
Item record type.
q
string
SuiteTalk filter.
limit
number
Page size.
offset
number
Pagination offset.
id
string
required
Item internal ID.
recordType
string
default:"inventoryItem"
Item subtype.

Item fulfillments

Item fulfillment records in NetSuite are normally created by transforming a sales order, not by a bare POST /record/v1/itemFulfillment. The create-item-fulfillment tool wraps the transform endpoint so the LLM doesn’t need to know the URL convention.
q
string
SuiteTalk filter (e.g. createdFrom IS 4421).
limit
number
Page size.
offset
number
Pagination offset.
id
string
required
Item fulfillment internal ID.
expandSubResources
boolean
Inline fulfilled line items.
salesOrderId
string
required
Internal ID of the sales order being fulfilled.
body
object
required
Fulfillment payload. Set itemReceive: true and quantity on each line you want to ship.
Example request:
{
  "salesOrderId": "4421",
  "body": {
    "shipStatus": "C",
    "item": {
      "items": [
        { "line": 1, "itemReceive": true, "quantity": 10 }
      ]
    }
  }
}

Generic record CRUD

Use these when the record type isn’t covered by a domain-specific tool (e.g. purchaseOrder, vendorBill, journalEntry, employee).
recordType
string
required
Record type (e.g. purchaseOrder).
id
string
required
Internal ID.
expandSubResources
boolean
Inline sublists.
fields
string
Comma-separated list of fields to return.
recordType
string
required
Record type.
q
string
SuiteTalk filter.
limit
number
Page size.
offset
number
Pagination offset.
recordType
string
required
Record type.
body
object
required
Record payload.
recordType
string
required
Record type.
id
string
required
Internal ID.
body
object
required
Fields to update.
recordType
string
required
Record type.
id
string
required
Internal ID.
recordType
string
required
Record type.
externalId
string
required
External ID.
body
object
required
Record payload.

Sublists

recordType
string
required
Parent record type.
id
string
required
Parent record ID.
sublistId
string
required
Sublist name (e.g. item, addressBook).
recordType
string
required
Parent record type.
id
string
required
Parent record ID.
sublistId
string
required
Sublist name.
body
object
required
Line item payload.

Advanced

Execute an arbitrary signed request against the NetSuite REST API. TBA signing is applied automatically. path is relative to /services/rest.
method
string
required
HTTP method: GET, POST, PUT, PATCH, or DELETE.
path
string
required
Path relative to /services/rest (e.g. /record/v1/vendorBill).
body
object
Request body.
queryParams
object
Query parameters as a key/value map.
headers
object
Extra headers.
Example request:
{
  "method": "GET",
  "path": "/record/v1/purchaseOrder",
  "queryParams": { "limit": "5", "q": "status IS \"PurchOrd:B\"" }
}