Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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?