NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Inventory Number → Insert or update record

AI-generated

Summary

Create or replace an Inventory Number record by providing its ID and optional field values, optionally including custom fields, and optionally returning full request and response details when debugging.

Inputs

  • isDebugMode — Include the raw HTTP request and response data in the node output; otherwise only the NetSuite response body is returned.
  • id (required) — The external identifier of the Inventory Number record to update or create. If the record does not exist a new record is created with this ID.
  • additionalFields — A collection of Inventory Number fields that can be set or updated. All subfields are optional; only those provided are sent to NetSuite: quantityAvailable, quantityAvailableBase, baseUnit, expirationDate, externalId, internalId, inventoryBalance (with nested item, location, dateCreated, etc.), itemName, lastModifiedDate, memo, quantityOnHand, quantityOnHandBase, quantityOnOrder, Prefer, refName, replace, replaceSelectedFields, inventoryNumber, status, units, X-NetSuite-Idempotency-Key, X-NetSuite-PropertyNameValidation, X-NetSuite-PropertyValueValidation.
  • customFields — An optional custom field collection. Each entry specifies the field name, field type, and its value, allowing custom data to be included on the Inventory Number record.

Output shape

JSON object representing the created or updated Inventory Number record as returned by NetSuite, or, if debug is enabled, an object containing the raw request and response data in addition to the record body.

When creating a new record, NetSuite will return the constructed record with generated internal IDs. The shape matches the NetSuite Inventory Number schema and may contain nested objects for inventory balances, items, and locations. If the API call fails, an error object is returned via the node’s error handling mechanism.

Examples

Example 1: Update availability of a specific inventory number

Set isDebugMode=false, id='INV-001', additionalFields.quantityOnHand=10, quantityAvailable=10, customFields: [Field Name: 'Location', Value: 123]

Example 2: Create a new inventory number with serial and batch details

Set id='SER-ABC-123', additionalFields.inventoryNumber='ABC123', itemName='Widget', quantityOnHand=5, preferred= 'respond-async', debugMode=false

Discussion