RE: REST API to upsert invoice line items
I need to be able to upsert line items in a NetSuite invoice with updated information from an external system.
I’ve tried to apply an internalId and externalId to the line item so I can target for update, however it doesn’t appear to be saved against the line item when GETing it back from the API.
My invoice creation payload is
{ "tranDate": "2021-07-12", "dueDate": "2021-07-19", "externalId": "sysA_INV-34698", "amountPaid": 0, "entity": { "id": 3127 }, "item": { "items": [ { "item": { "id": 374 }, "internalId": "sysA_INV-34698_JOBID-4875398" "quantity": 1, "rate": 534.54 } ] } }
any ideas how I can update/upsert a line item, or do I have to delete all items and re add them every time?
Upsert is not an option while Working with Sublists. You need to know which line you are matching against.