Sales Order API
Create, read, update, and delete sales orders using the NetSuite REST API.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /record/v1/salesOrder | List all sales orders |
GET | /record/v1/salesOrder/{id} | Get specific sales order |
POST | /record/v1/salesOrder | Create new sales order |
PATCH | /record/v1/salesOrder/{id} | Update sales order |
DELETE | /record/v1/salesOrder/{id} | Delete sales order |
Key Fields
Header Fields
| Field | Type | Description | Required |
|---|---|---|---|
id | string | Internal ID (read-only) | - |
tranId | string | Transaction number | Auto-generated |
entity | object | Customer reference | Yes |
tranDate | string | Transaction date (ISO 8601) | Yes |
dueDate | string | Due date | No |
orderStatus | object | Order status | Read-only |
subsidiary | object | Subsidiary | Yes (OneWorld) |
location | object | Location | No |
department | object | Department | No |
class | object | Classification | No |
Financial Fields
| Field | Type | Description |
|-------|------|-------------|----------|
| currency | object | Transaction currency | Yes |
| exchangeRate | number | Exchange rate | Auto-calculated |
| subTotal | number | Subtotal (read-only) | - |
| taxTotal | number | Total tax (read-only) | - |
| total | number | Grand total (read-only) | - |
| terms | object | Payment terms | No |
Shipping & Billing
| Field | Type | Description |
|---|---|---|
shipDate | string | Ship date |
shipMethod | object | Shipping method |
shippingCost | number | Shipping cost |
handlingCost | number | Handling cost |
billAddr1 | string | Billing address line 1 |
billCity | string | Billing city |
billState | string | Billing state |
billZip | string | Billing ZIP |
billCountry | object | Billing country |
shipAddr1 | string | Shipping address line 1 |
shipCity | string | Shipping city |
shipState | string | Shipping state |
shipZip | string | Shipping ZIP |
shipCountry | object | Shipping country |
Other Fields
| Field | Type | Description |
|---|---|---|
salesRep | object | Sales representative |
memo | string | Memo/notes |
message | object | Message to customer |
otherRefNum | string | PO# / Reference number |
Sublists
| Field | Type | Description |
|---|---|---|
item | collection | Line items |
Example: Create Sales Order
POST /record/v1/salesOrder
Content-Type: application/json
{
"entity": {
"id": "456"
},
"tranDate": "2025-12-25",
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"terms": {
"id": "2"
},
"salesRep": {
"id": "123"
},
"otherRefNum": "PO-12345",
"memo": "Rush order - ship ASAP",
"item": {
"items": [
{
"item": {
"id": "789"
},
"quantity": 10,
"rate": 99.99,
"amount": 999.90,
"taxCode": {
"id": "5"
}
},
{
"item": {
"id": "790"
},
"quantity": 5,
"rate": 149.99,
"amount": 749.95
}
]
},
"shippingCost": 25.00
}
Response
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder/1001"
}
],
"id": "1001",
"refName": "Sales Order #SO-1001",
"tranId": "SO-1001",
"entity": {
"id": "456",
"refName": "Acme Corporation"
},
"tranDate": "2025-12-25",
"status": {
"id": "PENDING_APPROVAL",
"refName": "Pending Approval"
},
"subTotal": 1749.85,
"taxTotal": 139.99,
"shippingCost": 25.00,
"total": 1914.84
}
Example: Update Sales Order
PATCH /record/v1/salesOrder/1001
Content-Type: application/json
{
"memo": "Updated: Customer requested express shipping",
"shipMethod": {
"id": "123"
},
"shippingCost": 50.00
}
Example: Add Line Item
PATCH /record/v1/salesOrder/1001
Content-Type: application/json
{
"item": {
"items": [
{
"item": { "id": "789" },
"quantity": 10,
"rate": 99.99
},
{
"item": { "id": "790" },
"quantity": 5,
"rate": 149.99
},
{
"item": { "id": "791" },
"quantity": 2,
"rate": 49.99
}
]
}
}
Replace All Items
When updating the item sublist, you must provide ALL line items, not just the new ones. PATCH replaces the entire sublist.
Line Item Fields
Each item in the item.items array supports:
| Field | Type | Description | Required |
|---|---|---|---|
item | object | Item reference | Yes |
quantity | number | Quantity ordered | Yes |
rate | number | Unit price | Auto from item |
amount | number | Line total (qty × rate) | Auto-calculated |
description | string | Line description | Auto from item |
taxCode | object | Tax code | No |
price | object | Price level | No |
department | object | Department | No |
class | object | Classification | No |
location | object | Location | No |
expectedShipDate | string | Expected ship date | No |
Sales Order Statuses
| Status ID | Description | Next Actions |
|---|---|---|
PENDING_APPROVAL | Pending approval | Approve or reject |
PENDING_FULFILLMENT | Approved, awaiting fulfillment | Create item fulfillment |
PARTIALLY_FULFILLED | Some items fulfilled | Fulfill remaining items |
PENDING_BILLING | Fulfilled, awaiting invoice | Create invoice |
PARTIALLY_BILLED | Partially invoiced | Create remaining invoices |
BILLED | Fully invoiced | N/A - complete |
CANCELLED | Cancelled | N/A |
CLOSED | Closed | N/A |
Query Filters
Find Pending Approval Orders
GET /record/v1/salesOrder?q=status='PENDING_APPROVAL'
Find by Customer
GET /record/v1/salesOrder?q=entity='456'
Find by Date Range
GET /record/v1/salesOrder?q=tranDate BETWEEN '2025-01-01' AND '2025-12-31'
Find by PO Number
GET /record/v1/salesOrder?q=otherRefNum='PO-12345'
Find Large Orders
GET /record/v1/salesOrder?q=total > 10000
Common Workflows
1. Order to Cash (Standard)
Sales Order → Item Fulfillment → Invoice → Customer Payment
2. Direct Invoicing
Sales Order → Invoice (auto-creates fulfillment)
3. Drop Ship
Sales Order → Purchase Order → Item Receipt → Item Fulfillment → Invoice
Important Notes
Approval Workflow
- If approval workflow is enabled, new orders start in
PENDING_APPROVALstatus - Orders must be approved before fulfillment
Item Availability
- NetSuite checks item availability when creating the order
- If insufficient inventory, order can still be created but will show backorder
Pricing
rateis auto-populated from the item's price level- You can override by explicitly setting
rate - Price level hierarchy: Customer-specific → Price level → Base price
Tax Calculation
- Tax is calculated based on:
- Ship-to address (nexus)
- Item tax settings
- Customer tax status
taxTotalis automatically calculated
See Also
- Estimate - Create quotes before orders
- Invoice - Bill sales orders
- Item Fulfillment - Ship orders
- Customer Payment - Receive payment
- Return Authorization - Process returns