NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Invoice → Update record

AI-generated

Summary

Update an existing NetSuite Invoice record by its internal ID, modifying specified fields and sublists.

Inputs

  • Id (required) — The internal identifier of the invoice to update.
  • Additional Fields — Select standard invoice fields to modify, such as general information (e.g., memo, transaction date, associated entity, sales representative, subtotal, payment terms), billing or shipping addresses, or line items. For line items, specify details like item ID, quantity, rate, amount, description, class, department, location, and subsidiary.
  • Custom Fields — Add or update custom fields on the invoice record. For each custom field, specify its Field Name, Field Type (e.g., Boolean, Date Time, Number, String, Select, Multi Select), and the corresponding Value.
  • Replace — A comma-separated list of sublist names (e.g., 'item') whose existing lines will be completely replaced by the new lines provided in the 'Additional Fields' or 'Custom Fields' section. If a sublist name is not included, existing lines in that sublist will be preserved unless explicitly modified.
  • Replace Selected Fields — If set to 'true', any body fields intended for deletion in the update request must also be included in the 'Replace' query parameter.
  • Prefer — Request specific server behavior, such as 'respond-async' for asynchronous execution of the update.
  • X-NetSuite-Idempotency-Key — A unique UUID to ensure that asynchronous requests are executed exactly once, preventing duplicate processing if the request is retried.
  • X-NetSuite-PropertyNameValidation — Sets the strictness for validating property names in the request payload ('Error', 'Warning', 'Ignore').
  • X-NetSuite-PropertyValueValidation — Sets the strictness for validating property values in the request payload ('Error', 'Warning', 'Ignore').
  • Debug Mode — When enabled, the output will include detailed request and response information for debugging purposes.

Output shape

A single NetSuite Invoice record with its updated properties.

If 'Debug Mode' is enabled, the output will include the full request and response details. If 'Prefer' is set to 'respond-async', the operation may return an acknowledgement of the asynchronous request rather than the fully updated record immediately.

Examples

Example 1: Update the memo and payment terms for an existing invoice.

Set 'Id' to the invoice's internal ID, 'Additional Fields.Memo' to "New memo for invoice", and 'Additional Fields.Terms.id' to the internal ID of the desired payment terms.

Example 2: Replace all line items on an invoice with a new set of items.

Set 'Id' to the invoice's internal ID, set 'Replace' to "item", and provide the complete new list of line items under 'Additional Fields.Item.items'.

Example 3: Update a custom field on an invoice asynchronously.

Set 'Id' to the invoice's internal ID, add an entry under 'Custom Fields' with the Field Name, Field Type, and Value for the custom field, and set 'Prefer' to "respond-async" with a unique 'X-NetSuite-Idempotency-Key'.

Discussion