NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Cost Category → Insert or update record

AI-generated

Summary

Update or insert a NetSuite Cost Category record via a PUT request using the external identifier.

Inputs

  • isDebugMode — Include full request and response details in the output.
  • id (required) — External identifier of the Cost Category record used in the URL path of the PUT request.
  • additionalFields — Optional standard fields for the record: externalId, is inactive flag, internal ID, item cost type identifiers, longitemtype, name, server preferences, replace directives, and other NetSuite-specific properties.
  • customFields — List of custom field name/value pairs to set on the record. Each field includes its type (boolean, datetime, number, string, select, multiselect) and the corresponding value.

Output shape

a JSON representation of the updated/created Cost Category record

If Debug Mode is true, the output will also include the raw request and response objects under the keys ‘request’ and ‘response’. The operation performs a PUT to /costCategory/{id} and returns the NetSuite record body or an error envelope if the call fails.

Examples

Example 1: Create or update a Cost Category with minimal data

Set id to '200', name in additionalFields to 'IT Operating', isDebugMode to false.

Example 2: Mark a Cost Category as inactive

Set id to '200', in additionalFields set isInactive to true, isDebugMode to false.

Example 3: Update with a custom field

Set id to '200', add a custom field named 'X-Department' of type string, value 'Finance', isDebugMode to false.

Discussion