NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Commerce Category → Insert or update record

AI-generated

Summary

Update an existing commerce category or create one if it does not exist, by sending a PUT request with the supplied category fields and optional custom fields.

Inputs

  • id (required) — The external identifier of the commerce category to update – this is used as the path parameter in the REST call.
  • isDebugMode — When true the node emits the raw HTTP request and response objects in addition to the updated record.
  • X-NetSuite-Idempotency-Key — A UUID string that makes the request idempotent; responses will be reused if the same key is sent again.
  • X-NetSuite-PropertyNameValidation — Controls property‑name validation on the server: "Error", "Warning", or "Ignore".
  • X-NetSuite-PropertyValueValidation — Controls property‑value validation on the server: "Error", "Warning", or "Ignore".
  • customFields — Optional list of custom field name/value pairs to include in the request. Each custom field must be defined in the account and has a type such as Boolean, Date Time, Multi Select, Number, Select, or String.
  • additionalFields — Optional collection of built‑in commerce category fields. Fields such as name, description, pageTitle, and visibility dates can be set or overridden here.

Output shape

a single Commerce Category record containing the fields returned by NetSuite's REST endpoint, optionally wrapped with request/response data when debug mode is enabled.

If the category does not exist NetSuite may create it; the returned object includes system‑generated fields like internalId. The node uses OAuth2 credentials configured in the credentials panel.

Examples

Example 1: Standard update – change category name and description

Set isDebugMode to false, provide id, and in additionalFields set name and description. Leave customFields empty.

Example 2: Debug mode – see HTTP traffic

Set isDebugMode to true, provide id and desired field changes in additionalFields. The node output will include a debug property with request and response details.

Example 3: Idempotent update – avoid duplicate changes

Generate a UUID and set X-NetSuite-Idempotency-Key to that value. This ensures that retrying the same node execution does not create a duplicate update.

Discussion