NetSuite
API actions for the NetSuite integration.
NetSuite
Connect to Oracle NetSuite ERP using Token-Based Authentication to manage customers, invoices, vendors, sales orders, and run SuiteQL queries.
Create a NetSuite customer.
Create a new customer record in NetSuite.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
company_name | string | Yes | Customer company name |
subsidiary_id | string | Yes | NetSuite subsidiary internal ID (required for OneWorld accounts) |
email | string | No | Customer email address |
phone | string | No | Customer phone number |
Response
{
"location": "/services/rest/record/v1/customer/456"
}Create a NetSuite invoice.
Create a new invoice in NetSuite with at least one line item.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | string | Yes | NetSuite internal ID of the customer to invoice |
subsidiary_id | string | Yes | NetSuite subsidiary internal ID |
item_id | string | Yes | NetSuite internal ID of the item/service for the line item |
quantity | number | No | Quantity for the line item |
rate | number | No | Unit price/rate for the line item |
tran_date | string | No | Invoice date in YYYY-MM-DD format |
Response
{
"location": "/services/rest/record/v1/invoice/789"
}Get a NetSuite customer.
Retrieve a single customer record by internal ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | string | Yes | NetSuite internal ID of the customer |
Response
{
"customer": {
"companyName": "Acme Corp",
"email": "contact@acme.com",
"entityId": "CUST-001",
"id": "123",
"phone": "555-0100"
}
}Get a NetSuite invoice.
Retrieve a single invoice record by internal ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_id | string | Yes | NetSuite internal ID of the invoice |
Response
{
"invoice": {
"entity": {
"id": "123",
"refName": "Acme Corp"
},
"id": "456",
"status": {
"id": "open",
"refName": "Open"
},
"total": 1500.0,
"tranDate": "2024-03-15",
"tranId": "INV-001"
}
}Get a NetSuite vendor.
Retrieve a single vendor record by internal ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
vendor_id | string | Yes | NetSuite internal ID of the vendor |
Response
{
"vendor": {
"companyName": "Supplier Inc",
"email": "vendor@supplier.com",
"entityId": "VEND-001",
"id": "789",
"phone": "555-0200"
}
}List NetSuite customers.
Retrieve a paginated list of customers from NetSuite.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of customers to return (1-1000) |
offset | number | No | Number of records to skip for pagination |
Response
{
"hasMore": false,
"items": [
{
"companyName": "Acme Corp",
"email": "contact@acme.com",
"entityId": "CUST-001",
"id": "123",
"phone": "555-0100"
}
],
"offset": 0,
"totalResults": 1
}List NetSuite invoices.
Retrieve a paginated list of invoices from NetSuite.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of invoices to return (1-1000) |
offset | number | No | Number of records to skip for pagination |
Response
{
"hasMore": false,
"items": [
{
"entity": {
"id": "123",
"refName": "Acme Corp"
},
"id": "456",
"status": {
"id": "open",
"refName": "Open"
},
"total": 1500.0,
"tranDate": "2024-03-15",
"tranId": "INV-001"
}
],
"offset": 0,
"totalResults": 1
}List NetSuite sales orders.
Retrieve a paginated list of sales orders from NetSuite.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of sales orders to return (1-1000) |
offset | number | No | Number of records to skip for pagination |
Response
{
"hasMore": false,
"items": [
{
"entity": {
"id": "123",
"refName": "Acme Corp"
},
"id": "321",
"status": {
"id": "pendingFulfillment",
"refName": "Pending Fulfillment"
},
"total": 2500.0,
"tranDate": "2024-03-10",
"tranId": "SO-001"
}
],
"offset": 0,
"totalResults": 1
}List NetSuite vendors.
Retrieve a paginated list of vendors from NetSuite.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of vendors to return (1-1000) |
offset | number | No | Number of records to skip for pagination |
Response
{
"hasMore": false,
"items": [
{
"companyName": "Supplier Inc",
"email": "vendor@supplier.com",
"entityId": "VEND-001",
"id": "789",
"phone": "555-0200"
}
],
"offset": 0,
"totalResults": 1
}Run a SuiteQL query.
Execute a SuiteQL query against NetSuite data. SuiteQL is a SQL-like language for querying NetSuite records. Common tables: customer, vendor, transaction (invoices, sales orders, journal entries), item, employee, account.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | SuiteQL query string. Example: SELECT id, companyname, email FROM customer WHERE isinactive = 'F' |
limit | number | No | Maximum number of rows to return (1-1000) |
Response
{
"hasMore": false,
"items": [
{
"companyname": "Acme Corp",
"email": "contact@acme.com",
"id": "123"
}
],
"offset": 0,
"totalResults": 1
}