NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Expense Report → Insert or update record

AI-generated

Summary

Create or update a NetSuite Expense Report via the SuiteTalk REST API, returning the saved record or debug details.

Inputs

  • isDebugMode — Include full request and response details in the output. Optional; defaults to false.
  • id — External identifier of the Expense Report. If provided, the node updates that record; if omitted, a new report is created.
  • additionalFields — Optional collection of standard Expense Report fields such as account, expense lines, dates, totals, status, and custom sublist data. Each key corresponds to a NetSuite field; nested objects may contain identifiers or values.
  • customFields — Optional collection of custom record fields. Each entry specifies the field name, type, and value. Values are supplied according to the field type (boolean, dateTime, number, string, or multi‑select).

Output shape

JSON object representing the created or updated Expense Report and, when debug mode is enabled, the full HTTP request and response metadata.

The payload mirrors the body returned by NetSuite REST; field names match NetSuite field IDs. When Debug Mode is true, an additional "debug" key contains request URL, headers, body, and response status and body.

Examples

Example 1: Create a new expense report with minimal line items

Leave "id" empty; enable "isDebugMode" if required. Set "additionalFields" to include a single expense line, date, and total.

Example 2: Update an existing expense report

Provide the "id" of the report to update; update fields such as "status" or add/remove expense lines in "additionalFields".

Example 3: Collect request/response details for troubleshooting

Toggle "isDebugMode" to true. The output will contain a "debug" section with full HTTP interaction.

Discussion