NetSuite REST Azerion icon

NetSuite REST Azerion

Call NetSuite SuiteTalk REST operations.

Actions981

Department → Insert or update record

AI-generated

Summary

Upserts a Department record via PUT /department/{id}. Required id parameter provides the external identifier; all other optional parameters populate the request body. Authentication uses the selected OAuth1/OAuth2 method.

Inputs

  • id (required) — External identifier for the department record; mapped to the URL path parameter for put /department/{id}.
  • isDebugMode — Whether to include full request and response info in the output.
  • authMethod — Authentication method; options are OAuth1 or OAuth2. Default is oauth1.
  • additionalFields — Nested collection of additional department fields, including classTranslation with language and locale sub-options.
  • isInactive — Check to inactivate this department record; inactive departments do not show in lists on records and transactions.
  • externalId — External identifier for the department.
  • fullName — Full name for the department.
  • includeChildren — Associate the department with all sub-subsidiaries of selected subsidiaries.
  • internalId — Internal identifier for the department record.
  • name — Department name. Alphanumeric, maximum 60 characters; displayed in lists on records and transactions.
  • parent — Parent department specified by internal or external identifier.
  • Prefer — Execute request asynchronously if set to 'respond-async'.
  • X-NetSuite-Idempotency-Key — Unique idempotency key per RFC 4122; ensures the request executes only once.
  • X-NetSuite-PropertyNameValidation — Strictness of property name validation: Error, Warning, or Ignore.
  • X-NetSuite-PropertyValueValidation — Strictness of property value validation: Error, Warning, or Ignore.
  • customFields — List of custom fields to assign; each custom field has a fieldName (from NetSuite load options), fieldType (boolean, dateTime, multiSelect, number, select, string), and a corresponding typed value.
  • refName — Reference name for the operation output.

Output shape

The node returns the API response from NetSuite's PUT /department/{id} endpoint, containing the upserted department record data. Specific return fields depend on the NetSuite API response.

Output includes the department record as returned by NetSuite; debug mode includes full request and response details if enabled.

Examples

Example 1: Update department name and mark inactive

Set id to the department's external identifier, name to the new name, and isInactive to true.

Links

Discussion