NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Cost Category → Insert record

AI-generated

Summary

Create a new Cost Category record in NetSuite via the REST API.

Inputs

  • isDebugMode — Include full request and response data in the output for troubleshooting.
  • name (required) — The name of the Cost Category. Appears in NetSuite lists.
  • externalId — A client‑supplied unique identifier that can be used to reference the record later.
  • isInactive — Mark the record as inactive; it will be hidden from most UI views but can be reactivated.
  • itemCostType — The item cost type reference. Provide either the internal id or the refName of a valid ItemCostType.
  • longitemtype — Optional field for the long item type string.
  • refName — Optional reference name for the Cost Category.
  • Prefer — Set to respond-async to execute the request asynchronously. A Preference-applied: respond-async header will be returned in the response.
  • replace — Comma‑separated list of sublist names whose lines will be replaced by the request data.
  • tname — Optional transaction name field.
  • X-NetSuite-Idempotency-Key — UUID key to prevent duplicate asynchronous requests.
  • X-NetSuite-PropertyNameValidation — Controls strictness of property name validation (Error, Warning, or Ignore).

Output shape

a JSON object representing the created Cost Category record, including all fields returned by NetSuite

When isDebugMode is true, the output also contains a request and response property with the full HTTP request and response payloads.

Examples

Example 1: Create a simple Cost Category

name: "Marketing Costs"; isDebugMode: false

Example 2: Create a Cost Category with item cost type and idempotency key

name: "HR Expenses", itemCostType: {id: "45"}, X-NetSuite-Idempotency-Key: "123e4567-e89b-12d3-a456-426655440000"; isDebugMode: false

Example 3: Enable debug to inspect the REST call

name: "IT Assets", isDebugMode: true

Discussion