If the user needs to create a sales order using the REST API, then we have to add the mandatory field values in the request body.
Below is the endpoint URL and the request body for that:
The API type: POST
Endpoint URL: https://[Account Id].suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder
Request body:
{
"externalId": "TEST007",
"customForm": {
"id": "196",
"refName": "Sales Order ( Sales Associate)_use"
},
"entity": {
"id": "151267"
},
"custbody8": "123456789",
"custbody15": "987654321",
"custbody64": {
"id": "1",
"refName": "Yes"
},
"custbody17": "abc@jobinandjismi.com",
"tranDate": "2025-05-07",
"billAddressList": {
"id": "239015",
"refName": "ABC"
},
"shipAddressList": {
"id": "239016",
"refName": "XYZ"
},
"custbody52": {
"id": "7",
"refName": "In-Store Regular"
},
"custbody_aha_sales_location": {
"id": "36",
"refName": "Redwood City"
},
"location": {
"id": "26",
"refName": "a. Product Distribution Center"
},
"custbody45": {
"id": "163190",
"refName": "91020 NetSuite 102"
},
"custbody46": "netsuiteintegrations+102@airportappliance.com",
"custbody50": {
"id": "1",
"refName": "Radio"
},
"custbody_jj_delivery_instructions": "Testing REST API",
"salesTeam": {
"items": [
{
"employee": {
"id": "21474",
"refName": "aaaa bbbb"
},
"id": "11036606_21474",
"salesRole": {
"id": "-2",
"refName": "Sales Rep"
},
"isPrimary": false,
"contribution": 100.0
}
]
},
"item": {
"items": [
{
"item": {
"id": "40474",
"refName": "WH46DBH500EV"
},
"price": {
"id": "1",
"refName": ""
},
"quantity": 2.0,
"rate": 123.0,
"location": {
"id": "26",
"refName": "a. Product Distribution Center"
},
"custcol12": {
"id": "3",
"refName": "Regular Delivery"
},
"custcol_req_del_date": "2025-05-08",
"commitInventory": {
"id": "1",
"refName": "Available Qty"
},
"class": {
"id": "156",
"refName": "Washers : Stacked Washer Dryer Unit"
},
"custcol_aha_discountable": true,
"poVendor": {
"id": "1570",
"refName": "SAMSA"
},
"custcol_aha_sales_invoice_cost": 1346.0,
"custcol_nscs_reopenaddonpopup": true
}
]
}
}