NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Expense Report → Get record

AI-generated

Summary

Retrieve an expense report record by ID, optionally expanding subresources and selecting specific fields.

Inputs

  • isDebugMode — Include the full HTTP request and response payload in the output; useful for troubleshooting.
  • id (required) — The internal numeric identifier of the expense report to retrieve.
  • additionalFields — Collection of optional flags and headers for the request.
  • expandSubResources (boolean): If true, all sublists, sublist lines and subrecords on the report are automatically expanded in the response.
  • fields (string): Comma‑separated list of field names to include; only those fields and sublists are returned.
  • Prefer (options): Set to respond‑async to have the request processed asynchronously.
  • simpleEnumFormat (boolean): Return enumeration values as their internal ID instead of verbose objects.
  • X‑NetSuite‑Idempotency‑Key (string): UUID to guarantee single execution for asynchronous requests (ignored for synchronous calls).

Output shape

a single JSON object representing the expense report record, possibly containing only the selected fields and/or expanded subresources. If isDebugMode is true, the output also contains a debug object with the raw HTTP request and response.

The record is returned as a single item; no pagination is involved. When expansion is requested, the entire hierarchy of subrecords/sublist lines is included. Asynchronous requests may finish after the node executes, in which case only a Preference-applied: respond-async header is present in the debug data.

Examples

Example 1: Simple fetch

Set Id to the desired expense report number (e.g., 123456). Leave all other fields at their defaults.

Example 2: Full debug information

Set Id to 123456 and enable Debug Mode. The node output will include debug.request and debug.response fields with the complete HTTP interaction.

Example 3: Expand subresources and limit fields

Set Id to 123456, in Additional Fields check Expand Sub Resources and enter entity,transactionDate in the Fields field. The response will contain only the entity and transactionDate fields and any expanded subresources.

Discussion