Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Upsert SalesOrder line items via REST Put operation - how to key?
Hi -
I'm trying to run an Upsert on SalesOrder using a PUT operation like so:
PUT
https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder/eid:SO_EXT_123
Body:
{ "memo": "Test Memo",
"tranDate": "2025-07-12",
"currency": { "id": 1 },
"entity": { "id": 3743 },
"item": {
"items": [ {
"quantity": 1,
"rate": 100.0,
"line": 1,
"item": { "id": 114 }
} ] }}
I want to use the upsert operation to do a sync/merge of sales orders. By passing the external id in the url, i can correctly insert/update the sales order header data as required.
However, I want to also sync on the items. The swagger schema suggests that 'line' is the key to be used, but is that accurate? My understanding is that the line refers to the position in the collection, not an internally or externally assigned id?