NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Coupon Code → Get record

AI-generated

Summary

Retrieve a Coupon Code record from NetSuite, optionally selecting fields, expanding subresources, or requesting asynchronous processing.

Inputs

  • isDebugMode — Include full request and response information in the output.
  • id (required) — Internal identifier of the coupon code to retrieve.
  • expandSubResources — Expand all sublists, sublist lines, and subrecords on the record.
  • fields — Comma‑separated list of field names and sublists to include in the response.
  • Prefer — Client‑requested server behavior. Use "respond-async" to execute the request asynchronously.
  • simpleEnumFormat — Return enumeration values as internal ID values only.
  • X-NetSuite-Idempotency-Key — Unique idempotency key for asynchronous requests; ignored for synchronous execution.

Output shape

a single record (JSON) from NetSuite; may include subresources if expanded. If Debug Mode is true, the output also contains the HTTP request and response details.

When Prefer is set to "respond-async", the response contains a "Preference-applied: respond-async" header and processing occurs asynchronously. Fields not requested are omitted; if no subresources are expanded, only top‑level fields are returned.

Examples

Example 1: Fetch a coupon code by ID with selected fields

id: 12345, fields: "discountRate,promoCode"

Example 2: Retrieve the coupon code record with all subresources expanded

id: 12345, expandSubResources: true

Example 3: Request the record asynchronously with an idempotency key

id: 12345, Prefer: "respond-async", X-NetSuite-Idempotency-Key: "f47ac10b-58cc-4372-a567-0e02b2c3d479"

Discussion