NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Expense Category → Insert or update record

AI-generated

Summary

Insert a new or update an existing Expense Category record via NetSuite’s REST API.

Inputs

  • id (required) — External identifier of the Expense Category to upsert.
  • isDebugMode — If true, include full HTTP request and response data in the output for troubleshooting.
  • additionalFields — These are mapped directly to the record’s standard fields.
  • customFields — Collection of custom fields to set on the record. Each entry requires a field name, type, and value.
  • X-NetSuite-Idempotency-Key — Unique UUID for idempotent asynchronous requests.
  • X-NetSuite-PropertyNameValidation — How strictly NetSuite validates property names (Error / Warning / Ignore).
  • X-NetSuite-PropertyValueValidation — How strictly NetSuite validates property values (Error / Warning / Ignore).

Output shape

a single record containing the created or updated Expense Category details

If Debug Mode is enabled, the output will also include raw request and response objects. The operation may return 202 and an asynchronous processing header when the Prefer option is set to respond-async.

Examples

Example 1: Create or update an Expense Category with a default rate and make it inactive.

Set id, name, defaultrate, and isinactive fields; leave other optional fields empty.

Example 2: Update an existing Expense Category and add a custom field value.

Specify the id, provide updated values in additionalFields, and add a custom field entry in customFields.

Example 3: Use idempotency key with an asynchronous request for large updates.

Set X-NetSuite-Idempotency-Key, Prefer to respond-async, and provide necessary fields; enable Debug Mode to inspect the 202 response.

Discussion